aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view-menu.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-07-02 12:46:36 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-07-02 12:46:36 +0800
commitfbc6a557a6d394fb9749cac6e739b6de63752b74 (patch)
tree48a6c2d982c2075019ecc024864b72a97a829c10 /shell/e-shell-view-menu.c
parenta84feecf5bb608d4b05f43f353d83041670f8f41 (diff)
downloadgsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar.gz
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar.bz2
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar.lz
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar.xz
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.tar.zst
gsoc2013-evolution-fbc6a557a6d394fb9749cac6e739b6de63752b74.zip
Added an extra @allowed_types parameter to the shell's folder
selection dialog, and update the code that uses it accordingly. svn path=/trunk/; revision=3854
Diffstat (limited to 'shell/e-shell-view-menu.c')
-rw-r--r--shell/e-shell-view-menu.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 391a216823..d47b15b0aa 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -249,32 +249,31 @@ command_new_folder (BonoboUIHandler *uih,
/* Going to a folder. */
static void
-folder_selection_dialog_clicked_cb (GnomeDialog *dialog,
- int button_number,
- void *data)
+folder_selection_dialog_cancelled_cb (EShellFolderSelectionDialog *folder_selection_dialog,
+ void *data)
{
- EShellFolderSelectionDialog *folder_selection_dialog;
EShellView *shell_view;
shell_view = E_SHELL_VIEW (data);
- folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog);
- if (button_number != 0 /* OK */ && button_number != 1 /* Cancel */)
- return;
+ gtk_widget_destroy (GTK_WIDGET (folder_selection_dialog));
+}
- if (button_number == 0 /* OK */) {
- const char *path;
+static void
+folder_selection_dialog_folder_selected_cb (EShellFolderSelectionDialog *folder_selection_dialog,
+ const char *path,
+ void *data)
+{
+ if (path != NULL) {
+ EShellView *shell_view;
+ char *uri;
- path = e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog);
- if (path != NULL) {
- char *uri;
+ shell_view = E_SHELL_VIEW (data);
- uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
- e_shell_view_display_uri (shell_view, uri);
- }
+ uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
+ e_shell_view_display_uri (shell_view, uri);
+ g_free (uri);
}
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
}
static void
@@ -300,10 +299,12 @@ command_goto_folder (BonoboUIHandler *uih,
folder_selection_dialog = e_shell_folder_selection_dialog_new (shell,
_("Go to folder..."),
- default_folder);
+ default_folder, NULL);
- gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "clicked",
- GTK_SIGNAL_FUNC (folder_selection_dialog_clicked_cb), shell_view);
+ gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "folder_selected",
+ GTK_SIGNAL_FUNC (folder_selection_dialog_folder_selected_cb), shell_view);
+ gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "cancelled",
+ GTK_SIGNAL_FUNC (folder_selection_dialog_cancelled_cb), shell_view);
gtk_widget_show (folder_selection_dialog);
}