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
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
2002-11-05 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* 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 <ettore@ximian.com>
|
||||
|
||||
* e-folder-list.c: Use g_object_get_data() instead of
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include <libgnome/gnome-i18n.h>
|
||||
#include <libgnome/gnome-util.h>
|
||||
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/gtkoptionmenu.h>
|
||||
#include <gtk/gtkmenuitem.h>
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -1,167 +1,179 @@
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<glade-interface>
|
||||
<widget class="GtkDialog" id="create_folder_dialog">
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="modal">no</property>
|
||||
<property name="default_width">350</property>
|
||||
<property name="default_height">410</property>
|
||||
<property name="allow_shrink">yes</property>
|
||||
<property name="allow_grow">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="window-position">GTK_WIN_POS_NONE</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
<widget class="GtkDialog" id="create_folder_dialog">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="default_width">350</property>
|
||||
<property name="default_height">410</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="ok_button">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="cancel_button">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">yes</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="ok_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-5</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="main_vbox">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="visible">yes</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="cancel_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-6</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="folder_name_label">
|
||||
<property name="label" translatable="yes">Folder name:</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="main_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">6</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="folder_name_entry">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="has_focus">yes</property>
|
||||
<property name="editable">yes</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="max-length">0</property>
|
||||
<property name="visibility">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="folder_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Folder name:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="folder_type_label">
|
||||
<property name="label" translatable="yes">Folder type:</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="folder_name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkOptionMenu" id="folder_type_option_menu">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="history">0</property>
|
||||
<property name="visible">yes</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="folder_type_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Folder type:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child internal-child="menu">
|
||||
<widget class="GtkMenu" id="convertwidget1">
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkOptionMenu" id="folder_type_option_menu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="history">-1</property>
|
||||
|
||||
<child internal-child="menu">
|
||||
<widget class="GtkMenu" id="convertwidget1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="creation_position_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Specify where to create the folder:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="creation_position_label">
|
||||
<property name="label" translatable="yes">Specify where to create the folder:</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="xalign">7.45058e-09</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">4</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
|
||||
Reference in New Issue
Block a user