From c11529e9e32dce3b5da6249d1aa9abfcb491e42b Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 5 Nov 2002 19:02:46 +0000 Subject: Set response_id to GTK_RESPONSE_OK. (cancel_button): Likewise, with * glade/e-shell-folder-creation-dialog.glade (ok_button): Set response_id to GTK_RESPONSE_OK. (cancel_button): Likewise, with GTK_RESPONSE_CANCEL. * e-shell-folder-creation-dialog.h, e-shell-folder-creation-dialog.c: Ported to GtkDialog. svn path=/trunk/; revision=18558 --- shell/ChangeLog | 9 + shell/e-shell-folder-creation-dialog.c | 32 ++- shell/glade/e-shell-folder-creation-dialog.glade | 316 ++++++++++++----------- 3 files changed, 188 insertions(+), 169 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 88d4b178fe..1a3aedd696 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2002-11-05 Ettore Perazzoli + + * glade/e-shell-folder-creation-dialog.glade (ok_button): Set + response_id to GTK_RESPONSE_OK. + (cancel_button): Likewise, with GTK_RESPONSE_CANCEL. + + * e-shell-folder-creation-dialog.h, + e-shell-folder-creation-dialog.c: Ported to GtkDialog. + 2002-11-05 Ettore Perazzoli * e-folder-list.c: Use g_object_get_data() instead of diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index 1b72c1167a..c7664d866b 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -92,8 +93,8 @@ async_create_cb (EStorageSet *storage_set, dialog_data->creation_in_progress = FALSE; - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE); - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 1, TRUE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_OK, TRUE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_CANCEL, TRUE); if (result == E_STORAGE_OK) { /* Success! Tell the callback of this, then return */ @@ -136,9 +137,9 @@ async_create_cb (EStorageSet *storage_set, /* Dialog signal callbacks. */ static void -dialog_clicked_cb (GnomeDialog *dialog, - int button_number, - void *data) +dialog_response_cb (GnomeDialog *dialog, + int response_id, + void *data) { DialogData *dialog_data; EStorageSet *storage_set; @@ -151,7 +152,7 @@ dialog_clicked_cb (GnomeDialog *dialog, dialog_data = (DialogData *) data; - if (button_number != 0) { + if (response_id != GTK_RESPONSE_OK) { if (dialog_data->result_callback != NULL) (* dialog_data->result_callback) (dialog_data->shell, E_SHELL_FOLDER_CREATION_DIALOG_RESULT_CANCEL, @@ -197,8 +198,8 @@ dialog_clicked_cb (GnomeDialog *dialog, g_free (dialog_data->folder_path); dialog_data->folder_path = path; - gnome_dialog_set_sensitive (dialog, 0, FALSE); - gnome_dialog_set_sensitive (dialog, 1, FALSE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL, FALSE); dialog_data->creation_in_progress = TRUE; @@ -244,9 +245,9 @@ folder_name_entry_changed_cb (GtkEditable *editable, if (parent_path != NULL && GTK_ENTRY (dialog_data->folder_name_entry)->text_length > 0) - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_OK, TRUE); else - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, FALSE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_OK, FALSE); } static void @@ -259,7 +260,7 @@ storage_set_view_folder_selected_cb (EStorageSetView *storage_set_view, dialog_data = (DialogData *) data; if (GTK_ENTRY (dialog_data->folder_name_entry)->text_length > 0) - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_OK, TRUE); } @@ -292,8 +293,7 @@ setup_dialog (GtkWidget *dialog, gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_title (GTK_WINDOW (dialog), _("Create New Folder")); - gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); - gnome_dialog_set_sensitive (GNOME_DIALOG (dialog), 0, FALSE); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE); gtk_widget_show (dialog); } @@ -306,8 +306,6 @@ setup_folder_name_entry (GtkWidget *dialog, GtkWidget *folder_name_entry; folder_name_entry = glade_xml_get_widget (gui, "folder_name_entry"); - - gnome_dialog_editable_enters (GNOME_DIALOG (dialog), GTK_EDITABLE (folder_name_entry)); } static GtkWidget * @@ -528,8 +526,8 @@ e_shell_show_folder_creation_dialog (EShell *shell, dialog_data->result_callback_data = result_callback_data; dialog_data->creation_in_progress = FALSE; - g_signal_connect (dialog, "clicked", - G_CALLBACK (dialog_clicked_cb), dialog_data); + g_signal_connect (dialog, "response", + G_CALLBACK (dialog_response_cb), dialog_data); g_signal_connect (dialog, "destroy", G_CALLBACK (dialog_destroy_cb), dialog_data); diff --git a/shell/glade/e-shell-folder-creation-dialog.glade b/shell/glade/e-shell-folder-creation-dialog.glade index b66eb12a66..504bdf1029 100644 --- a/shell/glade/e-shell-folder-creation-dialog.glade +++ b/shell/glade/e-shell-folder-creation-dialog.glade @@ -1,167 +1,179 @@ - + - - GTK_WINDOW_TOPLEVEL - no - 350 - 410 - yes - yes - yes - GTK_WIN_POS_NONE - - - no - 8 - yes + + True + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 350 + 410 + True + False + True - - - GTK_BUTTONBOX_END - 8 - yes + + + True + False + 8 - - - yes - yes - yes - gtk-ok - yes - yes - - + + + True + GTK_BUTTONBOX_END - - - yes - yes - yes - gtk-cancel - yes - yes - - - - - 0 - no - yes - GTK_PACK_END - - + + + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + -5 + + - - - no - 6 - yes + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + -6 + + + + + 0 + False + True + GTK_PACK_END + + - - - Folder name: - GTK_JUSTIFY_CENTER - no - 7.45058e-09 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - + + + True + False + 6 - - - yes - yes - yes - - 0 - yes - yes - - - 0 - no - no - - + + + True + Folder name: + False + False + GTK_JUSTIFY_CENTER + False + False + 7.45058e-09 + 0.5 + 0 + 0 + + + 0 + False + False + + - - - Folder type: - GTK_JUSTIFY_CENTER - no - 7.45058e-09 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - + + + True + True + True + True + True + 0 + + True + * + False + + + 0 + False + False + + - - - yes - 0 - yes + + + True + Folder type: + False + False + GTK_JUSTIFY_CENTER + False + False + 7.45058e-09 + 0.5 + 0 + 0 + + + 0 + False + False + + - - - yes - - - - - 0 - no - no - - + + + True + True + -1 + + + + True + + + + + 0 + False + False + + + + + + True + Specify where to create the folder: + False + False + GTK_JUSTIFY_CENTER + False + False + 7.45058e-09 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + 0 + True + True + + + + + - - - Specify where to create the folder: - GTK_JUSTIFY_CENTER - no - 7.45058e-09 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - 0 - yes - yes - - - - - 4 - yes - yes - - - -- cgit v1.2.3