added "be_verbose" parameters and be verbose about which splash image is
2006-07-03 Michael Natterer <mitch@gimp.org> * app/gui/splash.[ch]: added "be_verbose" parameters and be verbose about which splash image is actually loaded. * app/gui/gui.c (gui_init): pass gimp->be_verbose to splash_create().
This commit is contained in:

committed by
Michael Natterer

parent
15f00f294c
commit
48a6fbea39
@ -1,3 +1,11 @@
|
|||||||
|
2006-07-03 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/gui/splash.[ch]: added "be_verbose" parameters and be
|
||||||
|
verbose about which splash image is actually loaded.
|
||||||
|
|
||||||
|
* app/gui/gui.c (gui_init): pass gimp->be_verbose to
|
||||||
|
splash_create().
|
||||||
|
|
||||||
2006-06-30 Sven Neumann <sven@gimp.org>
|
2006-06-30 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/screenshot.c (select_window_x11): don't leak X
|
* plug-ins/common/screenshot.c (select_window_x11): don't leak X
|
||||||
|
@ -210,7 +210,7 @@ gui_init (Gimp *gimp,
|
|||||||
|
|
||||||
if (! no_splash)
|
if (! no_splash)
|
||||||
{
|
{
|
||||||
splash_create ();
|
splash_create (gimp->be_verbose);
|
||||||
status_callback = splash_update;
|
status_callback = splash_update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,8 +74,9 @@ static gboolean splash_average_text_area (GimpSplash *splash,
|
|||||||
GdkPixbuf *pixbuf,
|
GdkPixbuf *pixbuf,
|
||||||
GdkColor *color);
|
GdkColor *color);
|
||||||
|
|
||||||
static GdkPixbufAnimation * splash_image_load (void);
|
static GdkPixbufAnimation * splash_image_load (gboolean be_verbose);
|
||||||
static GdkPixbufAnimation * splash_image_pick_from_dir (const gchar *dirname);
|
static GdkPixbufAnimation * splash_image_pick_from_dir (const gchar *dirname,
|
||||||
|
gboolean be_verbose);
|
||||||
|
|
||||||
#ifdef STARTUP_TIMER
|
#ifdef STARTUP_TIMER
|
||||||
static void splash_timer_elapsed (const gchar *text1,
|
static void splash_timer_elapsed (const gchar *text1,
|
||||||
@ -87,7 +88,7 @@ static void splash_timer_elapsed (const gchar *text1,
|
|||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
void
|
void
|
||||||
splash_create (void)
|
splash_create (gboolean be_verbose)
|
||||||
{
|
{
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@ -99,7 +100,7 @@ splash_create (void)
|
|||||||
|
|
||||||
g_return_if_fail (splash == NULL);
|
g_return_if_fail (splash == NULL);
|
||||||
|
|
||||||
pixbuf = splash_image_load ();
|
pixbuf = splash_image_load (be_verbose);
|
||||||
|
|
||||||
if (! pixbuf)
|
if (! pixbuf)
|
||||||
return;
|
return;
|
||||||
@ -425,20 +426,27 @@ splash_average_text_area (GimpSplash *splash,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GdkPixbufAnimation *
|
static GdkPixbufAnimation *
|
||||||
splash_image_load (void)
|
splash_image_load (gboolean be_verbose)
|
||||||
{
|
{
|
||||||
GdkPixbufAnimation *pixbuf;
|
GdkPixbufAnimation *pixbuf;
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
|
|
||||||
filename = gimp_personal_rc_file ("gimp-splash.png");
|
filename = gimp_personal_rc_file ("gimp-splash.png");
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr ("Trying splash '%s' ... ", filename);
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr (pixbuf ? "OK\n" : "failed\n");
|
||||||
|
|
||||||
if (pixbuf)
|
if (pixbuf)
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
|
|
||||||
filename = gimp_personal_rc_file ("splashes");
|
filename = gimp_personal_rc_file ("splashes");
|
||||||
pixbuf = splash_image_pick_from_dir (filename);
|
pixbuf = splash_image_pick_from_dir (filename, be_verbose);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
if (pixbuf)
|
if (pixbuf)
|
||||||
@ -446,21 +454,29 @@ splash_image_load (void)
|
|||||||
|
|
||||||
filename = g_build_filename (gimp_data_directory (),
|
filename = g_build_filename (gimp_data_directory (),
|
||||||
"images", "gimp-splash.png", NULL);
|
"images", "gimp-splash.png", NULL);
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr ("Trying splash '%s' ... ", filename);
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr (pixbuf ? "OK\n" : "failed\n");
|
||||||
|
|
||||||
if (pixbuf)
|
if (pixbuf)
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
|
|
||||||
filename = g_build_filename (gimp_data_directory (), "splashes", NULL);
|
filename = g_build_filename (gimp_data_directory (), "splashes", NULL);
|
||||||
pixbuf = splash_image_pick_from_dir (filename);
|
pixbuf = splash_image_pick_from_dir (filename, be_verbose);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkPixbufAnimation *
|
static GdkPixbufAnimation *
|
||||||
splash_image_pick_from_dir (const gchar *dirname)
|
splash_image_pick_from_dir (const gchar *dirname,
|
||||||
|
gboolean be_verbose)
|
||||||
{
|
{
|
||||||
GdkPixbufAnimation *pixbuf = NULL;
|
GdkPixbufAnimation *pixbuf = NULL;
|
||||||
GDir *dir = g_dir_open (dirname, 0, NULL);
|
GDir *dir = g_dir_open (dirname, 0, NULL);
|
||||||
@ -482,9 +498,15 @@ splash_image_pick_from_dir (const gchar *dirname)
|
|||||||
g_list_nth_data (splashes, i),
|
g_list_nth_data (splashes, i),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr ("Trying splash '%s' ... ", filename);
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
pixbuf = gdk_pixbuf_animation_new_from_file (filename, NULL);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
|
if (be_verbose)
|
||||||
|
g_printerr (pixbuf ? "OK\n" : "failed\n");
|
||||||
|
|
||||||
g_list_foreach (splashes, (GFunc) g_free, NULL);
|
g_list_foreach (splashes, (GFunc) g_free, NULL);
|
||||||
g_list_free (splashes);
|
g_list_free (splashes);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#define __SPLASH_H__
|
#define __SPLASH_H__
|
||||||
|
|
||||||
|
|
||||||
void splash_create (void);
|
void splash_create (gboolean be_verbose);
|
||||||
void splash_destroy (void);
|
void splash_destroy (void);
|
||||||
|
|
||||||
void splash_update (const gchar *label1,
|
void splash_update (const gchar *label1,
|
||||||
|
Reference in New Issue
Block a user