aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-05-19 23:29:19 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-05-19 23:29:19 +0800
commit3e519c4e1469b93c8fc6684b6aae53779d4ff270 (patch)
tree2a68b052adcd371aa3c2308d0ce2282546dfb64b
parent0b11ddccb9aa109b28f69fefb790453b558a096c (diff)
downloadgsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.gz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.bz2
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.lz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.xz
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.tar.zst
gsoc2013-evolution-3e519c4e1469b93c8fc6684b6aae53779d4ff270.zip
Renamed the "NewWindow" verb into "OpenFolderInNewWindow". Got the
`File -> Folder -> Open in New Window' menu item to work. svn path=/trunk/; revision=9893
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/e-shell-folder-commands.c10
-rw-r--r--shell/e-shell-view-menu.c16
-rw-r--r--shell/evolution-shell-component-client.c128
-rw-r--r--ui/ChangeLog5
-rw-r--r--ui/evolution.xml2
6 files changed, 103 insertions, 69 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 684ff51747..58b481bc35 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,16 @@
2001-05-19 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-view-menu.c: Removed "NewView" verb. Added
+ `folder_verbs', with "OpenFolderInNewWindow" in it.
+ (e_shell_view_menu_setup): Set up the `folder_verbs' too.
+ (command_new_view): Renamed to
+ `command_open_folder_in_new_window'.
+
+ * e-shell-folder-commands.c
+ (e_shell_command_open_folder_in_other_window): Implement.
+
+2001-05-19 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell-view-menu.c (command_create_folder): Call
`e_shell_command_create_new_folder()' implemented in
`e-shell-folder-commands.c'.
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index 4d0342f7de..34cb2d0ac3 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -31,6 +31,8 @@
#include "e-shell-folder-creation-dialog.h"
+/* Create new folder. */
+
void
e_shell_command_create_new_folder (EShell *shell,
EShellView *shell_view)
@@ -55,6 +57,8 @@ e_shell_command_create_new_folder (EShell *shell,
}
+/* Open folder in other window. */
+
void
e_shell_command_open_folder_in_other_window (EShell *shell,
EShellView *shell_view)
@@ -63,10 +67,12 @@ e_shell_command_open_folder_in_other_window (EShell *shell,
g_return_if_fail (E_IS_SHELL (shell));
g_return_if_fail (shell_view != NULL && E_IS_SHELL_VIEW (shell_view));
- g_warning ("To be implemented");
+ e_shell_new_view (shell, e_shell_view_get_current_uri (shell_view));
}
+/* Copy folder. */
+
void
e_shell_command_copy_folder (EShell *shell,
EShellView *shell_view)
@@ -79,6 +85,8 @@ e_shell_command_copy_folder (EShell *shell,
}
+/* Move folder. */
+
void
e_shell_command_move_folder (EShell *shell,
EShellView *shell_view)
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 3e8d2b9bd7..3f07b171bb 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -23,6 +23,8 @@
* Ettore Perazzoli
*/
+/* FIXME: This file is a bit of a mess. */
+
#include <config.h>
#include <glib.h>
@@ -329,9 +331,9 @@ command_new_folder (BonoboUIComponent *uih,
}
static void
-command_new_view (BonoboUIComponent *uih,
- gpointer data,
- const char *path)
+command_open_folder_in_new_window (BonoboUIComponent *uih,
+ gpointer data,
+ const char *path)
{
EShellView *shell_view;
EShell *shell;
@@ -488,7 +490,6 @@ DEFINE_UNIMPLEMENTED (command_new_contact)
DEFINE_UNIMPLEMENTED (command_new_task_request)
BonoboUIVerb new_verbs [] = {
- BONOBO_UI_VERB ("NewView", command_new_view),
BONOBO_UI_VERB ("NewFolder", command_new_folder),
BONOBO_UI_VERB ("NewShortcut", command_new_shortcut),
BONOBO_UI_VERB ("NewMailMessage", command_new_mail_message),
@@ -513,6 +514,12 @@ BonoboUIVerb file_verbs [] = {
BONOBO_UI_VERB_END
};
+BonoboUIVerb folder_verbs [] = {
+ BONOBO_UI_VERB ("OpenFolderInNewWindow", command_open_folder_in_new_window),
+
+ BONOBO_UI_VERB_END
+};
+
BonoboUIVerb help_verbs [] = {
BONOBO_UI_VERB_DATA ("HelpIndex", command_help, "evolution-guide/index.html"),
BONOBO_UI_VERB_DATA ("HelpGetStarted", command_help, "evolution-guide/usage-mainwindow.html"),
@@ -631,6 +638,7 @@ e_shell_view_menu_setup (EShellView *shell_view)
shell = e_shell_view_get_shell (shell_view);
bonobo_ui_component_add_verb_list_with_data (uic, file_verbs, shell_view);
+ bonobo_ui_component_add_verb_list_with_data (uic, folder_verbs, shell_view);
bonobo_ui_component_add_verb_list_with_data (uic, new_verbs, shell_view);
bonobo_ui_component_add_verb_list (uic, help_verbs);
diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c
index f8e00de066..02a2fc7400 100644
--- a/shell/evolution-shell-component-client.c
+++ b/shell/evolution-shell-component-client.c
@@ -90,48 +90,6 @@ corba_exception_to_result (const CORBA_Environment *ev)
}
}
-static void
-dispatch_callback (EvolutionShellComponentClient *shell_component_client,
- EvolutionShellComponentResult result)
-{
- EvolutionShellComponentClientPrivate *priv;
- EvolutionShellComponentClientCallback callback;
- PortableServer_ObjectId *oid;
- void *callback_data;
- CORBA_Environment ev;
-
- priv = shell_component_client->priv;
-
- g_return_if_fail (priv->callback != NULL);
- g_return_if_fail (priv->listener_servant != NULL);
-
- /* Notice that we destroy the interface and reset the callback information before
- dispatching the callback so that the callback can generate another request. */
-
- CORBA_exception_init (&ev);
-
- oid = PortableServer_POA_servant_to_id (bonobo_poa (), priv->listener_servant, &ev);
- PortableServer_POA_deactivate_object (bonobo_poa (), oid, &ev);
- POA_GNOME_Evolution_ShellComponentListener__fini (priv->listener_servant, &ev);
- CORBA_free (oid);
-
- CORBA_Object_release (priv->listener_interface, &ev);
- free_ShellComponentListener_servant (priv->listener_servant);
-
- CORBA_exception_free (&ev);
-
- priv->listener_servant = NULL;
- priv->listener_interface = CORBA_OBJECT_NIL;
-
- callback = priv->callback;
- callback_data = priv->callback_data;
-
- priv->callback = NULL;
- priv->callback_data = NULL;
-
- (* callback) (shell_component_client, result, callback_data);
-}
-
static EvolutionShellComponentResult
shell_component_result_from_corba_exception (const CORBA_Environment *ev)
{
@@ -150,12 +108,35 @@ static POA_GNOME_Evolution_ShellComponentListener__epv ShellComponentListener_e
static POA_GNOME_Evolution_ShellComponentListener__vepv ShellComponentListener_vepv;
static gboolean ShellComponentListener_vepv_initialized = FALSE;
+static void ShellComponentListener_vepv_initialize (void);
+
struct _ShellComponentListenerServant {
POA_GNOME_Evolution_ShellComponentListener servant;
EvolutionShellComponentClient *component_client;
};
typedef struct _ShellComponentListenerServant ShellComponentListenerServant;
+static PortableServer_Servant *
+create_ShellComponentListener_servant (EvolutionShellComponentClient *component_client)
+{
+ ShellComponentListenerServant *servant;
+
+ if (! ShellComponentListener_vepv_initialized)
+ ShellComponentListener_vepv_initialize ();
+
+ servant = g_new0 (ShellComponentListenerServant, 1);
+ servant->servant.vepv = &ShellComponentListener_vepv;
+ servant->component_client = component_client;
+
+ return (PortableServer_Servant) servant;
+}
+
+static void
+free_ShellComponentListener_servant (PortableServer_Servant servant)
+{
+ g_free (servant);
+}
+
static EvolutionShellComponentClient *
component_client_from_ShellComponentListener_servant (PortableServer_Servant servant)
{
@@ -189,6 +170,48 @@ result_from_async_corba_result (GNOME_Evolution_ShellComponentListener_Result as
}
static void
+dispatch_callback (EvolutionShellComponentClient *shell_component_client,
+ EvolutionShellComponentResult result)
+{
+ EvolutionShellComponentClientPrivate *priv;
+ EvolutionShellComponentClientCallback callback;
+ PortableServer_ObjectId *oid;
+ void *callback_data;
+ CORBA_Environment ev;
+
+ priv = shell_component_client->priv;
+
+ g_return_if_fail (priv->callback != NULL);
+ g_return_if_fail (priv->listener_servant != NULL);
+
+ /* Notice that we destroy the interface and reset the callback information before
+ dispatching the callback so that the callback can generate another request. */
+
+ CORBA_exception_init (&ev);
+
+ oid = PortableServer_POA_servant_to_id (bonobo_poa (), priv->listener_servant, &ev);
+ PortableServer_POA_deactivate_object (bonobo_poa (), oid, &ev);
+ POA_GNOME_Evolution_ShellComponentListener__fini (priv->listener_servant, &ev);
+ CORBA_free (oid);
+
+ CORBA_Object_release (priv->listener_interface, &ev);
+ free_ShellComponentListener_servant (priv->listener_servant);
+
+ CORBA_exception_free (&ev);
+
+ priv->listener_servant = NULL;
+ priv->listener_interface = CORBA_OBJECT_NIL;
+
+ callback = priv->callback;
+ callback_data = priv->callback_data;
+
+ priv->callback = NULL;
+ priv->callback_data = NULL;
+
+ (* callback) (shell_component_client, result, callback_data);
+}
+
+static void
impl_ShellComponentListener_report_result (PortableServer_Servant servant,
const GNOME_Evolution_ShellComponentListener_Result result,
CORBA_Environment *ev)
@@ -214,27 +237,6 @@ ShellComponentListener_vepv_initialize (void)
ShellComponentListener_vepv_initialized = TRUE;
}
-static PortableServer_Servant *
-create_ShellComponentListener_servant (EvolutionShellComponentClient *component_client)
-{
- ShellComponentListenerServant *servant;
-
- if (! ShellComponentListener_vepv_initialized)
- ShellComponentListener_vepv_initialize ();
-
- servant = g_new0 (ShellComponentListenerServant, 1);
- servant->servant.vepv = &ShellComponentListener_vepv;
- servant->component_client = component_client;
-
- return (PortableServer_Servant) servant;
-}
-
-static void
-free_ShellComponentListener_servant (PortableServer_Servant servant)
-{
- g_free (servant);
-}
-
static void
create_listener_interface (EvolutionShellComponentClient *shell_component_client)
{
diff --git a/ui/ChangeLog b/ui/ChangeLog
index 1880e3ee97..68694cbdbb 100644
--- a/ui/ChangeLog
+++ b/ui/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-19 Ettore Perazzoli <ettore@ximian.com>
+
+ * evolution.xml: Removed verb "NewView"; use
+ "OpenFolderInNewWindow" instead.
+
2001-05-18 Ettore Perazzoli <ettore@ximian.com>
* evolution.xml: Add commands for the Folder submenu in the File
diff --git a/ui/evolution.xml b/ui/evolution.xml
index 408552c53e..2d885d67c3 100644
--- a/ui/evolution.xml
+++ b/ui/evolution.xml
@@ -36,7 +36,7 @@
<placeholder name="NewFirstItem">
</placeholder>
- <menuitem name="EvolutionWindow" verb="NewView" _label="Evolution _Window"
+ <menuitem name="EvolutionWindow" verb="OpenFolderInNewWindow" _label="Evolution _Window"
accel="*Control**Shift*w"/>
<menuitem name="Folder" verb="NewFolder"