aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-client.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/evolution-shell-client.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/evolution-shell-client.c')
-rw-r--r--shell/evolution-shell-client.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c
index 10ba9ced93..5d48111c01 100644
--- a/shell/evolution-shell-client.c
+++ b/shell/evolution-shell-client.c
@@ -148,10 +148,25 @@ create_folder_selection_listener_interface (char **result,
return corba_interface;
}
+static int
+count_string_items (const char *list[])
+{
+ int i;
+
+ if (list == NULL)
+ return 0;
+
+ for (i = 0; list[i] != NULL; i++)
+ ;
+
+ return i;
+}
+
static void
user_select_folder (EvolutionShellClient *shell_client,
const char *title,
const char *default_folder,
+ const char *possible_types[],
char **uri_return,
char **physical_uri_return)
{
@@ -159,6 +174,8 @@ user_select_folder (EvolutionShellClient *shell_client,
Evolution_Shell corba_shell;
GMainLoop *main_loop;
CORBA_Environment ev;
+ Evolution_Shell_FolderTypeList corba_type_list;
+ int num_possible_types;
char *result;
result = NULL;
@@ -175,10 +192,15 @@ user_select_folder (EvolutionShellClient *shell_client,
corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
- g_print ("%s -- %p\n", __FUNCTION__, corba_shell);
+ num_possible_types = count_string_items (possible_types);
+
+ corba_type_list._length = num_possible_types;
+ corba_type_list._maximum = num_possible_types;
+ corba_type_list._buffer = possible_types;
Evolution_Shell_user_select_folder (corba_shell, listener_interface,
- title, default_folder, &ev);
+ title, default_folder, &corba_type_list,
+ &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
CORBA_exception_free (&ev);
@@ -301,6 +323,7 @@ void
evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client,
const char *title,
const char *default_folder,
+ const char *possible_types[],
char **uri_return,
char **physical_uri_return)
{
@@ -309,7 +332,8 @@ evolution_shell_client_user_select_folder (EvolutionShellClient *shell_client,
g_return_if_fail (title != NULL);
g_return_if_fail (default_folder != NULL);
- user_select_folder (shell_client, title, default_folder, uri_return, physical_uri_return);
+ user_select_folder (shell_client, title, default_folder, possible_types,
+ uri_return, physical_uri_return);
}