diff options
author | Sven Neumann <sven@gimp.org> | 2002-01-29 12:24:02 +0000 |
---|---|---|
committer | Sven Neumann <neo@src.gnome.org> | 2002-01-29 12:24:02 +0000 |
commit | 16ce67f81b2507b67b1a31a6d46ec8a55447ef1f (patch) | |
tree | 7833078b62c8b78d723dc65358232ff3f6cfb137 | |
parent | 2c0e16e403110949b7f377ba85d198b0d44e910b (diff) | |
download | gdk-pixbuf-16ce67f81b2507b67b1a31a6d46ec8a55447ef1f.tar.gz |
don't install an empty icon_set if none of the image files could be found
2002-01-29 Sven Neumann <sven@gimp.org>
* gtk/gtkrc.c: don't install an empty icon_set if none of the image
files could be found in the pixmap_path (bug #69398).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 5 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 5 | ||||
-rw-r--r-- | gtk/gtkrc.c | 22 |
8 files changed, 50 insertions, 7 deletions
@@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0ca622603..ef196873a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,10 @@ 2002-01-29 Sven Neumann <sven@gimp.org> + * gtk/gtkrc.c: don't install an empty icon_set if none of the image + files could be found in the pixmap_path (bug #69398). + +2002-01-29 Sven Neumann <sven@gimp.org> + * gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault that showed up when using the color picker. diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 168632491..a4f64c301 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2769,8 +2769,9 @@ gtk_rc_find_pixmap_in_path (GtkSettings *settings, } if (scanner) - g_warning (_("Unable to locate image file in pixmap_path: \"%s\" line %d"), - pixmap_file, scanner->line); + g_scanner_warn (scanner, + _("Unable to locate image file in pixmap_path: \"%s\""), + pixmap_file); else g_warning (_("Unable to locate image file in pixmap_path: \"%s\""), pixmap_file); @@ -3431,7 +3432,8 @@ gtk_rc_parse_stock_id (GScanner *scanner, static guint gtk_rc_parse_icon_source (GtkRcContext *context, GScanner *scanner, - GtkIconSet *icon_set) + GtkIconSet *icon_set, + gboolean *icon_set_valid) { guint token; GtkIconSource *source; @@ -3457,7 +3459,8 @@ gtk_rc_parse_icon_source (GtkRcContext *context, } /* We continue parsing even if we didn't find the pixmap so that rest of the - * file is read, even if the syntax is bad + * file is read, even if the syntax is bad. However we don't validate the + * icon_set so the caller can choose not to install it. */ token = g_scanner_get_next_token (scanner); @@ -3589,7 +3592,10 @@ gtk_rc_parse_icon_source (GtkRcContext *context, done: if (gtk_icon_source_get_filename (source)) - gtk_icon_set_add_source (icon_set, source); + { + gtk_icon_set_add_source (icon_set, source); + *icon_set_valid = TRUE; + } gtk_icon_source_free (source); return G_TOKEN_NONE; @@ -3602,6 +3608,7 @@ gtk_rc_parse_stock (GtkRcContext *context, GtkIconFactory *factory) { GtkIconSet *icon_set = NULL; + gboolean icon_set_valid = FALSE; gchar *stock_id = NULL; guint token; @@ -3633,7 +3640,8 @@ gtk_rc_parse_stock (GtkRcContext *context, if (icon_set == NULL) icon_set = gtk_icon_set_new (); - token = gtk_rc_parse_icon_source (context, scanner, icon_set); + token = gtk_rc_parse_icon_source (context, + scanner, icon_set, &icon_set_valid); if (token != G_TOKEN_NONE) { g_free (stock_id); @@ -3652,7 +3660,7 @@ gtk_rc_parse_stock (GtkRcContext *context, } } - if (icon_set) + if (icon_set && icon_set_valid) { gtk_icon_factory_add (factory, stock_id, |