From 1a61aa98b3ab76b5cb3b00a44f53265fc51b00c7 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 17 Nov 2002 07:59:50 +0000 Subject: convert some GnomeDialog stuff to GtkDialog. 2002-11-16 Chris Toshok * gal-view-instance.c: convert some GnomeDialog stuff to GtkDialog. * gal-view-instance-save-as-dialog.c: remove GnomeDialog references. * gal-view-new-dialog.c: same. svn path=/trunk/; revision=18813 --- widgets/menus/gal-view-instance-save-as-dialog.c | 2 +- widgets/menus/gal-view-instance.c | 21 ++++++++++----------- widgets/menus/gal-view-new-dialog.c | 1 - 3 files changed, 11 insertions(+), 13 deletions(-) (limited to 'widgets/menus') diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c index ee61fe8edb..785f7eca54 100644 --- a/widgets/menus/gal-view-instance-save-as-dialog.c +++ b/widgets/menus/gal-view-instance-save-as-dialog.c @@ -25,7 +25,6 @@ #include "gal-view-instance-save-as-dialog.h" -#include #include "gal-define-views-model.h" #include "gal-view-new-dialog.h" #include @@ -34,6 +33,7 @@ #include #include #include +#include static GtkDialogClass *parent_class = NULL; #define PARENT_TYPE GTK_TYPE_DIALOG diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c index 94b43eada6..f227a020fd 100644 --- a/widgets/menus/gal-view-instance.c +++ b/widgets/menus/gal-view-instance.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -399,20 +398,20 @@ gal_view_instance_set_custom_view (GalViewInstance *instance, GalView *view) } static void -dialog_clicked(GtkWidget *dialog, int button, GalViewInstance *instance) +dialog_response(GtkWidget *dialog, int id, GalViewInstance *instance) { - if (button == 0) { + if (id == GTK_RESPONSE_OK) { gal_view_instance_save_as_dialog_save (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (dialog)); } - gnome_dialog_close(GNOME_DIALOG(dialog)); + gtk_widget_destroy (dialog); } void gal_view_instance_save_as (GalViewInstance *instance) { GtkWidget *dialog = gal_view_instance_save_as_dialog_new(instance); - g_signal_connect(dialog, "clicked", - G_CALLBACK(dialog_clicked), instance); + g_signal_connect(dialog, "response", + G_CALLBACK(dialog_response), instance); gtk_widget_show(dialog); } @@ -504,12 +503,12 @@ add_popup_menu_item (EPopupMenu *menu_item, } static void -define_views_dialog_clicked(GtkWidget *dialog, int button, GalViewInstance *instance) +define_views_dialog_response(GtkWidget *dialog, int id, GalViewInstance *instance) { - if (button == 0) { + if (id == GTK_RESPONSE_OK) { gal_view_collection_save(instance->collection); } - gnome_dialog_close(GNOME_DIALOG(dialog)); + gtk_widget_destroy (dialog); } static void @@ -517,8 +516,8 @@ define_views_cb(GtkWidget *widget, GalViewInstance *instance) { GtkWidget *dialog = gal_define_views_dialog_new(instance->collection); - g_signal_connect(dialog, "clicked", - G_CALLBACK(define_views_dialog_clicked), instance); + g_signal_connect(dialog, "response", + G_CALLBACK(define_views_dialog_response), instance); gtk_widget_show(dialog); } diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index 52342ce773..ca4fcdd074 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -22,7 +22,6 @@ */ #include -#include #include #include #include "gal-view-new-dialog.h" -- cgit v1.2.3