aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-selector.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-03-02 07:03:33 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-03-02 07:03:33 +0800
commit7d30dc9ea66f0019306f62af15eb576474cc321d (patch)
tree5948938889c01bb1717f7b924afd34b8074b3787 /mail/em-folder-selector.c
parentff18c9c70d7309713fa4483dd3707e9243b1af1a (diff)
downloadgsoc2013-evolution-7d30dc9ea66f0019306f62af15eb576474cc321d.tar.gz
gsoc2013-evolution-7d30dc9ea66f0019306f62af15eb576474cc321d.tar.zst
gsoc2013-evolution-7d30dc9ea66f0019306f62af15eb576474cc321d.zip
Connect to the folder-activated signal. (folder_activated_cb): Call
2004-03-01 Jeffrey Stedfast <fejj@ximian.com> * em-folder-selector.c (em_folder_selector_construct): Connect to the folder-activated signal. (folder_activated_cb): Call gtk_dialog_response() with GTK_RESPONSE_OK. Fixes bug #54793. * em-folder-tree.c (emft_tree_row_activated): New callback to emit the "folder-activated" signal which is needed to fix bug #54793. (emft_tree_button_press): Handle button1 double-clicks too (also for bug #54793). (emft_tree_button_press): On right-click, we also want to select the folder the user right-clicked on. Fixes bug #54772. svn path=/trunk/; revision=24928
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r--mail/em-folder-selector.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index aeafa1abfc..66792f1556 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -175,6 +175,12 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, EMFol
gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, TRUE);
}
+static void
+folder_activated_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs)
+{
+ gtk_dialog_response ((GtkDialog *) emfs, GTK_RESPONSE_OK);
+}
+
void
em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text)
{
@@ -204,6 +210,7 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
gtk_widget_show ((GtkWidget *) emft);
g_signal_connect (emfs->emft, "folder-selected", G_CALLBACK (folder_selected_cb), emfs);
+ g_signal_connect (emfs->emft, "folder-activated", G_CALLBACK (folder_activated_cb), emfs);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (emfs)->vbox), (GtkWidget *)emft, TRUE, TRUE, 6);
if (text != NULL) {
@@ -234,11 +241,11 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
{
if (emfs->name_entry->text_length > 0) {
const char *path, *text;
-
+
text = gtk_entry_get_text (emfs->name_entry);
path = em_folder_tree_get_selected_path (emfs->emft);
-
- if (text && path && !strchr(text, '/'))
+
+ if (text && path && !strchr (text, '/'))
g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK);
}
}