[evolution-patches] Show popup menu of e-source-selector with Shift+F10
- From: Harry Lu <Harry Lu Sun COM>
- To: evolution-patches <evolution-patches ximian com>
- Subject: [evolution-patches] Show popup menu of e-source-selector with Shift+F10
- Date: Fri, 17 Sep 2004 11:35:17 +0800
Hi,
Attached is the patch for HEAD. Please review it.
Thanks!
Harry
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.325
diff -u -r1.325 ChangeLog
--- ChangeLog 13 Sep 2004 16:24:32 -0000 1.325
+++ ChangeLog 17 Sep 2004 03:29:13 -0000
@@ -1,3 +1,9 @@
+2004-09-17 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-09-13 Rodney Dawes <dobey novell com>
* e-multi-config-dialog.c (impl_response):
Index: e-source-selector.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-source-selector.c,v
retrieving revision 1.22
diff -u -r1.22 e-source-selector.c
--- e-source-selector.c 20 Jul 2004 16:36:43 -0000 1.22
+++ e-source-selector.c 17 Sep 2004 03:29:14 -0000
@@ -664,6 +664,23 @@
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
+static gboolean
+e_source_selector_popup_menu (GtkWidget *widget)
+{
+ ESourceSelector *selector = E_SOURCE_SELECTOR (widget);
+
+ if (e_source_selector_peek_primary_selection (selector)) {
+ GtkWidget *menu;
+
+ menu = gtk_menu_new ();
+ g_signal_emit (G_OBJECT (selector), signals[FILL_POPUP_MENU], 0, GTK_MENU (menu));
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
/* Initialization. */
@@ -671,9 +688,12 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]