From 6d215cae8db10c901845e2c8dde04d8140ab377a Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 14 Apr 2002 12:02:29 +0000 Subject: [PATCH] removed some #if 0'ed stuff. 2002-04-14 Michael Natterer * app/core/gimp.c: removed some #if 0'ed stuff. * app/gui/edit-commands.c (edit_copy_cmd_callback): call gdisplays_flush() so the menus are updated correctly. * app/widgets/gimpitemfactory.c (gimp_item_factory_set_color): pack the original menu item label with TRUE, TRUE into the created hbox so it's accel. label is visible. --- ChangeLog | 11 +++++++++ app/actions/edit-commands.c | 5 +++- app/core/gimp.c | 43 ----------------------------------- app/gui/edit-commands.c | 5 +++- app/widgets/gimpitemfactory.c | 2 +- 5 files changed, 20 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8588e96381..701595f46c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-04-14 Michael Natterer + + * app/core/gimp.c: removed some #if 0'ed stuff. + + * app/gui/edit-commands.c (edit_copy_cmd_callback): call + gdisplays_flush() so the menus are updated correctly. + + * app/widgets/gimpitemfactory.c (gimp_item_factory_set_color): + pack the original menu item label with TRUE, TRUE into the created + hbox so it's accel. label is visible. + 2002-04-12 Michael Natterer Well, sometimes the most obvious solution is not the first one... diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index 785aac8ce6..4ccb77da09 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -123,7 +123,10 @@ edit_copy_cmd_callback (GtkWidget *widget, GimpImage *gimage; return_if_no_image (gimage, data); - gimp_edit_copy (gimage, gimp_image_active_drawable (gimage)); + if (gimp_edit_copy (gimage, gimp_image_active_drawable (gimage))) + { + gdisplays_flush (); + } } void diff --git a/app/core/gimp.c b/app/core/gimp.c index 31dde73d85..e261b85b9a 100644 --- a/app/core/gimp.c +++ b/app/core/gimp.c @@ -723,49 +723,6 @@ gimp_create_display (Gimp *gimp, return NULL; } -#if 0 -void -gimp_open_file (Gimp *gimp, - const gchar *filename, - gboolean with_display) -{ - GimpImage *gimage; - gint status; - - g_return_if_fail (GIMP_IS_GIMP (gimp)); - g_return_if_fail (filename != NULL); - - gimage = file_open_image (gimp, - filename, - filename, - _("Open"), - NULL, - RUN_INTERACTIVE, - &status); - - if (gimage) - { - gchar *absolute; - - /* enable & clear all undo steps */ - gimp_image_undo_enable (gimage); - - /* set the image to clean */ - gimp_image_clean_all (gimage); - - if (with_display) - gimp_create_display (gimage->gimp, gimage, 0x0101); - - absolute = file_open_absolute_filename (filename); - - document_index_add (absolute); - menus_last_opened_add (absolute); - - g_free (absolute); - } -} -#endif - GimpContext * gimp_get_standard_context (Gimp *gimp) { diff --git a/app/gui/edit-commands.c b/app/gui/edit-commands.c index 785aac8ce6..4ccb77da09 100644 --- a/app/gui/edit-commands.c +++ b/app/gui/edit-commands.c @@ -123,7 +123,10 @@ edit_copy_cmd_callback (GtkWidget *widget, GimpImage *gimage; return_if_no_image (gimage, data); - gimp_edit_copy (gimage, gimp_image_active_drawable (gimage)); + if (gimp_edit_copy (gimage, gimp_image_active_drawable (gimage))) + { + gdisplays_flush (); + } } void diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index 874f4a3e5e..2fa502ad15 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -429,7 +429,7 @@ gimp_item_factory_set_color (GtkItemFactory *factory, gtk_box_pack_start (GTK_BOX (hbox), preview, FALSE, FALSE, 0); gtk_widget_show (preview); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); g_object_unref (G_OBJECT (label));