No more @default_type arg to e_shell_folder_selection_dialog_new().
* e-shell.c (impl_Shell_selectUserFolder): No more @default_type arg to e_shell_folder_selection_dialog_new(). * e-shell-view-menu.c (command_goto_folder): No more @default_type arg to e_shell_folder_selection_dialog_new(). (command_new_shortcut): Likewise. * e-shell-importer.c (import_druid_finish): No more @default_type arg to e_shell_folder_selection_dialog_new(). * e-shell-folder-commands.c (e_shell_command_move_folder): No more @default_type arg to e_shell_folder_selection_dialog_new(). (e_shell_command_copy_folder): Likewise. * e-shell-folder-selection-dialog.c: Removed default_type member in EShellFolderSelectionDialogPrivate. (e_shell_folder_selection_dialog_new): Removed @default_type arg. (e_shell_folder_selection_dialog_construct): Likewise. (impl_clicked): Just pass the first of the allowed types to e_shell_show_folder_creation_dialog() for the default type. * evolution-shell-client.c (user_select_folder): No more @default_type arg to the ::userSelectFolder CORBA method. * Evolution-Shell.idl (selectUserFolder): Remove arg @default_type. svn path=/trunk/; revision=16983
This commit is contained in:
@ -1,3 +1,32 @@
|
|||||||
|
2002-05-22 Ettore Perazzoli <ettore@ximian.com>
|
||||||
|
|
||||||
|
* e-shell.c (impl_Shell_selectUserFolder): No more @default_type
|
||||||
|
arg to e_shell_folder_selection_dialog_new().
|
||||||
|
|
||||||
|
* e-shell-view-menu.c (command_goto_folder): No more @default_type
|
||||||
|
arg to e_shell_folder_selection_dialog_new().
|
||||||
|
(command_new_shortcut): Likewise.
|
||||||
|
|
||||||
|
* e-shell-importer.c (import_druid_finish): No more @default_type
|
||||||
|
arg to e_shell_folder_selection_dialog_new().
|
||||||
|
|
||||||
|
* e-shell-folder-commands.c (e_shell_command_move_folder): No more
|
||||||
|
@default_type arg to e_shell_folder_selection_dialog_new().
|
||||||
|
(e_shell_command_copy_folder): Likewise.
|
||||||
|
|
||||||
|
* e-shell-folder-selection-dialog.c: Removed default_type member
|
||||||
|
in EShellFolderSelectionDialogPrivate.
|
||||||
|
(e_shell_folder_selection_dialog_new): Removed @default_type arg.
|
||||||
|
(e_shell_folder_selection_dialog_construct): Likewise.
|
||||||
|
(impl_clicked): Just pass the first of the allowed types to
|
||||||
|
e_shell_show_folder_creation_dialog() for the default type.
|
||||||
|
|
||||||
|
* evolution-shell-client.c (user_select_folder): No more
|
||||||
|
@default_type arg to the ::userSelectFolder CORBA method.
|
||||||
|
|
||||||
|
* Evolution-Shell.idl (selectUserFolder): Remove arg
|
||||||
|
@default_type.
|
||||||
|
|
||||||
2002-05-22 Ettore Perazzoli <ettore@ximian.com>
|
2002-05-22 Ettore Perazzoli <ettore@ximian.com>
|
||||||
|
|
||||||
* main.c (view_map_callback): New callback for when the first
|
* main.c (view_map_callback): New callback for when the first
|
||||||
|
@ -94,8 +94,7 @@ module Evolution {
|
|||||||
in FolderSelectionListener listener,
|
in FolderSelectionListener listener,
|
||||||
in string title,
|
in string title,
|
||||||
in string default_folder,
|
in string default_folder,
|
||||||
in FolderTypeNameList possible_types,
|
in FolderTypeNameList possible_types)
|
||||||
in string default_type)
|
|
||||||
raises (NotReady, Busy);
|
raises (NotReady, Busy);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -322,11 +322,8 @@ e_shell_command_copy_folder (EShell *shell,
|
|||||||
get_folder_name (shell, folder_path));
|
get_folder_name (shell, folder_path));
|
||||||
|
|
||||||
uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
|
uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
|
||||||
folder_selection_dialog = e_shell_folder_selection_dialog_new (shell,
|
folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, _("Copy folder"),
|
||||||
_("Copy folder"),
|
caption, uri, NULL);
|
||||||
caption,
|
|
||||||
uri,
|
|
||||||
NULL, NULL);
|
|
||||||
|
|
||||||
g_free (caption);
|
g_free (caption);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
@ -369,11 +366,8 @@ e_shell_command_move_folder (EShell *shell,
|
|||||||
get_folder_name (shell, folder_path));
|
get_folder_name (shell, folder_path));
|
||||||
|
|
||||||
uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
|
uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
|
||||||
folder_selection_dialog = e_shell_folder_selection_dialog_new (shell,
|
folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, _("Move folder"),
|
||||||
_("Move folder"),
|
caption, uri, NULL);
|
||||||
caption,
|
|
||||||
uri,
|
|
||||||
NULL, NULL);
|
|
||||||
|
|
||||||
g_free (caption);
|
g_free (caption);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
@ -49,7 +49,6 @@ struct _EShellFolderSelectionDialogPrivate {
|
|||||||
GList *allowed_types;
|
GList *allowed_types;
|
||||||
EStorageSet *storage_set;
|
EStorageSet *storage_set;
|
||||||
GtkWidget *storage_set_view;
|
GtkWidget *storage_set_view;
|
||||||
char *default_type;
|
|
||||||
|
|
||||||
gboolean allow_creation;
|
gboolean allow_creation;
|
||||||
};
|
};
|
||||||
@ -160,7 +159,6 @@ impl_destroy (GtkObject *object)
|
|||||||
|
|
||||||
e_free_string_list (priv->allowed_types);
|
e_free_string_list (priv->allowed_types);
|
||||||
|
|
||||||
g_free (priv->default_type);
|
|
||||||
g_free (priv);
|
g_free (priv);
|
||||||
|
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
||||||
@ -201,6 +199,7 @@ impl_clicked (GnomeDialog *dialog,
|
|||||||
EShellFolderSelectionDialogPrivate *priv;
|
EShellFolderSelectionDialogPrivate *priv;
|
||||||
EStorageSetView *storage_set_view;
|
EStorageSetView *storage_set_view;
|
||||||
const char *default_parent_folder;
|
const char *default_parent_folder;
|
||||||
|
const char *default_type;
|
||||||
|
|
||||||
folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog);
|
folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog);
|
||||||
priv = folder_selection_dialog->priv;
|
priv = folder_selection_dialog->priv;
|
||||||
@ -221,9 +220,17 @@ impl_clicked (GnomeDialog *dialog,
|
|||||||
storage_set_view = E_STORAGE_SET_VIEW (priv->storage_set_view);
|
storage_set_view = E_STORAGE_SET_VIEW (priv->storage_set_view);
|
||||||
default_parent_folder = e_storage_set_view_get_current_folder (storage_set_view);
|
default_parent_folder = e_storage_set_view_get_current_folder (storage_set_view);
|
||||||
|
|
||||||
|
/* The default type in the folder creation dialog will be the
|
||||||
|
first of the allowed types. If all types are allowed,
|
||||||
|
hardcode to "mail". */
|
||||||
|
if (priv->allowed_types == NULL)
|
||||||
|
default_type = "mail";
|
||||||
|
else
|
||||||
|
default_type = (const char *) priv->allowed_types->data;
|
||||||
|
|
||||||
e_shell_show_folder_creation_dialog (priv->shell, GTK_WINDOW (dialog),
|
e_shell_show_folder_creation_dialog (priv->shell, GTK_WINDOW (dialog),
|
||||||
default_parent_folder,
|
default_parent_folder,
|
||||||
priv->default_type,
|
(const char *) priv->allowed_types->data,
|
||||||
folder_creation_dialog_result_cb,
|
folder_creation_dialog_result_cb,
|
||||||
dialog);
|
dialog);
|
||||||
|
|
||||||
@ -279,7 +286,6 @@ init (EShellFolderSelectionDialog *shell_folder_selection_dialog)
|
|||||||
priv->storage_set_view = NULL;
|
priv->storage_set_view = NULL;
|
||||||
priv->allowed_types = NULL;
|
priv->allowed_types = NULL;
|
||||||
priv->allow_creation = TRUE;
|
priv->allow_creation = TRUE;
|
||||||
priv->default_type = NULL;
|
|
||||||
|
|
||||||
shell_folder_selection_dialog->priv = priv;
|
shell_folder_selection_dialog->priv = priv;
|
||||||
}
|
}
|
||||||
@ -331,8 +337,6 @@ folder_selected_cb (EStorageSetView *storage_set_view,
|
|||||||
* @caption: A brief text to be put on top of the storage view
|
* @caption: A brief text to be put on top of the storage view
|
||||||
* @default_uri: The URI of the folder to be selected by default
|
* @default_uri: The URI of the folder to be selected by default
|
||||||
* @allowed_types: List of the names of the allowed types
|
* @allowed_types: List of the names of the allowed types
|
||||||
* @default_type: The default type of folder that will be created if the
|
|
||||||
* New folder button is pressed.
|
|
||||||
*
|
*
|
||||||
* Construct @folder_selection_dialog.
|
* Construct @folder_selection_dialog.
|
||||||
**/
|
**/
|
||||||
@ -342,8 +346,7 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
|
|||||||
const char *title,
|
const char *title,
|
||||||
const char *caption,
|
const char *caption,
|
||||||
const char *default_uri,
|
const char *default_uri,
|
||||||
const char *allowed_types[],
|
const char *allowed_types[])
|
||||||
const char *default_type)
|
|
||||||
{
|
{
|
||||||
EShellFolderSelectionDialogPrivate *priv;
|
EShellFolderSelectionDialogPrivate *priv;
|
||||||
GtkWidget *scroll_frame;
|
GtkWidget *scroll_frame;
|
||||||
@ -358,11 +361,6 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
|
|||||||
|
|
||||||
priv = folder_selection_dialog->priv;
|
priv = folder_selection_dialog->priv;
|
||||||
|
|
||||||
if (default_type != NULL && *default_type != 0) {
|
|
||||||
priv->default_type = g_strdup (default_type);
|
|
||||||
} else {
|
|
||||||
priv->default_type = NULL;
|
|
||||||
}
|
|
||||||
/* Basic dialog setup. */
|
/* Basic dialog setup. */
|
||||||
|
|
||||||
gtk_window_set_policy (GTK_WINDOW (folder_selection_dialog), TRUE, TRUE, FALSE);
|
gtk_window_set_policy (GTK_WINDOW (folder_selection_dialog), TRUE, TRUE, FALSE);
|
||||||
@ -424,6 +422,11 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s
|
|||||||
for (i = 0; allowed_types[i] != NULL; i++)
|
for (i = 0; allowed_types[i] != NULL; i++)
|
||||||
priv->allowed_types = g_list_prepend (priv->allowed_types,
|
priv->allowed_types = g_list_prepend (priv->allowed_types,
|
||||||
g_strdup (allowed_types[i]));
|
g_strdup (allowed_types[i]));
|
||||||
|
|
||||||
|
/* Preserve the order so we can use the first type listed as
|
||||||
|
the default for the folder creation dialog invoked by the
|
||||||
|
"New..." button. */
|
||||||
|
priv->allowed_types = g_list_reverse (priv->allowed_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (default_uri != NULL)
|
if (default_uri != NULL)
|
||||||
@ -465,8 +468,7 @@ e_shell_folder_selection_dialog_new (EShell *shell,
|
|||||||
const char *title,
|
const char *title,
|
||||||
const char *caption,
|
const char *caption,
|
||||||
const char *default_uri,
|
const char *default_uri,
|
||||||
const char *allowed_types[],
|
const char *allowed_types[])
|
||||||
const char *default_type)
|
|
||||||
{
|
{
|
||||||
EShellFolderSelectionDialog *folder_selection_dialog;
|
EShellFolderSelectionDialog *folder_selection_dialog;
|
||||||
|
|
||||||
@ -475,7 +477,7 @@ e_shell_folder_selection_dialog_new (EShell *shell,
|
|||||||
|
|
||||||
folder_selection_dialog = gtk_type_new (e_shell_folder_selection_dialog_get_type ());
|
folder_selection_dialog = gtk_type_new (e_shell_folder_selection_dialog_get_type ());
|
||||||
e_shell_folder_selection_dialog_construct (folder_selection_dialog, shell,
|
e_shell_folder_selection_dialog_construct (folder_selection_dialog, shell,
|
||||||
title, caption, default_uri, allowed_types, default_type);
|
title, caption, default_uri, allowed_types);
|
||||||
|
|
||||||
return GTK_WIDGET (folder_selection_dialog);
|
return GTK_WIDGET (folder_selection_dialog);
|
||||||
}
|
}
|
||||||
|
@ -64,14 +64,12 @@ void e_shell_folder_selection_dialog_construct (EShellFolderSele
|
|||||||
const char *title,
|
const char *title,
|
||||||
const char *caption,
|
const char *caption,
|
||||||
const char *default_uri,
|
const char *default_uri,
|
||||||
const char *allowed_types[],
|
const char *allowed_types[]);
|
||||||
const char *default_type);
|
|
||||||
GtkWidget *e_shell_folder_selection_dialog_new (EShell *shell,
|
GtkWidget *e_shell_folder_selection_dialog_new (EShell *shell,
|
||||||
const char *title,
|
const char *title,
|
||||||
const char *caption,
|
const char *caption,
|
||||||
const char *default_uri,
|
const char *default_uri,
|
||||||
const char *allowed_types[],
|
const char *allowed_types[]);
|
||||||
const char *default_type);
|
|
||||||
|
|
||||||
void e_shell_folder_selection_dialog_set_allow_creation (EShellFolderSelectionDialog *folder_selection_dialog,
|
void e_shell_folder_selection_dialog_set_allow_creation (EShellFolderSelectionDialog *folder_selection_dialog,
|
||||||
gboolean allow_creation);
|
gboolean allow_creation);
|
||||||
|
@ -1027,7 +1027,7 @@ import_druid_finish (GnomeDruidPage *page,
|
|||||||
_("Select folder"),
|
_("Select folder"),
|
||||||
_("Select a destination folder for importing this data"),
|
_("Select a destination folder for importing this data"),
|
||||||
e_shell_view_get_current_uri (data->view),
|
e_shell_view_get_current_uri (data->view),
|
||||||
NULL, NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (folder), "folder_selected",
|
gtk_signal_connect (GTK_OBJECT (folder), "folder_selected",
|
||||||
GTK_SIGNAL_FUNC (folder_selected), data);
|
GTK_SIGNAL_FUNC (folder_selected), data);
|
||||||
|
@ -471,7 +471,7 @@ command_goto_folder (BonoboUIComponent *uih,
|
|||||||
_("Go to folder..."),
|
_("Go to folder..."),
|
||||||
_("Select the folder that you want to open"),
|
_("Select the folder that you want to open"),
|
||||||
current_uri,
|
current_uri,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (folder_selection_dialog), GTK_WINDOW (shell_view));
|
gtk_window_set_transient_for (GTK_WINDOW (folder_selection_dialog), GTK_WINDOW (shell_view));
|
||||||
|
|
||||||
@ -592,7 +592,7 @@ command_new_shortcut (BonoboUIComponent *uih,
|
|||||||
_("Create a new shortcut"),
|
_("Create a new shortcut"),
|
||||||
_("Select the folder you want the shortcut to point to:"),
|
_("Select the folder you want the shortcut to point to:"),
|
||||||
e_shell_view_get_current_uri (shell_view),
|
e_shell_view_get_current_uri (shell_view),
|
||||||
NULL, NULL);
|
NULL);
|
||||||
e_shell_folder_selection_dialog_set_allow_creation (E_SHELL_FOLDER_SELECTION_DIALOG (folder_selection_dialog),
|
e_shell_folder_selection_dialog_set_allow_creation (E_SHELL_FOLDER_SELECTION_DIALOG (folder_selection_dialog),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
|
@ -567,8 +567,7 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant,
|
|||||||
title,
|
title,
|
||||||
NULL,
|
NULL,
|
||||||
default_folder,
|
default_folder,
|
||||||
allowed_type_names,
|
allowed_type_names);
|
||||||
default_type);
|
|
||||||
|
|
||||||
|
|
||||||
listener_duplicate = CORBA_Object_duplicate (listener, ev);
|
listener_duplicate = CORBA_Object_duplicate (listener, ev);
|
||||||
|
@ -234,9 +234,12 @@ user_select_folder (EvolutionShellClient *shell_client,
|
|||||||
|
|
||||||
parent_xid = (CORBA_long_long) GDK_WINDOW_XWINDOW (GTK_WIDGET (parent)->window);
|
parent_xid = (CORBA_long_long) GDK_WINDOW_XWINDOW (GTK_WIDGET (parent)->window);
|
||||||
|
|
||||||
GNOME_Evolution_Shell_selectUserFolder (corba_shell, parent_xid, listener_interface,
|
GNOME_Evolution_Shell_selectUserFolder (corba_shell, parent_xid,
|
||||||
title, default_folder, &corba_type_name_list,
|
listener_interface,
|
||||||
"", &ev);
|
title,
|
||||||
|
default_folder,
|
||||||
|
&corba_type_name_list,
|
||||||
|
&ev);
|
||||||
|
|
||||||
if (ev._major != CORBA_NO_EXCEPTION) {
|
if (ev._major != CORBA_NO_EXCEPTION) {
|
||||||
CORBA_exception_free (&ev);
|
CORBA_exception_free (&ev);
|
||||||
|
Reference in New Issue
Block a user