aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-gui-utils.h2
-rw-r--r--filter/ChangeLog5
-rw-r--r--filter/filter-arg-types.c3
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c3
-rw-r--r--shell/ChangeLog49
-rw-r--r--shell/Evolution-Shell.idl5
-rw-r--r--shell/e-shell-folder-selection-dialog.c126
-rw-r--r--shell/e-shell-folder-selection-dialog.h10
-rw-r--r--shell/e-shell-view-menu.c41
-rw-r--r--shell/e-shell.c95
-rw-r--r--shell/evolution-shell-client.c30
-rw-r--r--shell/evolution-shell-client.h1
-rw-r--r--widgets/misc/e-gui-utils.h2
15 files changed, 305 insertions, 78 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index ee942fa911..638c588038 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
+
+ * e-gui-utils.h: #include <libgnomeui/gnome-messagebox.h>. It's
+ needed to be able to pass an appropriate @type arg to
+ `e_notice()'.
+
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* e-canvas.c (e_canvas_init) : Init the InputContext members
diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h
index cffdbd1e4f..c1958879aa 100644
--- a/e-util/e-gui-utils.h
+++ b/e-util/e-gui-utils.h
@@ -4,6 +4,8 @@
#include <gtk/gtkmenu.h>
#include <gtk/gtkwindow.h>
+#include <libgnomeui/gnome-messagebox.h>
+
void e_popup_menu (GtkMenu *menu, GdkEventButton *event);
void e_auto_kill_popup_menu_on_hide (GtkMenu *menu);
void e_notice (GtkWindow *window, const char *type, const char *format, ...);
diff --git a/filter/ChangeLog b/filter/ChangeLog
index debe07c57c..9480f152c5 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
+
+ * filter-arg-types.c (arg_folder_edit_value): Only allow type
+ "mail" when selecting a folder for the filter.
+
2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
* filter-driver.c: Updated to reflect changes made to
diff --git a/filter/filter-arg-types.c b/filter/filter-arg-types.c
index afecb0bcde..914ab8343a 100644
--- a/filter/filter-arg-types.c
+++ b/filter/filter-arg-types.c
@@ -556,6 +556,7 @@ arg_folder_write_text(FilterArg *argin, GString *string)
static int
arg_folder_edit_value (FilterArg *arg, int index)
{
+ const char *allowed_types[] = { "mail", NULL };
char *def;
char *physical_uri;
@@ -569,7 +570,7 @@ arg_folder_edit_value (FilterArg *arg, int index)
evolution_shell_client_user_select_folder (global_shell_client,
_("Select Folder"),
- def, NULL, &physical_uri);
+ def, allowed_types, NULL, &physical_uri);
if (physical_uri != NULL && physical_uri[0] != '\0') {
GList *node;
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9ecaabb8ee..5c569ed639 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
+
+ * mail-ops.c (refile_msg): Only allow type "mail" in the folder
+ selection dialog.
+
2000-07-01 Dan Winship <danw@helixcode.com>
* pixmaps.h, pixmaps/*.xpm: Removed. These aren't being used any
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index efc41e5907..54288351fd 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -638,6 +638,7 @@ refile_msg (GtkWidget *button, gpointer user_data)
MessageList *ml = fb->message_list;
char *uri, *physical, *path;
struct refile_data rfd;
+ const char *allowed_types[] = { "mail", NULL };
extern EvolutionShellClient *global_shell_client;
static char *last;
@@ -647,7 +648,7 @@ refile_msg (GtkWidget *button, gpointer user_data)
evolution_shell_client_user_select_folder (global_shell_client,
_("Refile message(s) to"),
- last, &uri, &physical);
+ last, allowed_types, &uri, &physical);
if (!uri)
return;
diff --git a/shell/ChangeLog b/shell/ChangeLog
index a60a660b78..338c7798d6 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,54 @@
2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
+ * e-shell.c (impl_Shell_user_select_folder): New arg
+ @allowed_types. Pass it to the EShellFolderSelectionDialog.
+ Connect to the "cancelled" and "folder_selected" signals instead
+ of "clicked".
+ (corba_listener_destroy_notify): New callback.
+ (impl_Shell_user_select_folder): Associate it to the DestroyNotify
+ for the "corba_listener" GtkObject data, so we don't leak it.
+ (folder_selection_dialog_clicked_cb): Don't release the listener
+ interface here.
+ (folder_selection_dialog_cancelled_cb): New callback for the
+ "cancelled" signal.
+ (folder_selection_dialog_folder_selected_cb): New callback for the
+ "folder_selected" signal.
+
+ * e-shell-view-menu.c (command_goto_folder): Don't connect to
+ "clicked". Connect to "cancelled" and "folder_selected" instead.
+ (folder_selection_dialog_cancelled_cb): New, callback for the
+ "cancelled" signal.
+ (folder_selection_dialog_folder_selected_cb): New, callback for
+ the "folder_selected" signal.
+
+ * e-shell-folder-selection-dialog.c New members `allowed_types',
+ `storage_set' in `EShellFolderSelectionDialogPrivate'.
+ (class_init): Install signals "folder_selected", "cancelled".
+ (init): Init to NULL.
+ (impl_destroy): Free/unref them.
+ (e_shell_folder_selection_dialog_new): New arg @allowed_types.
+ (e_shell_folder_selection_dialog_construct): New arg
+ @allowed_types. Initialize `priv->allowed_types' from it.
+ (check_folder_type): New function. Check if the selected folder
+ is of the appropriate type and, if not, return FALSE and pop up an
+ error dialog. Otherwise, return TRUE.
+ (impl_clicked): Use `check_folder_type()' to check if the folder
+ type is OK. If it is not, stop emission of the "clicked" signal.
+
+ * e-shell-folder-selection-dialog.h: New signals
+ "folder_selected", "cancelled".
+
+ * evolution-shell-client.c
+ (evolution_shell_client_user_select_folder): New arg
+ @allowed_types.
+ (user_select_folder): New arg @allowed_types. Pass this to the
+ ::user_select_folder method.
+
+ * Evolution-Shell.idl: New arg @required_types in
+ ::user_select_folder.
+
+2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
+
* e-shell.c (setup_components): Don't ref the component registry.
2000-06-30 Dan Winship <danw@helixcode.com>
diff --git a/shell/Evolution-Shell.idl b/shell/Evolution-Shell.idl
index b1cfaefcc6..3b154cd191 100644
--- a/shell/Evolution-Shell.idl
+++ b/shell/Evolution-Shell.idl
@@ -22,10 +22,13 @@ module Evolution {
ShellComponent get_component_for_type (in string type)
raises (NotFound);
+ typedef sequence<string> FolderTypeList;
+
/* FIXME: Parent "transient_for" window. */
void user_select_folder (in FolderSelectionListener listener,
in string title,
- in string default_folder)
+ in string default_folder,
+ in FolderTypeList possible_types)
raises (Busy);
};
diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c
index 16e2c54fe6..95cc1d2141 100644
--- a/shell/e-shell-folder-selection-dialog.c
+++ b/shell/e-shell-folder-selection-dialog.c
@@ -29,6 +29,7 @@
#include <libgnomeui/gnome-dialog.h>
#include <libgnome/gnome-i18n.h>
+#include "e-util/e-gui-utils.h"
#include "e-util/e-util.h"
#include "widgets/misc/e-scroll-frame.h"
@@ -45,9 +46,57 @@ static GnomeDialogClass *parent_class = NULL;
struct _EShellFolderSelectionDialogPrivate {
EShell *shell;
+ GList *allowed_types;
+ EStorageSet *storage_set;
GtkWidget *storage_set_view;
};
+enum {
+ FOLDER_SELECTED,
+ CANCELLED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+
+static gboolean
+check_folder_type (EShellFolderSelectionDialog *folder_selection_dialog)
+{
+ EShellFolderSelectionDialogPrivate *priv;
+ const char *selected_path;
+ EFolder *folder;
+ const char *folder_type;
+ GList *p;
+
+ priv = folder_selection_dialog->priv;
+ if (priv->allowed_types == NULL)
+ return TRUE;
+
+ selected_path = e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog);
+ if (selected_path == NULL)
+ return FALSE;
+
+ folder = e_storage_set_get_folder (priv->storage_set, selected_path);
+ if (folder == NULL)
+ return FALSE;
+
+ folder_type = e_folder_get_type_string (folder);
+
+ for (p = priv->allowed_types; p != NULL; p = p->next) {
+ const char *type;
+
+ type = (const char *) p->data;
+ if (strcasecmp (folder_type, type) == 0)
+ return TRUE;
+ }
+
+ e_notice (GTK_WINDOW (folder_selection_dialog), GNOME_MESSAGE_BOX_ERROR,
+ _("The type of the selected folder is not valid for\nthe requested operation."));
+
+ return FALSE;
+}
+
/* GtkObject methods. */
@@ -60,6 +109,11 @@ impl_destroy (GtkObject *object)
folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (object);
priv = folder_selection_dialog->priv;
+ if (priv->storage_set != NULL)
+ gtk_object_unref (GTK_OBJECT (priv->storage_set));
+
+ e_free_string_list (priv->allowed_types);
+
g_free (priv);
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
@@ -74,27 +128,32 @@ impl_clicked (GnomeDialog *dialog,
{
EShellFolderSelectionDialog *folder_selection_dialog;
EShellFolderSelectionDialogPrivate *priv;
+ EStorageSetView *storage_set_view;
+ const char *default_parent_folder;
folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog);
priv = folder_selection_dialog->priv;
- /* Check for the "Add..." button. */
- if (button_number == 2) {
- EStorageSetView *storage_set_view;
- const char *default_parent_folder;
-
-#if 0
- /* (FIXME: The stupid GnomeDialog defines the "clicked" signal as
- GTK_RUN_LAST so this does not work. Grrr.) */
- /* We don't want the user of the widget to handle this directly. */
- gtk_signal_emit_stop_by_name (GTK_OBJECT (dialog), "clicked");
-#endif
-
+ switch (button_number) {
+ case 0: /* OK */
+ if (check_folder_type (folder_selection_dialog)) {
+ gtk_signal_emit (GTK_OBJECT (folder_selection_dialog), signals[FOLDER_SELECTED],
+ e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+ }
+ break;
+ case 1: /* Cancel */
+ gtk_signal_emit (GTK_OBJECT (folder_selection_dialog), signals[CANCELLED]);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+ break;
+ case 2: /* Add */
storage_set_view = E_STORAGE_SET_VIEW (priv->storage_set_view);
default_parent_folder = e_storage_set_view_get_current_folder (storage_set_view);
e_shell_show_folder_creation_dialog (priv->shell, GTK_WINDOW (dialog),
default_parent_folder);
+
+ break;
}
}
@@ -114,6 +173,25 @@ class_init (EShellFolderSelectionDialogClass *klass)
object_class->destroy = impl_destroy;
dialog_class->clicked = impl_clicked;
+
+ signals[FOLDER_SELECTED]
+ = gtk_signal_new ("folder_selected",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EShellFolderSelectionDialogClass, folder_selected),
+ gtk_marshal_NONE__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_STRING);
+
+ signals[CANCELLED]
+ = gtk_signal_new ("cancelled",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EShellFolderSelectionDialogClass, cancelled),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}
static void
@@ -123,7 +201,9 @@ init (EShellFolderSelectionDialog *shell_folder_selection_dialog)
priv = g_new (EShellFolderSelectionDialogPrivate, 1);
priv->shell = NULL;
+ priv->storage_set = NULL;
priv->storage_set_view = NULL;
+ priv->allowed_types = NULL;
shell_folder_selection_dialog->priv = priv;
}
@@ -133,11 +213,12 @@ void
e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_selection_dialog,
EShell *shell,
const char *title,
- const char *default_path)
+ const char *default_path,
+ const char *allowed_types[])
{
EShellFolderSelectionDialogPrivate *priv;
- EStorageSet *storage_set;
GtkWidget *scroll_frame;
+ int i;
g_return_if_fail (folder_selection_dialog != NULL);
g_return_if_fail (E_IS_SHELL_FOLDER_SELECTION_DIALOG (folder_selection_dialog));
@@ -164,11 +245,19 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (folder_selection_dialog));
- storage_set = e_shell_get_storage_set (shell);
+ priv->storage_set = e_shell_get_storage_set (shell);
+ gtk_object_ref (GTK_OBJECT (priv->storage_set));
- priv->storage_set_view = e_storage_set_new_view (storage_set);
+ priv->storage_set_view = e_storage_set_new_view (priv->storage_set);
GTK_WIDGET_SET_FLAGS (priv->storage_set_view, GTK_CAN_FOCUS);
+ g_assert (priv->allowed_types == NULL);
+ if (allowed_types != NULL) {
+ for (i = 0; allowed_types[i] != NULL; i++)
+ priv->allowed_types = g_list_prepend (priv->allowed_types,
+ g_strdup (allowed_types[i]));
+ }
+
e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (priv->storage_set_view),
default_path);
@@ -188,7 +277,8 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
GtkWidget *
e_shell_folder_selection_dialog_new (EShell *shell,
const char *title,
- const char *default_path)
+ const char *default_path,
+ const char *allowed_types[])
{
EShellFolderSelectionDialog *folder_selection_dialog;
@@ -197,7 +287,7 @@ e_shell_folder_selection_dialog_new (EShell *shell,
folder_selection_dialog = gtk_type_new (e_shell_folder_selection_dialog_get_type ());
e_shell_folder_selection_dialog_construct (folder_selection_dialog, shell,
- title, default_path);
+ title, default_path, allowed_types);
return GTK_WIDGET (folder_selection_dialog);
}
diff --git a/shell/e-shell-folder-selection-dialog.h b/shell/e-shell-folder-selection-dialog.h
index 29d96e4c61..2ddb98bafe 100644
--- a/shell/e-shell-folder-selection-dialog.h
+++ b/shell/e-shell-folder-selection-dialog.h
@@ -52,6 +52,10 @@ struct _EShellFolderSelectionDialog {
struct _EShellFolderSelectionDialogClass {
GnomeDialogClass parent_class;
+
+ void (* folder_selected) (EShellFolderSelectionDialog *folder_selection_dialog,
+ const char *path);
+ void (* cancelled) (EShellFolderSelectionDialog *folder_selection_dialog);
};
@@ -59,10 +63,12 @@ GtkType e_shell_folder_selection_dialog_get_type (void);
void e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_selection_dialog,
EShell *shell,
const char *title,
- const char *default_path);
+ const char *default_path,
+ const char *allowed_types[]);
GtkWidget *e_shell_folder_selection_dialog_new (EShell *shell,
const char *title,
- const char *default_path);
+ const char *default_path,
+ const char *allowed_types[]);
const char *e_shell_folder_selection_dialog_get_selected_path (EShellFolderSelectionDialog *folder_selection_dialog);
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);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 64eec8c9a2..f5ba300e3d 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -29,6 +29,7 @@
#include "Evolution.h"
+#include "e-util/e-gui-utils.h"
#include "e-util/e-util.h"
#include "e-component-registry.h"
@@ -91,51 +92,57 @@ static guint signals[LAST_SIGNAL] = { 0 };
/* Callback for the folder selection dialog. */
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;
Evolution_FolderSelectionListener listener;
+ CORBA_Environment ev;
+
+ listener = gtk_object_get_data (GTK_OBJECT (folder_selection_dialog), "corba_listener");
+
+ CORBA_exception_init (&ev);
+
+ Evolution_FolderSelectionListener_cancel (listener, &ev);
+
+ CORBA_exception_free (&ev);
+
+ gtk_widget_destroy (GTK_WIDGET (folder_selection_dialog));
+}
+
+static void
+folder_selection_dialog_folder_selected_cb (EShellFolderSelectionDialog *folder_selection_dialog,
+ const char *path,
+ void *data)
+{
+ CORBA_Environment ev;
EShell *shell;
+ Evolution_FolderSelectionListener listener;
EStorageSet *storage_set;
EFolder *folder;
- CORBA_Environment ev;
- const char *path;
char *uri;
- const char *physical_uri;
-
- if (button_number == 2)
- return;
+ char *physical_uri;
- folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog);
shell = E_SHELL (data);
- listener = gtk_object_get_data (GTK_OBJECT (dialog), "corba_listener");
+ listener = gtk_object_get_data (GTK_OBJECT (folder_selection_dialog), "corba_listener");
CORBA_exception_init (&ev);
- if (button_number == 0) {
- storage_set = e_shell_get_storage_set (shell);
- path = e_shell_folder_selection_dialog_get_selected_path (folder_selection_dialog),
- folder = e_storage_set_get_folder (storage_set, path);
+ storage_set = e_shell_get_storage_set (shell);
+ folder = e_storage_set_get_folder (storage_set, path);
- uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
+ uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL);
- if (folder == NULL || button_number == 1) /* Uh? */
- physical_uri = "";
- else
- physical_uri = e_folder_get_physical_uri (folder);
+ if (folder == NULL)
+ physical_uri = "";
+ else
+ physical_uri = e_folder_get_physical_uri (folder);
- Evolution_FolderSelectionListener_selected (listener, uri, physical_uri, &ev);
- g_free (uri);
- } else
- Evolution_FolderSelectionListener_cancel (listener, &ev);
+ Evolution_FolderSelectionListener_selected (listener, uri, physical_uri, &ev);
+ g_free (uri);
- CORBA_Object_release (listener, &ev);
CORBA_exception_free (&ev);
- if (button_number != -1)
- gnome_dialog_close(dialog);
+ gtk_widget_destroy (GTK_WIDGET (folder_selection_dialog));
}
@@ -195,27 +202,51 @@ impl_Shell_get_component_for_type (PortableServer_Servant servant,
}
static void
+corba_listener_destroy_notify (void *data)
+{
+ CORBA_Environment ev;
+ Evolution_FolderSelectionListener listener_interface;
+
+ listener_interface = (Evolution_FolderSelectionListener) data;
+
+ CORBA_exception_init (&ev);
+ CORBA_Object_release (listener_interface, &ev);
+ CORBA_exception_free (&ev);
+}
+
+static void
impl_Shell_user_select_folder (PortableServer_Servant servant,
const Evolution_FolderSelectionListener listener,
const CORBA_char *title,
const CORBA_char *default_folder,
+ const Evolution_Shell_FolderTypeList *corba_allowed_types,
CORBA_Environment *ev)
{
GtkWidget *folder_selection_dialog;
BonoboObject *bonobo_object;
Evolution_FolderSelectionListener listener_duplicate;
EShell *shell;
+ const char **allowed_types;
+ int i;
bonobo_object = bonobo_object_from_servant (servant);
shell = E_SHELL (bonobo_object);
- folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, title, default_folder);
+ allowed_types = alloca (sizeof (allowed_types[0]) * (corba_allowed_types->_length + 1));
+ for (i = 0; i < corba_allowed_types->_length; i++)
+ allowed_types[i] = corba_allowed_types->_buffer[i];
+ allowed_types[corba_allowed_types->_length] = NULL;
+
+ folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, title, default_folder, allowed_types);
listener_duplicate = CORBA_Object_duplicate (listener, ev);
- gtk_object_set_data (GTK_OBJECT (folder_selection_dialog), "corba_listener", listener_duplicate);
+ gtk_object_set_data_full (GTK_OBJECT (folder_selection_dialog), "corba_listener",
+ listener_duplicate, corba_listener_destroy_notify);
- gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "clicked",
- GTK_SIGNAL_FUNC (folder_selection_dialog_clicked_cb), shell);
+ gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "folder_selected",
+ GTK_SIGNAL_FUNC (folder_selection_dialog_folder_selected_cb), shell);
+ gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "cancelled",
+ GTK_SIGNAL_FUNC (folder_selection_dialog_cancelled_cb), shell);
gtk_widget_show (folder_selection_dialog);
}
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);
}
diff --git a/shell/evolution-shell-client.h b/shell/evolution-shell-client.h
index daf0c65e76..c9258574f7 100644
--- a/shell/evolution-shell-client.h
+++ b/shell/evolution-shell-client.h
@@ -67,6 +67,7 @@ EvolutionShellClient *evolution_shell_client_new (Evolution_Shel
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);
diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h
index cffdbd1e4f..c1958879aa 100644
--- a/widgets/misc/e-gui-utils.h
+++ b/widgets/misc/e-gui-utils.h
@@ -4,6 +4,8 @@
#include <gtk/gtkmenu.h>
#include <gtk/gtkwindow.h>
+#include <libgnomeui/gnome-messagebox.h>
+
void e_popup_menu (GtkMenu *menu, GdkEventButton *event);
void e_auto_kill_popup_menu_on_hide (GtkMenu *menu);
void e_notice (GtkWindow *window, const char *type, const char *format, ...);
'>| | Submitted by: mat * Update ruby-gems to 2.4.5swills2015-03-301-35/+0 | | | | | Note this is a big upgrade and the way gemspecs are generated changed. As a result, all patched gemspecs had to have new patches. * Fix broken curl_xml plugin.demon2015-03-291-0/+11 | | | | | | Obtained from upstream (https://github.com/collectd/collectd/issues/931) Approved by: maintainer * Add new OPTION for Varnish plugin support;demon2015-03-292-2/+16 | | | | | | | Fix plist entries for several plugins; PR: 198659 Submitted by: maintainer * Update to 1.3.3lme2015-03-2712-57/+163 | * Upgrade to 0.7.0vanilla2015-03-263-17/+3 | | | | | PR: 198906 Submitted by: maintainer * Correct paths to fping out of the boxfeld2015-03-252-3/+3 | | | | Submitted by: raf@verbiest.be * - Cleanup WRKSRC: leading v in GH_TAGNAME is removed from DISTNAME in r382120sunpoet2015-03-251-1/+0 | * 4 ports categories: Remove $PTHREAD_LIBSmarino2015-03-256-21/+8 | | | | | | Categories: www, ftp, net-im, net-mgmt approved by: PTHREAD blanket * Improve default file permissionsfeld2015-03-246-52/+31 | | | | | | Ensure unifi cannot write to itself in the event of an exploit Unifi only needs write access to: data, log, run, and work directories * Update to 4.6.0feld2015-03-243-289/+380 | * Update to 0.14.11.6000feld2015-03-245-1088/+1824 | | | | | | | | | | | Numerous fixes and enhancements: - Support for more functionality by default - @sample the config.php.default - Fix permissions issues - Default paths to utilities corrected PR: 193982 PR: 195919 * net-mgmt/tcptrack: Reset maintainer, it was accidently revertedmarino2015-03-241-1/+1 | | | | | | | bapt@ reset the maintainer on non-staged ports on 25 Aug 2014 (r366054), but pi@ accidently reverted that the same day (r366055). The PR it was based on was not submitted by the maintainer. Thus, I am resetting it again as it was intended. * Unbreak:mi2015-03-244-11/+190 | | | | | | | | | | | | | | | . Fix the ancient bug, which prevented this from being compiled with delightfully picky clang++ -- thus removing the GCC-requirement added by pi@ . Remove the author's curious attempts to impose stack-size limits on the various threads of this program -- this was, what caused the program to crash at run-time . Get rid of pkg-plist (which only had two files) anyway. . Declare the LICENSE (LGPL21) Bump PORTREVISION. Approved by: port being condemned for deletion * - changes dep from p5-CGI.pm to p5-CGIrodrigo2015-03-221-1/+2 | | | | | | | - bump port revision PR: 198762 Submitted by: pi * - Update to 0.8.2sunpoet2015-03-227-255/+3 | | | | Changes: https://github.com/Ettercap/ettercap/releases * - Convert to new USE_GITHUB usage and remove deprecated GH_COMMITsunpoet2015-03-222-3/+3 | * For the new USE_GITHUB with only GH_TAGNAME set default DISTNAME tobdrewery2015-03-211-2/+2 | | | | | | | | | | include GH_PROJECT/GH_ACCOUNT/GH_TAGNAME. This prevents the distfile having the same name despite changing one of these values and causing a bad checksum. Differential Revision: https://reviews.freebsd.org/D2103 Reviewed by: mat With hat: bdrewery * Convert to new @dir formatbdrewery2015-03-201-3/+0 | * Fix the new USE_GITHUB to rename the distfile such that it does notbdrewery2015-03-201-2/+2 | | | | | | | | | | | | conflict with the old scheme and cause a "reroll" or "invalid checksums". This also avoids clobbering the FreeBSD distcache. Use a revision in the DISTNAME for USE_GITHUB in case we need to bump this again for anything. It's more a hint of how to handle it in the future. Reported by: mat Discused with: mat, antoine, swills With hat: portmgr * Convert to the new USE_GITHUB.mat2015-03-202-5/+4 | | | | Sponsored by: Absolight * Update to 3.2feld2015-03-203-11/+13 | | | | http://www.shrubbery.net/rancid/CHANGES * Update USE_GITHUB so it does not require GH_COMMIT.bdrewery2015-03-202-2/+2 | | | | | | | | | | | | | | | | | Using this new scheme allows only setting the _tag_ or _commit hash_ in GH_TAGNAME and not having to know the hash for a tag. This scheme will download a tarball that has a different checksum than before due to a changed directory name for extraction. The following MASTER_SITES are provided to retain the old checksum and directory structure (that require GH_COMMIT): GH -> GHL GITHUB -> GITHUB_LEGACY Differential Revision: https://reviews.freebsd.org/D748 Submitted by: amdmi3 Reviewed by: mat, swills, antoine, bdrewery With hat: portmgr * On head do not build deprecated IPV6-MIB implementations in mibII/ipv6.c,glebius2015-03-191-2/+6 | | | | | | | | | | | | | now superseeded by the INET-XXX-MIB versions. And no need for _WANT_IFADDR hack now. This fixes build on head, since cuts away the main kvm(3) abuser from net-snmp. Discussion: http://sourceforge.net/p/net-snmp/mailman/message/33539005/ Sponsored by: Netflix Sponsored by: Nginx, Inc. Approved by: zi * Add CPE.mat2015-03-182-2/+2 | | | | Sponsored by: Absolight * net-mgmt/ndoutils: Not jobs safemarino2015-03-171-0/+2 | | | | It tries to use an object file before it's built (io.o). * Upgrade to 2.031012.vanilla2015-03-1615-633/+745 | | | | | PR: 198309 Submitted by: maintainer * - Fix build on 8.4.vsevolod2015-03-161-0/+25 | | | | | | - Do not bump portrevision: package is unchanged Submitted by: Eugene Grossbein via IRC * net-mgmt/zabbix24-server: update 2.4.3 -> 2.4.4robak2015-03-163-3/+5 | | | | | PR: 198005 Submitted by: Pakhom Golynga <pakhom706@gmail.com> * Fix rc scriptrodrigo2015-03-162-2/+1 | | | | | | | Bump port revision PR: 198571 Submitted by: <jason.unovitch@gmail.com> * - Fix USE_LDCONFIGsunpoet2015-03-131-2/+1 | * fix accidental use of WWWGRP in filename www_server.*. No need to bump ↵girgen2015-03-131-3/+3 | | | | pkgversion, since it is a noop unless the WWWGRP is modified, and if it is, the port breaks * - Update MAINTAINER: use @FreeBSD.orgsunpoet2015-03-132-2/+2 | * Update to 2.1.1.mat2015-03-117-16/+16 | | | | Sponsored by: Absolight * Fix a segfault in check_dhcp.mat2015-03-104-2/+20 | | | | | | PR: 198318 Submitted by: Ian Pallfreeman Sponsored by: Absolight * - Update to 3.26jadawin2015-03-092-3/+3 | * Previous patch for xymonproxy didn't land in the files dirfeld2015-03-092-1/+1 | * Initial import of net-mgmt/dhcp_probe, a tool toriggs2015-03-0818-0/+523 | | | | | | | discover DHCP and BootP servers on a network PR: 197162 Submitted by: khung@nullaxiom.com (maintainer) * - Use github for port fetchingvsevolod2015-03-045-216/+9 | | | | | | | | - Remove included patches - Add patch to lock pcbinfo hash [1] - Update version to 20150304 Submitted by: Eugene Grossbein via IRC [1] * - Drop @dirrm* from plistamdmi32015-03-041-28/+4 | * Update net-mgmt/collectd5 to 5.4.2brd2015-03-044-31/+19 | | | | | | PR: 198205 Submitted by: brd Approved by: zi (mentor) * - Replace deprecated des_* methods with DES_* onessunpoet2015-03-031-0/+46 | | | | | | PR: 198184 Submitted by: Bernard Spil <spil.oss@gmail.com> Obtained from: https://github.com/Ettercap/ettercap/commit/f71cd222712d6ecec6f086f3b8acca981e25f819 * Cleanup plistbapt2015-03-031-1/+1 | * Cleanup plist from @unexec rmdir and @dirrm*bapt2015-03-032-78/+11 | * Remove Author from pkg-descr and white space fixesbapt2015-03-0314-37/+21 | * - Add LICENSE_FILEamdmi32015-03-022-7/+3 | | | | - Switch to @sample * net-mgmt/seafile-gui: Upgrade version 3.1.5 => 4.1.0marino2015-03-023-33/+28 | | | | | PR: 197984 Submitted by: maintainer (Jingfeng Yan) * net-mgmt/seafile: Upgrade version 3.1.4 => 4.0.6marino2015-03-0215-150/+204 | | | | | PR: 197980 Submitted by: maintainer (JingFeng Yan) * net-mgmt/ccnet: Upgrade version 3.1.4 => 4.0.6marino2015-03-0212-158/+119 | | | | | PR: 197979 Submitted by: maintainer (JingFeng Yan) * Deprecate ports broken for more than 6 monthsantoine2015-02-281-0/+2 | * New port: net-mgmt/riemannpi2015-02-286-0/+149 | | | | | | | | | | | | | | | | | Riemann monitors low-latency, transient shared state for systems with many moving parts. Riemann aggregates events from your servers and applications with a powerful stream processing language. Send an email for every exception raised by your code. Track the latency distribution of your web app. See the top processes on any host, by memory and CPU. Combine statistics from every Riak node in your cluster and forward to Graphite. Send alerts when a key process fails to check in. Know how many users signed up right this second. WWW: http://riemann.io/ PR: 197403 Submitted by: Dave Cottlehuber <dch@skunkwerks.at> * - Fix shebangsamdmi32015-02-282-8/+8 | | | | | | | | | | | - Add bash and perl to run-depends since this port installs scripts written in these - Drop @dirrm* from plist - Remove documentation file from plist it is handled by PORTDOCS - Add LICENSE_FILE PR: 197224 Submitted by: amdmi3 Approved by: maintainer timeout * The new stop_postcmd was too broad and could kill xymon-server if it wasfeld2015-02-272-2/+2 | | | | running on the same host as xymon-client * - Update to 3.25jadawin2015-02-262-3/+3 | * Fix typo that slipped in previous rc script patchfeld2015-02-242-2/+2 | | | | | | Pointyhat -> me PR: 197827 * net-mgmt/seafile: relocate python filesmarino2015-02-232-91/+99 | | | | | PR: 196922 Submitted by: maintainer (JingFeng Yan) * net-mgmt/ccnet: Add support for LDAPmarino2015-02-232-65/+81 | | | | | PR: 196866 Submitted by: maintainer (JingFeng Yan) * Upgrade smokeping to 2.6.11rodrigo2015-02-237-54/+124 | | | | | PR: 197579 Submitted by: pi * Execute the xymonlaunch process directly. The supplied runclient.shfeld2015-02-222-5/+43 | | | | | | | | | | | script duplicates much of the rc script and adds unnecessary complexity. While here ensure that leftover processes are cleaned up. This also fixes a recent regression which prevented xymon-client from reliably starting on boot. PR: 197827 * - Import upstream patches:sunpoet2015-02-215-0/+206 | | | | | | | | | | | - Fix when determine MTU on BSD system [1] - Reset logfile ownership upon dropping privileges [2] - Bump PORTREVISION for package change PR: 197509 [2] Submitted by: Rafal Grzeszczuk <rafi.root@gmail.com> [2] Obtained from: https://github.com/Ettercap/ettercap/commit/00f864d7dd2d82b640064db81aad065794b9b11b [1] https://github.com/Ettercap/ettercap/commit/42600aada0ba56b9c63dabcc2b0cb1417fa27863 [2] * - Bring back lost patch to fix memory usage calculationszi2015-02-202-1/+12 | | | | | | - Bump PORTREVISION PR: 148339 * Assign RUN_DEPENDS properly. Apply shebangfix to fix a "/usr/bin/perl",adamw2015-02-202-4/+5 | | | | and remove a @dirrmtry from the plist. * - Update to 3.24jadawin2015-02-202-3/+3 | * - Update to 1.18jadawin2015-02-202-4/+3 | * There is no PKGNAMESUFFIX helper.mat2015-02-201-1/+0 | | | | Sponsored by: Absolight * - Fix error in previous patch that was causing threads to be included in the ↵zi2015-02-182-3/+3 | | | | | | process count - Bump PORTREVISION * Add patch to improve xymonproxy reliability on FreeBSDfeld2015-02-182-1/+12 | * - Add JAIL OPTION to build with options that are happy for running snmpd ↵zi2015-02-181-1/+8 | | | | | | | within a jail(8) PR: 197763 Submitted by: Athanasios Douitsis <aduitsis@gmail.com> * Add a couple of patches to fix the number of workers and CPU load.mat2015-02-1715-20/+58 | | | | | | | | While there, regen patches, and update pkg-message to apache 2.4. PR: 197204 Submitted by: Rudolf Čejka Sponsored by: Absolight * Update to 4.075.adamw2015-02-173-8/+5 | | | | | | | | Changes: https://metacpan.org/changes/distribution/NetAddr-IP PR: 197014 Submitted by: Sergei Vyshenski Approved by: maintainer (implicit) * Update to 1.12.2lme2015-02-162-3/+3 | * - Fix hrSystemProcesses regressionzi2015-02-132-1/+97 | | | | | | | | - Bump PORTREVISION PR: 197124 Submitted by: Lukasz Wasikowski <lukasz@wasikowski.net> Obtained from: upstream: https://sourceforge.net/p/net-snmp/bugs/2595/ * Chown needs to be using ${xymon_client_user}feld2015-02-091-1/+1 | | | | Pointyhat -> me * Add a start_precmd to guarantee that client logs are owned by the correct userfeld2015-02-092-4/+5 | * Do not patch Makefile.am to prevent running automake during buildantoine2015-02-092-38/+1 | | | | (Makefile.in is already patched) * Update to 2.2.4lme2015-02-082-3/+3 | * Update to 3.2.10feld2015-02-083-17/+17 | * Use XYMONUSER variable instead of USERS in the rc scriptfeld2015-02-062-3/+3 | * net-mgmt/flowviewer: Add 3 sample config files (not with @sample though)marino2015-02-063-8/+12 | | | | | | PR: 196013 Submitted by: timp87 (gmail) Approved by: maintainer timeout (2 months) * Xymon-client was not completely dropping privileges at startup.feld2015-02-062-7/+8 | | | | | | | | | | | | | While xymon-client knows internally what UID it should run as, a design flaw in the rc script was still launching its master process as root. As a result the following two processes were always running as root instead of the xymon user: /usr/local/www/xymon/client/bin/xymonlaunch ... sh -c vmstat 300 2 ... The rest of the processes the xymon-client runs such as df, netstat, top, custom scripts, etc were correctly executing as non-root. * Add lldp, an implementation of the LLDP industry protocolrodrigo2015-02-068-0/+134 | | | | | | PR: 189824 Submitted by: freebsd@simweb.ch Reviewed by: danfe * Cleanup plistbapt2015-02-058-12/+0 | * - Upgrade to 0.35vg2015-02-053-1030/+1735 | * - Don't break directory permissions - fixes build from non-rootamdmi32015-02-042-3/+5 | | | | | - Silence post-extract - Strip binary * Upstream re-rolled 4.3.18 releasefeld2015-02-044-9/+8 | * - update to 2.0jgh2015-02-033-20/+13 | * - address pkg-plist, and bump PORTREVISION [1]jgh2015-02-032-7/+60 | | | | | | | | - attach LICENSE - define INSTALLS_ICONS PR: 197243 [1] Submitted by: amdmi3@ [1] * - Switch to @sampleamdmi32015-02-021-38/+1 | | | | | | - Drop @dirrm* from plist Approved by: portmgr blanket * - Drop @dirrm* from and add empty directories to pkg-plistsamdmi32015-02-02