aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-06 02:55:28 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-06 02:55:28 +0800
commitcb704fd31b7ea71c2adc798796ff72cb555c20b8 (patch)
tree7c33ddbdeb19d90d74cb7512e3985948aee3e229 /shell
parente44bbc64b8885fe92eb66cf1bcae282b80f1ae8d (diff)
downloadgsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar.gz
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar.bz2
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar.lz
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar.xz
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.tar.zst
gsoc2013-evolution-cb704fd31b7ea71c2adc798796ff72cb555c20b8.zip
[Fix #6474 and friends, crash when selecting things from the
context activity context menu.] * e-activity-handler.c: New member `menu' in struct `ActivityInfo'. (activity_info_new): Init to NULL. (show_cancellation_popup): Set the `menu' member to point to this newly created pop-up, use `gnome_popup_menu_do_popup_modal()' instead of `gnome_popup_menu_do_popup()', and set the `menu' member to NULL when the menu is gone. (activity_info_free): Destroy `menu' member. (impl_requestDialog): Return `GNOME_Evolution_Activity_DIALOG_ACTION_ERROR' instead of nothing. svn path=/trunk/; revision=12624
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog16
-rw-r--r--shell/e-activity-handler.c15
2 files changed, 29 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 9d8bfd17f3..8bbd937ec7 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,21 @@
2001-09-04 Ettore Perazzoli <ettore@ximian.com>
+ [Fix #6474 and friends, crash when selecting things from the
+ context activity context menu.]
+
+ * e-activity-handler.c: New member `menu' in struct
+ `ActivityInfo'.
+ (activity_info_new): Init to NULL.
+ (show_cancellation_popup): Set the `menu' member to point to this
+ newly created pop-up, use `gnome_popup_menu_do_popup_modal()'
+ instead of `gnome_popup_menu_do_popup()', and set the `menu'
+ member to NULL when the menu is gone.
+ (activity_info_free): Destroy `menu' member.
+ (impl_requestDialog): Return
+ `GNOME_Evolution_Activity_DIALOG_ACTION_ERROR' instead of nothing.
+
+2001-09-04 Ettore Perazzoli <ettore@ximian.com>
+
[Fix #6971, Default folder should be the Summary.]
* main.c (idle_cb): s/DEFAULT_URI/E_SHELL_VIEW_DEFAULT_URI/.
diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c
index 798eef551e..fe3a944bcc 100644
--- a/shell/e-activity-handler.c
+++ b/shell/e-activity-handler.c
@@ -51,6 +51,7 @@ struct _ActivityInfo {
CORBA_boolean cancellable;
Bonobo_Listener event_listener;
CORBA_float progress;
+ GtkWidget *menu;
};
typedef struct _ActivityInfo ActivityInfo;
@@ -203,7 +204,13 @@ show_cancellation_popup (ActivityInfo *activity_info,
/* FIXME: We should gray out things properly here. */
popup = e_popup_menu_create (items, 0, 0, activity_info);
- gnome_popup_menu_do_popup (GTK_WIDGET (popup), NULL, NULL, button_event, activity_info);
+
+ g_assert (activity_info->menu == NULL);
+ activity_info->menu = GTK_WIDGET (popup);
+
+ gnome_popup_menu_do_popup_modal (GTK_WIDGET (popup), NULL, NULL, button_event, activity_info);
+
+ activity_info->menu = NULL;
}
static int
@@ -268,6 +275,7 @@ activity_info_new (GNOME_Evolution_Activity_ActivityId id,
info->cancellable = cancellable;
info->event_listener = CORBA_Object_duplicate (event_listener, &ev);
info->progress = -1.0; /* (Unknown) */
+ info->menu = NULL;
CORBA_exception_free (&ev);
@@ -285,6 +293,9 @@ activity_info_free (ActivityInfo *info)
CORBA_free (info->information);
CORBA_Object_release (info->event_listener, &ev);
+ if (info->menu != NULL)
+ gtk_widget_destroy (info->menu);
+
g_free (info);
CORBA_exception_free (&ev);
@@ -507,7 +518,7 @@ impl_requestDialog (PortableServer_Servant servant,
activity_handler = E_ACTIVITY_HANDLER (bonobo_object_from_servant (servant));
if (GTK_OBJECT_DESTROYED (activity_handler))
- return;
+ return GNOME_Evolution_Activity_DIALOG_ACTION_ERROR;
/* FIXME implement. */
g_warning ("Evolution::Activity::requestDialog not implemented");