add an activate handler that returns a response OK if the OK response
2003-02-07 Larry Ewing <lewing@ximian.com> * e-shell-folder-creation-dialog.c (folder_name_entry_activate_cb): add an activate handler that returns a response OK if the OK response would be active. svn path=/trunk/; revision=19852
This commit is contained in:
@ -231,6 +231,22 @@ dialog_destroy_notify (void *data,
|
||||
dialog_data_destroy (dialog_data);
|
||||
}
|
||||
|
||||
static void
|
||||
folder_name_entry_activate_cb (GtkEntry *entry,
|
||||
void *data)
|
||||
{
|
||||
DialogData *dialog_data;
|
||||
const char *parent_path;
|
||||
|
||||
dialog_data = (DialogData *) data;
|
||||
|
||||
parent_path = e_storage_set_view_get_current_folder (E_STORAGE_SET_VIEW (dialog_data->storage_set_view));
|
||||
|
||||
if (parent_path != NULL
|
||||
&& GTK_ENTRY (dialog_data->folder_name_entry)->text_length > 0)
|
||||
gtk_dialog_response (GTK_DIALOG (dialog_data->dialog), GTK_RESPONSE_OK);
|
||||
}
|
||||
|
||||
static void
|
||||
folder_name_entry_changed_cb (GtkEditable *editable,
|
||||
void *data)
|
||||
@ -541,6 +557,9 @@ e_shell_show_folder_creation_dialog (EShell *shell,
|
||||
g_signal_connect (dialog_data->folder_name_entry, "changed",
|
||||
G_CALLBACK (folder_name_entry_changed_cb), dialog_data);
|
||||
|
||||
g_signal_connect (dialog_data->folder_name_entry, "activate",
|
||||
G_CALLBACK (folder_name_entry_activate_cb), dialog_data);
|
||||
|
||||
g_signal_connect (dialog_data->storage_set_view, "folder_selected",
|
||||
G_CALLBACK (storage_set_view_folder_selected_cb), dialog_data);
|
||||
|
||||
|
Reference in New Issue
Block a user