aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-corba-storage.c43
-rw-r--r--shell/e-shell-shared-folder-picker-dialog.c24
-rw-r--r--shell/glade/e-shell-shared-folder-picker-dialog.glade73
4 files changed, 103 insertions, 46 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index ce8dd95929..74736257ea 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-21 Christopher James Lahey <clahey@ximian.com>
+
+ * e-corba-storage.c (async_open_folder_idle): Do async_open_folder
+ in an idle callback.
+
+ * e-shell-shared-folder-picker-dialog.c (user_clicked),
+ glade/e-shell-shared-folder-picker-dialog.glade: Added a select
+ names button here.
+
2002-05-20 Chris Toshok <toshok@ximian.com>
* evolution-folder-selector-button.c (clicked): set the parent
diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c
index 8caaac7776..0dd61461df 100644
--- a/shell/e-corba-storage.c
+++ b/shell/e-corba-storage.c
@@ -262,6 +262,8 @@ destroy (GtkObject *object)
g_free (priv);
+ corba_storage->priv = NULL;
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -455,21 +457,44 @@ async_xfer_folder (EStorage *storage,
CORBA_exception_free (&ev);
}
-static void
-async_open_folder (EStorage *storage,
- const char *path)
+static gboolean
+async_open_folder_idle (gpointer data)
{
+ gpointer *pair = data;
+
+ EStorage *storage = pair[0];
+ char *path = pair[1];
+
ECorbaStorage *corba_storage;
- ECorbaStoragePrivate *priv;
CORBA_Environment ev;
corba_storage = E_CORBA_STORAGE (storage);
- priv = corba_storage->priv;
- CORBA_exception_init (&ev);
- GNOME_Evolution_Storage_asyncOpenFolder (priv->storage_interface,
- path, &ev);
- CORBA_exception_free (&ev);
+ if (corba_storage->priv != NULL) {
+
+ CORBA_exception_init (&ev);
+ GNOME_Evolution_Storage_asyncOpenFolder (corba_storage->priv->storage_interface,
+ path, &ev);
+ CORBA_exception_free (&ev);
+ }
+
+ gtk_object_unref (GTK_OBJECT (storage));
+ g_free (path);
+ g_free (pair);
+
+ return FALSE;
+}
+
+static void
+async_open_folder (EStorage *storage,
+ const char *path)
+{
+ gpointer *pair = g_new (gpointer, 2);
+ pair[0] = storage;
+ gtk_object_ref (GTK_OBJECT (storage));
+ pair[1] = g_strdup (path);
+
+ g_idle_add (async_open_folder_idle, pair);
}
diff --git a/shell/e-shell-shared-folder-picker-dialog.c b/shell/e-shell-shared-folder-picker-dialog.c
index 9dfca186bd..c2a5c02160 100644
--- a/shell/e-shell-shared-folder-picker-dialog.c
+++ b/shell/e-shell-shared-folder-picker-dialog.c
@@ -80,6 +80,20 @@ setup_folder_name_combo (GladeXML *glade_xml)
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), "Calendar");
}
+static void
+user_clicked (GtkWidget *button, GNOME_Evolution_Addressbook_SelectNames corba_iface)
+{
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+ GNOME_Evolution_Addressbook_SelectNames_activateDialog (corba_iface, "User", &ev);
+
+ if (BONOBO_EX (&ev)) {
+ g_warning ("Cannot activate SelectNames dialog -- %s", BONOBO_EX_ID (&ev));
+ }
+ CORBA_exception_free (&ev);
+}
+
static GtkWidget *
setup_name_selector (GladeXML *glade_xml)
{
@@ -88,6 +102,7 @@ setup_name_selector (GladeXML *glade_xml)
CORBA_Environment ev;
GtkWidget *placeholder;
GtkWidget *control_widget;
+ GtkWidget *button;
placeholder = glade_xml_get_widget (glade_xml, "user-picker-placeholder");
g_assert (GTK_IS_CONTAINER (placeholder));
@@ -118,6 +133,10 @@ setup_name_selector (GladeXML *glade_xml)
gtk_container_add (GTK_CONTAINER (placeholder), control_widget);
gtk_widget_show (control_widget);
+ button = glade_xml_get_widget (glade_xml, "button-user");
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ user_clicked, corba_iface);
+
CORBA_exception_free (&ev);
return control_widget;
@@ -214,13 +233,16 @@ show_dialog (EShell *shell,
EShellView *parent,
char **user_email_address_return,
char **storage_name_return,
- char **folder_name_return)
+ char **folder_name_return/*,
+ char **mailbox_name_return*/)
{
GladeXML *glade_xml;
GtkWidget *dialog;
GtkWidget *name_selector_widget;
GtkWidget *folder_name_entry;
int button_num;
+ /* GNOME_Evolution_Addressbook_SimpleCardList *simple_card_list;*/
+
glade_xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-shell-shared-folder-picker-dialog.glade",
NULL);
diff --git a/shell/glade/e-shell-shared-folder-picker-dialog.glade b/shell/glade/e-shell-shared-folder-picker-dialog.glade
index 0275f66a0e..9d8d7c0ec4 100644
--- a/shell/glade/e-shell-shared-folder-picker-dialog.glade
+++ b/shell/glade/e-shell-shared-folder-picker-dialog.glade
@@ -2,15 +2,18 @@
<GTK-Interface>
<project>
- <name>Project1</name>
- <program_name>project1</program_name>
- <directory>../../../../home/ettore/Projects/project1</directory>
- <source_directory>../../../../home/ettore/Projects/project1/src</source_directory>
- <pixmaps_directory>../../../../home/ettore/Projects/project1/pixmaps</pixmaps_directory>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
<language>C</language>
<gnome_support>True</gnome_support>
<gettext_support>True</gettext_support>
- <translatable_strings_file>../../../../home/ettore/Projects/project1</translatable_strings_file>
+ <use_widget_names>True</use_widget_names>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
+ <backup_source_files>False</backup_source_files>
+ <gnome_help_support>True</gnome_help_support>
</project>
<widget>
@@ -137,13 +140,14 @@
<widget>
<class>GtkLabel</class>
<name>label1</name>
- <label>Server:</label>
+ <label>_Server:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <focus_target>server-option-menu</focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -162,40 +166,15 @@
<widget>
<class>GtkLabel</class>
- <name>label2</name>
- <label>User:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
<name>label3</name>
- <label>Folder Name:</label>
+ <label>_Folder Name:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <focus_target>folder-name-entry</focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@@ -294,6 +273,28 @@
<class>Placeholder</class>
</widget>
</widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button-user</name>
+ <can_focus>True</can_focus>
+ <label>_User:</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
</widget>
</widget>
</widget>