aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorHarry Lu <harry.lu@sun.com>2004-10-08 16:36:17 +0800
committerHarry Lu <haip@src.gnome.org>2004-10-08 16:36:17 +0800
commit35ddf245532168c64559c6b6cfdb0c0970c6a5f2 (patch)
treefe358903e6665dd0b424029d2065f99c4687a052 /widgets/misc
parent65ae86930b7b3da58498265dce7a2275985bf4b6 (diff)
downloadgsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar.gz
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar.bz2
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar.lz
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar.xz
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.tar.zst
gsoc2013-evolution-35ddf245532168c64559c6b6cfdb0c0970c6a5f2.zip
implement popup_menu so that popup menu can be shown with Shift+F10.
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. svn path=/trunk/; revision=27506
Diffstat (limited to 'widgets/misc')
-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] =