Commit 84e80a7f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent 54f2d978
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>
* plug-ins/common/emboss.c: install Emboss with image_type
......
......@@ -361,75 +361,72 @@ destroy_initialization_status_window (void)
static void
make_initialization_status_window (void)
{
if (!no_interface && !no_splash)
{
GtkWidget *vbox;
GtkWidget *logo_hbox;
GtkStyle *style;
GtkWidget *vbox;
GtkWidget *logo_hbox;
GtkStyle *style;
win_initstatus = gtk_window_new (GTK_WINDOW_DIALOG);
if (no_interface || no_splash)
return;
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);
win_initstatus = gtk_window_new (GTK_WINDOW_DIALOG);
gimp_dialog_set_icon (GTK_WINDOW (win_initstatus));
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);
if (no_splash_image == FALSE &&
splash_logo_load_size (win_initstatus))
{
show_logo = SHOW_LATER;
}
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);
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_hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), logo_hbox, FALSE, TRUE, 0);
logo_area = gtk_drawing_area_new ();
logo_area = gtk_drawing_area_new ();
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
GTK_SIGNAL_FUNC (splash_logo_expose),
NULL);
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);
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);
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);
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);
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 (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);
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));
}
/* 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
......
......@@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
/* public functions ********************************************************/
void
palettes_init (gint no_data)
palettes_init (gboolean no_data)
{
if (!no_data)
datafiles_read_directories (palette_path, palette_entries_load, 0);
......
......@@ -25,18 +25,15 @@
#define COLOR_UPDATE_NEW 1
#define COLOR_UPDATE 2
void palettes_init (gint no_data);
void palette_init_palettes (gint no_data);
void palettes_init (gboolean no_data);
void palettes_free (void);
void palette_free_palettes (void);
void palette_dialog_create (void);
void palette_dialog_free (void);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
#endif /* __PALETTE_H__ */
......@@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
/* public functions ********************************************************/
void
palettes_init (gint no_data)
palettes_init (gboolean no_data)
{
if (!no_data)
datafiles_read_directories (palette_path, palette_entries_load, 0);
......
......@@ -25,18 +25,15 @@
#define COLOR_UPDATE_NEW 1
#define COLOR_UPDATE 2
void palettes_init (gint no_data);
void palette_init_palettes (gint no_data);
void palettes_init (gboolean no_data);
void palettes_free (void);
void palette_free_palettes (void);
void palette_dialog_create (void);
void palette_dialog_free (void);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
#endif /* __PALETTE_H__ */
......@@ -172,7 +172,7 @@ static guint n_color_palette_targets = (sizeof (color_palette_target_table) /
/* public functions ********************************************************/
void
palettes_init (gint no_data)
palettes_init (gboolean no_data)
{
if (!no_data)
datafiles_read_directories (palette_path, palette_entries_load, 0);
......
......@@ -25,18 +25,15 @@
#define COLOR_UPDATE_NEW 1
#define COLOR_UPDATE 2
void palettes_init (gint no_data);
void palette_init_palettes (gint no_data);
void palettes_init (gboolean no_data);
void palettes_free (void);
void palette_free_palettes (void);
void palette_dialog_create (void);
void palette_dialog_free (void);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
void palette_set_active_color (gint r,
gint g,
gint b,
gint state);
#endif /* __PALETTE_H__ */
......@@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
gimp_file_selection_signals[FILENAME_CHANGED]);
}
static int
static gboolean
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
GdkEvent *event,
gpointer data)
......
......@@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
void (* filename_changed) (GimpFileSelection *gfs);
};
/* For information look into the C source or the html documentation */
GtkType gimp_file_selection_get_type (void);
......
......@@ -27,13 +27,6 @@
#include "gimppixmap.h"
struct _GimpPixmap
{
GtkPixmap pixmap;
gchar **xpm_data;
};
static void gimp_pixmap_destroy (GtkObject *object);
static void gimp_pixmap_realize (GtkWidget *widget);
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
......@@ -57,7 +50,7 @@ gimp_pixmap_class_init (GimpPixmapClass *class)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
object_class = (GtkObjectClass*) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
parent_class = gtk_type_class (gtk_pixmap_get_type ());
......
......@@ -39,6 +39,13 @@ extern "C" {
typedef struct _GimpPixmap GimpPixmap;
typedef struct _GimpPixmapClass GimpPixmapClass;
struct _GimpPixmap
{
GtkPixmap pixmap;
gchar **xpm_data;
};
struct _GimpPixmapClass
{
GtkPixmapClass parent_class;
......
......@@ -99,7 +99,7 @@ gimp_procedural_db_get_data (gchar *identifier,
if (hack)
{
memcpy (data, hack, size * sizeof (guint8));
memcpy (data, (gpointer) hack, size * sizeof (guint8));
g_free (hack);
}
}
......
......@@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
gimp_file_selection_signals[FILENAME_CHANGED]);
}
static int
static gboolean
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
GdkEvent *event,
gpointer data)
......
......@@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
void (* filename_changed) (GimpFileSelection *gfs);
};
/* For information look into the C source or the html documentation */
GtkType gimp_file_selection_get_type (void);
......
......@@ -332,7 +332,7 @@ gimp_file_selection_entry_callback (GtkWidget *widget,
gimp_file_selection_signals[FILENAME_CHANGED]);
}
static int
static gboolean
gimp_file_selection_entry_focus_out_callback (GtkWidget *widget,
GdkEvent *event,
gpointer data)
......
......@@ -66,7 +66,6 @@ struct _GimpFileSelectionClass
void (* filename_changed) (GimpFileSelection *gfs);
};
/* For information look into the C source or the html documentation */
GtkType gimp_file_selection_get_type (void);
......
......@@ -27,13 +27,6 @@
#include "gimppixmap.h"
struct _GimpPixmap
{
GtkPixmap pixmap;
gchar **xpm_data;
};
static void gimp_pixmap_destroy (GtkObject *object);
static void gimp_pixmap_realize (GtkWidget *widget);
static void gimp_pixmap_create_from_xpm_d (GimpPixmap *pixmap);
......@@ -57,7 +50,7 @@ gimp_pixmap_class_init (GimpPixmapClass *class)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
object_class = (GtkObjectClass*) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
parent_class = gtk_type_class (gtk_pixmap_get_type ());
......
......@@ -39,6 +39,13 @@ extern "C" {
typedef struct _GimpPixmap GimpPixmap;
typedef struct _GimpPixmapClass GimpPixmapClass;
struct _GimpPixmap
{
GtkPixmap pixmap;
gchar **xpm_data;
};
struct _GimpPixmapClass
{
GtkPixmapClass parent_class;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment