mirror of https://github.com/GNOME/gimp.git
make_initialization_status_window(): reverse logic for if(!no_interface &&
2000-08-09 Michael Natterer <mitch@gimp.org> * app/app_procs.c: make_initialization_status_window(): reverse logic for if(!no_interface && !no_splash) * app/palette.[ch]: removed declarations of the two removed functions. One more s/gint/gboolean/. * libgimp/gimpfileselection.[ch] * libgimp/gimppixmap.[ch]: some consistency fixes (mostly fanatic :) * libgimp/gimpproceduraldb.c: fixed a compiler warning.
This commit is contained in:
parent
54f2d978fd
commit
84e80a7fc9
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2000-08-09 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/app_procs.c: make_initialization_status_window(): reverse
|
||||||
|
logic for if(!no_interface && !no_splash)
|
||||||
|
|
||||||
|
* app/palette.[ch]: removed declarations of the two removed
|
||||||
|
functions. One more s/gint/gboolean/.
|
||||||
|
|
||||||
|
* libgimp/gimpfileselection.[ch]
|
||||||
|
* libgimp/gimppixmap.[ch]: some consistency fixes (mostly fanatic :)
|
||||||
|
|
||||||
|
* libgimp/gimpproceduraldb.c: fixed a compiler warning.
|
||||||
|
|
||||||
2000-08-09 Sven Neumann <sven@gimp.org>
|
2000-08-09 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/emboss.c: install Emboss with image_type
|
* plug-ins/common/emboss.c: install Emboss with image_type
|
||||||
|
|
131
app/app_procs.c
131
app/app_procs.c
|
@ -361,75 +361,72 @@ destroy_initialization_status_window (void)
|
||||||
static void
|
static void
|
||||||
make_initialization_status_window (void)
|
make_initialization_status_window (void)
|
||||||
{
|
{
|
||||||
if (!no_interface && !no_splash)
|
GtkWidget *vbox;
|
||||||
|
GtkWidget *logo_hbox;
|
||||||
|
GtkStyle *style;
|
||||||
|
|
||||||
|
if (no_interface || no_splash)
|
||||||
|
return;
|
||||||
|
|
||||||
|
win_initstatus = gtk_window_new (GTK_WINDOW_DIALOG);
|
||||||
|
|
||||||
|
gtk_window_set_title (GTK_WINDOW (win_initstatus), _("GIMP Startup"));
|
||||||
|
gtk_window_set_wmclass (GTK_WINDOW (win_initstatus), "gimp_startup", "Gimp");
|
||||||
|
gtk_window_set_position (GTK_WINDOW (win_initstatus), GTK_WIN_POS_CENTER);
|
||||||
|
gtk_window_set_policy (GTK_WINDOW (win_initstatus), FALSE, FALSE, FALSE);
|
||||||
|
|
||||||
|
gimp_dialog_set_icon (GTK_WINDOW (win_initstatus));
|
||||||
|
|
||||||
|
if (no_splash_image == FALSE &&
|
||||||
|
splash_logo_load_size (win_initstatus))
|
||||||
{
|
{
|
||||||
GtkWidget *vbox;
|
show_logo = SHOW_LATER;
|
||||||
GtkWidget *logo_hbox;
|
|
||||||
GtkStyle *style;
|
|
||||||
|
|
||||||
win_initstatus = gtk_window_new (GTK_WINDOW_DIALOG);
|
|
||||||
|
|
||||||
gtk_window_set_title (GTK_WINDOW (win_initstatus),
|
|
||||||
_("GIMP Startup"));
|
|
||||||
gtk_window_set_wmclass (GTK_WINDOW (win_initstatus),
|
|
||||||
"gimp_startup", "Gimp");
|
|
||||||
gtk_window_set_position (GTK_WINDOW (win_initstatus), GTK_WIN_POS_CENTER);
|
|
||||||
gtk_window_set_policy (GTK_WINDOW (win_initstatus), FALSE, FALSE, FALSE);
|
|
||||||
|
|
||||||
gimp_dialog_set_icon (GTK_WINDOW (win_initstatus));
|
|
||||||
|
|
||||||
if (no_splash_image == FALSE &&
|
|
||||||
splash_logo_load_size (win_initstatus))
|
|
||||||
{
|
|
||||||
show_logo = SHOW_LATER;
|
|
||||||
}
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 4);
|
|
||||||
gtk_container_add (GTK_CONTAINER (win_initstatus), vbox);
|
|
||||||
|
|
||||||
logo_hbox = gtk_hbox_new (FALSE, 0);
|
|
||||||
gtk_box_pack_start (GTK_BOX(vbox), logo_hbox, FALSE, TRUE, 0);
|
|
||||||
|
|
||||||
logo_area = gtk_drawing_area_new ();
|
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
|
|
||||||
GTK_SIGNAL_FUNC (splash_logo_expose),
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
logo_area_width = MAX (logo_width, LOGO_WIDTH_MIN);
|
|
||||||
logo_area_height = MAX (logo_height, LOGO_HEIGHT_MIN);
|
|
||||||
|
|
||||||
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area),
|
|
||||||
logo_area_width, logo_area_height);
|
|
||||||
gtk_box_pack_start (GTK_BOX(logo_hbox), logo_area, TRUE, FALSE, 0);
|
|
||||||
|
|
||||||
label1 = gtk_label_new ("");
|
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), label1);
|
|
||||||
label2 = gtk_label_new ("");
|
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), label2);
|
|
||||||
|
|
||||||
pbar = gtk_progress_bar_new ();
|
|
||||||
gtk_box_pack_start_defaults (GTK_BOX (vbox), pbar);
|
|
||||||
|
|
||||||
gtk_widget_show (vbox);
|
|
||||||
gtk_widget_show (logo_hbox);
|
|
||||||
gtk_widget_show (logo_area);
|
|
||||||
gtk_widget_show (label1);
|
|
||||||
gtk_widget_show (label2);
|
|
||||||
gtk_widget_show (pbar);
|
|
||||||
|
|
||||||
gtk_widget_show (win_initstatus);
|
|
||||||
|
|
||||||
/* This is a hack: we try to compute a good guess for the maximum
|
|
||||||
* number of charcters that will fit into the splash-screen using
|
|
||||||
* the default_font
|
|
||||||
*/
|
|
||||||
style = gtk_widget_get_style (win_initstatus);
|
|
||||||
max_label_length =
|
|
||||||
0.8 * (float)strlen (AUTHORS) *
|
|
||||||
((float)logo_area_width /
|
|
||||||
(float)gdk_string_width (style->font, AUTHORS));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vbox = gtk_vbox_new (FALSE, 4);
|
||||||
|
gtk_container_add (GTK_CONTAINER (win_initstatus), vbox);
|
||||||
|
|
||||||
|
logo_hbox = gtk_hbox_new (FALSE, 0);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), logo_hbox, FALSE, TRUE, 0);
|
||||||
|
|
||||||
|
logo_area = gtk_drawing_area_new ();
|
||||||
|
|
||||||
|
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
|
||||||
|
GTK_SIGNAL_FUNC (splash_logo_expose),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
logo_area_width = MAX (logo_width, LOGO_WIDTH_MIN);
|
||||||
|
logo_area_height = MAX (logo_height, LOGO_HEIGHT_MIN);
|
||||||
|
|
||||||
|
gtk_drawing_area_size (GTK_DRAWING_AREA (logo_area),
|
||||||
|
logo_area_width, logo_area_height);
|
||||||
|
gtk_box_pack_start (GTK_BOX(logo_hbox), logo_area, TRUE, FALSE, 0);
|
||||||
|
|
||||||
|
label1 = gtk_label_new ("");
|
||||||
|
gtk_box_pack_start_defaults (GTK_BOX (vbox), label1);
|
||||||
|
label2 = gtk_label_new ("");
|
||||||
|
gtk_box_pack_start_defaults (GTK_BOX (vbox), label2);
|
||||||
|
|
||||||
|
pbar = gtk_progress_bar_new ();
|
||||||
|
gtk_box_pack_start_defaults (GTK_BOX (vbox), pbar);
|
||||||
|
|
||||||
|
gtk_widget_show (vbox);
|
||||||
|
gtk_widget_show (logo_hbox);
|
||||||
|
gtk_widget_show (logo_area);
|
||||||
|
gtk_widget_show (label1);
|
||||||
|
gtk_widget_show (label2);
|
||||||
|
gtk_widget_show (pbar);
|
||||||
|
|
||||||
|
gtk_widget_show (win_initstatus);
|
||||||
|
|
||||||
|
/* This is a hack: we try to compute a good guess for the maximum
|
||||||
|
* number of charcters that will fit into the splash-screen using
|
||||||
|
* the default_font
|
||||||
|
*/
|
||||||
|
style = gtk_widget_get_style (win_initstatus);
|
||||||
|
max_label_length = (0.8 * (gfloat) strlen (AUTHORS) *
|
||||||
|
((gfloat) logo_area_width /
|
||||||
|
(gfloat) gdk_string_width (style->font, AUTHORS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
|
||||||
/* public functions ********************************************************/
|
/* public functions ********************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
palettes_init (gint no_data)
|
palettes_init (gboolean no_data)
|
||||||
{
|
{
|
||||||
if (!no_data)
|
if (!no_data)
|
||||||
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
||||||
|
|
|
@ -25,18 +25,15 @@
|
||||||
#define COLOR_UPDATE_NEW 1
|
#define COLOR_UPDATE_NEW 1
|
||||||
#define COLOR_UPDATE 2
|
#define COLOR_UPDATE 2
|
||||||
|
|
||||||
void palettes_init (gint no_data);
|
void palettes_init (gboolean no_data);
|
||||||
void palette_init_palettes (gint no_data);
|
|
||||||
|
|
||||||
void palettes_free (void);
|
void palettes_free (void);
|
||||||
void palette_free_palettes (void);
|
|
||||||
|
|
||||||
void palette_dialog_create (void);
|
void palette_dialog_create (void);
|
||||||
void palette_dialog_free (void);
|
void palette_dialog_free (void);
|
||||||
|
|
||||||
void palette_set_active_color (gint r,
|
void palette_set_active_color (gint r,
|
||||||
gint g,
|
gint g,
|
||||||
gint b,
|
gint b,
|
||||||
gint state);
|
gint state);
|
||||||
|
|
||||||
#endif /* __PALETTE_H__ */
|
#endif /* __PALETTE_H__ */
|
||||||
|
|
|
@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
|
||||||
/* public functions ********************************************************/
|
/* public functions ********************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
palettes_init (gint no_data)
|
palettes_init (gboolean no_data)
|
||||||
{
|
{
|
||||||
if (!no_data)
|
if (!no_data)
|
||||||
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
||||||
|
|
|
@ -25,18 +25,15 @@
|
||||||
#define COLOR_UPDATE_NEW 1
|
#define COLOR_UPDATE_NEW 1
|
||||||
#define COLOR_UPDATE 2
|
#define COLOR_UPDATE 2
|
||||||
|
|
||||||
void palettes_init (gint no_data);
|
void palettes_init (gboolean no_data);
|
||||||
void palette_init_palettes (gint no_data);
|
|
||||||
|
|
||||||
void palettes_free (void);
|
void palettes_free (void);
|
||||||
void palette_free_palettes (void);
|
|
||||||
|
|
||||||
void palette_dialog_create (void);
|
void palette_dialog_create (void);
|
||||||
void palette_dialog_free (void);
|
void palette_dialog_free (void);
|
||||||
|
|
||||||
void palette_set_active_color (gint r,
|
void palette_set_active_color (gint r,
|
||||||
gint g,
|
gint g,
|
||||||
gint b,
|
gint b,
|
||||||
gint state);
|
gint state);
|
||||||
|
|
||||||
#endif /* __PALETTE_H__ */
|
#endif /* __PALETTE_H__ */
|
||||||
|
|
|
@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
|
||||||
/* public functions ********************************************************/
|
/* public functions ********************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
palettes_init (gint no_data)
|
palettes_init (gboolean no_data)
|
||||||
{
|
{
|
||||||
if (!no_data)
|
if (!no_data)
|
||||||
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
datafiles_read_directories (palette_path, palette_entries_load, 0);
|
||||||
|
|
|
@ -25,18 +25,15 @@
|
||||||
#define COLOR_UPDATE_NEW 1
|
#define COLOR_UPDATE_NEW 1
|
||||||
#define COLOR_UPDATE 2
|
#define COLOR_UPDATE 2
|
||||||
|
|
||||||
void palettes_init (gint no_data);
|
void palettes_init (gboolean no_data);
|
||||||
void palette_init_palettes (gint no_data);
|
|
||||||
|
|
||||||
void palettes_free (void);
|
void palettes_free (void);
|
||||||
void palette_free_palettes (void);
|
|
||||||
|
|
||||||
void palette_dialog_create (void);
|
void palette_dialog_create (void);
|
||||||
void palette_dialog_free (void);
|
void palette_dialog_free (void);
|
||||||
|
|
||||||
void palette_set_active_color (gint r,
|
void palette_set_active_color (gint r,
|
||||||
gint g,
|
gint g,
|
||||||
gint b,
|
gint b,
|
||||||
gint state);
|
gint state);
|
||||||
|
|
||||||
#endif /* __PALETTE_H__ */
|
#endif /* __PALETTE_H__ */
|
||||||
|
|
|
@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
|
||||||
gimp_file_selection_signals[FILENAME_CHANGED]);
|
gimp_file_selection_signals[FILENAME_CHANGED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gboolean
|
||||||
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
|
|
@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
|
||||||
void (* filename_changed) (GimpFileSelection *gfs);
|
void (* filename_changed) (GimpFileSelection *gfs);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* For information look into the C source or the html documentation */
|
|
||||||
|
|
||||||
GtkType gimp_file_selection_get_type (void);
|
GtkType gimp_file_selection_get_type (void);
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,6 @@
|
||||||
#include "gimppixmap.h"
|
#include "gimppixmap.h"
|
||||||
|
|
||||||
|
|
||||||
struct _GimpPixmap
|
|
||||||
{
|
|
||||||
GtkPixmap pixmap;
|
|
||||||
|
|
||||||
gchar **xpm_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gimp_pixmap_destroy (GtkObject *object);
|
static void gimp_pixmap_destroy (GtkObject *object);
|
||||||
static void gimp_pixmap_realize (GtkWidget *widget);
|
static void gimp_pixmap_realize (GtkWidget *widget);
|
||||||
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
|
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
|
||||||
|
@ -57,7 +50,7 @@ gimp_pixmap_class_init (GimpPixmapClass *class)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) class;
|
||||||
widget_class = (GtkWidgetClass *) class;
|
widget_class = (GtkWidgetClass *) class;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gtk_pixmap_get_type ());
|
parent_class = gtk_type_class (gtk_pixmap_get_type ());
|
||||||
|
|
|
@ -39,6 +39,13 @@ extern "C" {
|
||||||
typedef struct _GimpPixmap GimpPixmap;
|
typedef struct _GimpPixmap GimpPixmap;
|
||||||
typedef struct _GimpPixmapClass GimpPixmapClass;
|
typedef struct _GimpPixmapClass GimpPixmapClass;
|
||||||
|
|
||||||
|
struct _GimpPixmap
|
||||||
|
{
|
||||||
|
GtkPixmap pixmap;
|
||||||
|
|
||||||
|
gchar **xpm_data;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GimpPixmapClass
|
struct _GimpPixmapClass
|
||||||
{
|
{
|
||||||
GtkPixmapClass parent_class;
|
GtkPixmapClass parent_class;
|
||||||
|
|
|
@ -99,7 +99,7 @@ gimp_procedural_db_get_data (gchar *identifier,
|
||||||
|
|
||||||
if (hack)
|
if (hack)
|
||||||
{
|
{
|
||||||
memcpy (data, hack, size * sizeof (guint8));
|
memcpy (data, (gpointer) hack, size * sizeof (guint8));
|
||||||
g_free (hack);
|
g_free (hack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
|
||||||
gimp_file_selection_signals[FILENAME_CHANGED]);
|
gimp_file_selection_signals[FILENAME_CHANGED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gboolean
|
||||||
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
|
|
@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
|
||||||
void (* filename_changed) (GimpFileSelection *gfs);
|
void (* filename_changed) (GimpFileSelection *gfs);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* For information look into the C source or the html documentation */
|
|
||||||
|
|
||||||
GtkType gimp_file_selection_get_type (void);
|
GtkType gimp_file_selection_get_type (void);
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
|
||||||
gimp_file_selection_signals[FILENAME_CHANGED]);
|
gimp_file_selection_signals[FILENAME_CHANGED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static gboolean
|
||||||
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
|
|
|
@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
|
||||||
void (* filename_changed) (GimpFileSelection *gfs);
|
void (* filename_changed) (GimpFileSelection *gfs);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* For information look into the C source or the html documentation */
|
|
||||||
|
|
||||||
GtkType gimp_file_selection_get_type (void);
|
GtkType gimp_file_selection_get_type (void);
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,6 @@
|
||||||
#include "gimppixmap.h"
|
#include "gimppixmap.h"
|
||||||
|
|
||||||
|
|
||||||
struct _GimpPixmap
|
|
||||||
{
|
|
||||||
GtkPixmap pixmap;
|
|
||||||
|
|
||||||
gchar **xpm_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gimp_pixmap_destroy (GtkObject *object);
|
static void gimp_pixmap_destroy (GtkObject *object);
|
||||||
static void gimp_pixmap_realize (GtkWidget *widget);
|
static void gimp_pixmap_realize (GtkWidget *widget);
|
||||||
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
|
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
|
||||||
|
@ -57,7 +50,7 @@ gimp_pixmap_class_init (GimpPixmapClass *class)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) class;
|
||||||
widget_class = (GtkWidgetClass *) class;
|
widget_class = (GtkWidgetClass *) class;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gtk_pixmap_get_type ());
|
parent_class = gtk_type_class (gtk_pixmap_get_type ());
|
||||||
|
|
|
@ -39,6 +39,13 @@ extern "C" {
|
||||||
typedef struct _GimpPixmap GimpPixmap;
|
typedef struct _GimpPixmap GimpPixmap;
|
||||||
typedef struct _GimpPixmapClass GimpPixmapClass;
|
typedef struct _GimpPixmapClass GimpPixmapClass;
|
||||||
|
|
||||||
|
struct _GimpPixmap
|
||||||
|
{
|
||||||
|
GtkPixmap pixmap;
|
||||||
|
|
||||||
|
gchar **xpm_data;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GimpPixmapClass
|
struct _GimpPixmapClass
|
||||||
{
|
{
|
||||||
GtkPixmapClass parent_class;
|
GtkPixmapClass parent_class;
|
||||||
|
|
Loading…
Reference in New Issue