aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog6
-rw-r--r--widgets/misc/e-source-selector.c18
2 files changed, 24 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index d01d0fb2db..ac6b0f6165 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-08 Harry Lu <harry.lu@sun.com>
+
+ * e-source-selector.c: (e_source_selector_popup_menu),
+ (class_init): implement popup_menu so that popup menu can
+ be shown with Shift+F10.
+
2004-10-06 JP Rosevear <jpr@novell.com>
Fixes #66164
diff --git a/widgets/misc/e-source-selector.c b/widgets/misc/e-source-selector.c
index 9b63e8b674..60d4fc9a0f 100644
--- a/widgets/misc/e-source-selector.c
+++ b/widgets/misc/e-source-selector.c
@@ -661,6 +661,21 @@ impl_finalize (GObject *object)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
+static gboolean
+e_source_selector_popup_menu (GtkWidget *widget)
+{
+ ESourceSelector *selector = E_SOURCE_SELECTOR (widget);
+ ESource *source = e_source_selector_peek_primary_selection (selector);
+ gboolean res = FALSE;
+
+ if (source) {
+ g_object_ref (source);
+ g_signal_emit (selector, signals[POPUP_EVENT], 0, source, NULL, &res);
+ g_object_unref (source);
+ }
+
+ return res;
+}
/* Initialization. */
static gboolean
@@ -677,10 +692,13 @@ static void
class_init (ESourceSelectorClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
+ widget_class->popup_menu = e_source_selector_popup_menu;
+
parent_class = g_type_class_peek_parent (class);
signals[SELECTION_CHANGED] =