diff --git a/ChangeLog b/ChangeLog index cc6c6985d1..a470ee8380 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-06-22 Sven Neumann + + * app/widgets/gimpfiledialog.c (gimp_file_dialog_set_image): unset + the filename if the image is unnamed. + + * configure.in + * app/sanity.c: depend on gtk+ >= 2.4.1. + + * app/widgets/gimpthumbbox.[ch]: changed gimp_thumb_box_set_uris() + to gimp_thumb_box_take_uris() since the function takes ownership + of the list, + + * app/widgets/gimpfiledialog.c: changed accordingly. Removed code + that worked around a problem in gtk+ < 2.4.1. + 2004-06-22 Sven Neumann * libgimpwidgets/gimpcolorarea.c (gimp_color_area_set_color): use diff --git a/app/sanity.c b/app/sanity.c index 4f9d291c51..37c673751b 100644 --- a/app/sanity.c +++ b/app/sanity.c @@ -36,7 +36,7 @@ sanity_check (gboolean no_interface) #define GTK_REQUIRED_MAJOR 2 #define GTK_REQUIRED_MINOR 4 -#define GTK_REQUIRED_MICRO 0 +#define GTK_REQUIRED_MICRO 1 mismatch = gtk_check_version (GTK_REQUIRED_MAJOR, GTK_REQUIRED_MINOR, diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c index 9e32a3b546..9fd668c706 100644 --- a/app/widgets/gimpfiledialog.c +++ b/app/widgets/gimpfiledialog.c @@ -380,6 +380,8 @@ gimp_file_dialog_set_image (GimpFileDialog *dialog, if (uri) gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri); + else + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), ""); gimp_ui_manager_update (dialog->manager, gimp_image_active_drawable (gimage)); @@ -392,20 +394,8 @@ static void gimp_file_dialog_selection_changed (GtkFileChooser *chooser, GimpFileDialog *dialog) { - GSList *uris = gtk_file_chooser_get_uris (chooser); - -#ifdef __GNUC__ -#warning FIXME: remove version check as soon as we depend on GTK+ 2.4.1 -#endif - if (gtk_check_version (2, 4, 1)) - { - if (uris) - gimp_thumb_box_set_uri (GIMP_THUMB_BOX (dialog->thumb_box), uris->data); - else - gimp_thumb_box_set_uri (GIMP_THUMB_BOX (dialog->thumb_box), NULL); - } - - gimp_thumb_box_set_uris (GIMP_THUMB_BOX (dialog->thumb_box), uris); + gimp_thumb_box_take_uris (GIMP_THUMB_BOX (dialog->thumb_box), + gtk_file_chooser_get_uris (chooser)); } static void diff --git a/app/widgets/gimpthumbbox.c b/app/widgets/gimpthumbbox.c index 80ddc260fb..2fcb700da2 100644 --- a/app/widgets/gimpthumbbox.c +++ b/app/widgets/gimpthumbbox.c @@ -124,7 +124,7 @@ gimp_thumb_box_finalize (GObject *object) { GimpThumbBox *box = GIMP_THUMB_BOX (object); - gimp_thumb_box_set_uris (box, NULL); + gimp_thumb_box_take_uris (box, NULL); if (box->imagefile) { @@ -304,8 +304,8 @@ gimp_thumb_box_set_uri (GimpThumbBox *box, } void -gimp_thumb_box_set_uris (GimpThumbBox *box, - GSList *uris) +gimp_thumb_box_take_uris (GimpThumbBox *box, + GSList *uris) { g_return_if_fail (GIMP_IS_THUMB_BOX (box)); diff --git a/app/widgets/gimpthumbbox.h b/app/widgets/gimpthumbbox.h index bb206a18a1..c3dc3e348c 100644 --- a/app/widgets/gimpthumbbox.h +++ b/app/widgets/gimpthumbbox.h @@ -49,14 +49,14 @@ struct _GimpThumbBoxClass }; -GType gimp_thumb_box_get_type (void) G_GNUC_CONST; +GType gimp_thumb_box_get_type (void) G_GNUC_CONST; -GtkWidget * gimp_thumb_box_new (Gimp *gimp); +GtkWidget * gimp_thumb_box_new (Gimp *gimp); -void gimp_thumb_box_set_uri (GimpThumbBox *box, - const gchar *uri); -void gimp_thumb_box_set_uris (GimpThumbBox *box, - GSList *uris); +void gimp_thumb_box_set_uri (GimpThumbBox *box, + const gchar *uri); +void gimp_thumb_box_take_uris (GimpThumbBox *box, + GSList *uris); #endif /* __GIMP_THUMB_BOX_H__ */ diff --git a/configure.in b/configure.in index 6758df5785..8a666e1114 100644 --- a/configure.in +++ b/configure.in @@ -44,7 +44,7 @@ m4_define([gimp_full_name], [The GIMP]) # required versions of other packages m4_define([glib_required_version], [2.4.0]) -m4_define([gtk_required_version], [2.4.0]) +m4_define([gtk_required_version], [2.4.1]) m4_define([gdk_pixbuf_required_version], [gtk_required_version]) m4_define([pangoft2_required_version], [1.4.0]) m4_define([fontconfig_required_version], [2.2.0])