From b75c80d63f8aa474b8ba14318b8c89f2c13be845 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 15 Nov 2002 00:26:42 +0000 Subject: use GtkDialog's ::response instead of GnomeDialog's ::clicked. 2002-11-14 Chris Toshok * menus/gal-view-menus.c (define_views): use GtkDialog's ::response instead of GnomeDialog's ::clicked. (dialog_response): use response id's. (gvm_finalize): fix warning. svn path=/trunk/; revision=18768 --- widgets/ChangeLog | 7 +++++++ widgets/menus/gal-view-menus.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 3ca6f51a1c..ec1cc81591 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,10 @@ +2002-11-14 Chris Toshok + + * menus/gal-view-menus.c (define_views): use GtkDialog's + ::response instead of GnomeDialog's ::clicked. + (dialog_response): use response id's. + (gvm_finalize): fix warning. + 2002-11-13 Ettore Perazzoli * menus/gal-view-menus.h diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c index 0652131f3c..1091c251d2 100644 --- a/widgets/menus/gal-view-menus.c +++ b/widgets/menus/gal-view-menus.c @@ -149,7 +149,7 @@ gvm_finalize (GObject *object) gal_view_menus_unmerge (gvm, NULL); if (gvm->priv->define_views_dialog) - g_object_weak_unref (gvm->priv->define_views_dialog, clear_define_views_dialog, gvm); + g_object_weak_unref (G_OBJECT (gvm->priv->define_views_dialog), clear_define_views_dialog, gvm); g_free(gvm->priv); @@ -208,12 +208,12 @@ gal_view_menus_construct (GalViewMenus *gvm, } static void -dialog_clicked(GtkWidget *dialog, int button, GalViewMenus *menus) +dialog_response(GtkWidget *dialog, int id, GalViewMenus *menus) { - if (button == 0) { + if (id == GTK_RESPONSE_OK) { gal_view_collection_save(menus->priv->instance->collection); } - gnome_dialog_close(GNOME_DIALOG(dialog)); + gtk_widget_destroy(dialog); } static void @@ -226,7 +226,7 @@ define_views(BonoboUIComponent *component, } else { GtkWidget *dialog = gal_define_views_dialog_new(menus->priv->instance->collection); - g_signal_connect (dialog, "clicked", G_CALLBACK (dialog_clicked), menus); + g_signal_connect (dialog, "response", G_CALLBACK (dialog_response), menus); menus->priv->define_views_dialog = dialog; g_object_weak_ref (G_OBJECT (dialog), clear_define_views_dialog, menus); gtk_widget_show(dialog); -- cgit v1.2.3