aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-25 22:01:46 +0800
committerDan Winship <danw@src.gnome.org>2003-03-25 22:01:46 +0800
commit7733348dcc86add1bdd241e20f7b3afeb66250ec (patch)
treec2d300796ffc9e9822af582f509ab2ecfaad39cf /shell
parent5d40c589ac1f330e06d6384ebd150f24f15c04a9 (diff)
downloadgsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar.gz
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar.bz2
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar.lz
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar.xz
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.tar.zst
gsoc2013-evolution-7733348dcc86add1bdd241e20f7b3afeb66250ec.zip
add a "new_view_xid" arg, so the component has a window id to make use of
* Evolution-ShellComponent.idl (interactive): add a "new_view_xid" arg, so the component has a window id to make use of as a parent if it needs to pop up a dialog. * e-shell.c (set_interactive): Pass the new_view_xid when going interactive. (e_shell_set_interactive): Remove this since it wasn't being used, and couldn't be used for anything except lying to the components. * evolution-shell-component.c (evolution_shell_component_class_init): Update "interactive" signal definition (impl_interactive): Update prototype and signal emission * e-shell-marshal.list (NONE:BOOL,INT): add svn path=/trunk/; revision=20493
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog18
-rw-r--r--shell/Evolution-ShellComponent.idl7
-rw-r--r--shell/e-shell-marshal.list1
-rw-r--r--shell/e-shell.c23
-rw-r--r--shell/e-shell.h3
-rw-r--r--shell/evolution-shell-component.c11
-rw-r--r--shell/evolution-shell-component.h3
7 files changed, 45 insertions, 21 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 1eb58ae13d..f1407f8067 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,21 @@
+2003-03-25 Dan Winship <danw@ximian.com>
+
+ * Evolution-ShellComponent.idl (interactive): add a "new_view_xid"
+ arg, so the component has a window id to make use of as a parent
+ if it needs to pop up a dialog.
+
+ * e-shell.c (set_interactive): Pass the new_view_xid when going
+ interactive.
+ (e_shell_set_interactive): Remove this since it wasn't being used,
+ and couldn't be used for anything except lying to the components.
+
+ * evolution-shell-component.c
+ (evolution_shell_component_class_init): Update "interactive"
+ signal definition
+ (impl_interactive): Update prototype and signal emission
+
+ * e-shell-marshal.list (NONE:BOOL,INT): add
+
2003-03-21 Dan Winship <danw@ximian.com>
* e-corba-storage.c (async_open_folder_idle): If we get a second
diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl
index bb9b4ae682..90cd6fa57d 100644
--- a/shell/Evolution-ShellComponent.idl
+++ b/shell/Evolution-ShellComponent.idl
@@ -88,8 +88,11 @@ module Evolution {
/* Notify the component of whether the shell is currently
* running in interactive mode or not. (I.e. basically,
- * whether there are any Evolution windows on the screen.) */
- void interactive (in boolean now_interactive);
+ * whether there are any Evolution windows on the screen.)
+ * @new_view_xid is an X Window ID ("None" if
+ * @now_interactive is FALSE) */
+ void interactive (in boolean now_interactive,
+ in unsigned long new_view_xid);
/* Send debugging output to the file specified. */
void debug (in string log_path);
diff --git a/shell/e-shell-marshal.list b/shell/e-shell-marshal.list
index 027a53e725..f1ae29622d 100644
--- a/shell/e-shell-marshal.list
+++ b/shell/e-shell-marshal.list
@@ -1,4 +1,5 @@
NONE:BOOL
+NONE:BOOL,INT
NONE:INT
NONE:INT,INT
NONE:INT,POINTER
diff --git a/shell/e-shell.c b/shell/e-shell.c
index ff7a844ae3..69c959fbcb 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -204,6 +204,7 @@ set_interactive (EShell *shell,
{
EShellPrivate *priv;
GList *id_list, *p;
+ Window new_view_xid;
priv = shell->priv;
@@ -212,6 +213,16 @@ set_interactive (EShell *shell,
priv->is_interactive = interactive;
+ if (interactive) {
+ GtkWidget *new_view;
+
+ g_return_if_fail (priv->views && priv->views->data);
+ new_view = priv->views->data;
+
+ new_view_xid = GDK_WINDOW_XWINDOW (new_view->window);
+ } else
+ new_view_xid = None;
+
id_list = e_component_registry_get_id_list (priv->component_registry);
for (p = id_list; p != NULL; p = p->next) {
EvolutionShellComponentClient *shell_component_client;
@@ -225,7 +236,7 @@ set_interactive (EShell *shell,
CORBA_exception_init (&ev);
- GNOME_Evolution_ShellComponent_interactive (shell_component_objref, interactive, &ev);
+ GNOME_Evolution_ShellComponent_interactive (shell_component_objref, interactive, new_view_xid, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
g_warning ("Error changing interactive status of component %s to %s -- %s\n",
id, interactive ? "TRUE" : "FALSE", BONOBO_EX_REPOID (&ev));
@@ -649,16 +660,6 @@ impl_Shell_setLineStatus (PortableServer_Servant servant,
}
-void
-e_shell_set_interactive (EShell *shell,
- gboolean interactive)
-{
- g_return_if_fail (E_IS_SHELL (shell));
-
- set_interactive (shell, interactive);
-}
-
-
/* Set up the ::Activity interface. */
static void
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 03af06cd4e..4f1b1aaf7b 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -144,9 +144,6 @@ void e_shell_go_offline (EShell *shell,
void e_shell_go_online (EShell *shell,
EShellView *action_view);
-void e_shell_set_interactive (EShell *shell,
- gboolean interactive);
-
void e_shell_send_receive (EShell *shell);
void e_shell_show_settings (EShell *shell,
const char *type,
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index 9d184e1193..d08129c3c8 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -492,6 +492,7 @@ impl_debug (PortableServer_Servant servant,
static void
impl_interactive (PortableServer_Servant servant,
CORBA_boolean interactive,
+ CORBA_unsigned_long new_view_xid,
CORBA_Environment *ev)
{
BonoboObject *bonobo_object;
@@ -500,7 +501,8 @@ impl_interactive (PortableServer_Servant servant,
bonobo_object = bonobo_object_from_servant (servant);
shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object);
- g_signal_emit (shell_component, signals[INTERACTIVE], 0, interactive);
+ g_signal_emit (shell_component, signals[INTERACTIVE], 0,
+ interactive, new_view_xid);
}
static Bonobo_Control
@@ -921,9 +923,10 @@ evolution_shell_component_class_init (EvolutionShellComponentClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EvolutionShellComponentClass, interactive),
NULL, NULL,
- e_shell_marshal_NONE__BOOL,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
+ e_shell_marshal_NONE__BOOL_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_BOOLEAN,
+ G_TYPE_INT);
signals[HANDLE_EXTERNAL_URI]
= g_signal_new ("handle_external_uri",
diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h
index 3e443db1d8..7cf6686ee0 100644
--- a/shell/evolution-shell-component.h
+++ b/shell/evolution-shell-component.h
@@ -155,7 +155,8 @@ struct _EvolutionShellComponentClass {
void (* debug) (EvolutionShellComponent *shell_component);
void (* interactive) (EvolutionShellComponent *shell_component,
- gboolean is_interactive);
+ gboolean is_interactive,
+ unsigned long new_view_xid);
void (* handle_external_uri) (EvolutionShellComponent *shell_component,
const char *uri);