summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMengjie Yu <meng-jie.yu@sun.com>2005-05-11 07:36:33 +0000
committerHarry Lu <haip@src.gnome.org>2005-05-11 07:36:33 +0000
commitbff3efb0b1d3cb5d72aa78f5175491ea60e9b8b8 (patch)
tree67498369a590c01a6b1df1500dab1e8a813b149c
parentb20dfd2695e958b1b7efffd40c906b8875d7ed4f (diff)
downloadevolution-data-server-bff3efb0b1d3cb5d72aa78f5175491ea60e9b8b8.tar.gz
We need to implement the popup_menu function to make 'F10 + Shift Key'
2005-05-09 Mengjie Yu <meng-jie.yu@sun.com> * e-source-selector.c: (selector_popup_menu), (e_source_selector_class_init): We need to implement the popup_menu function to make 'F10 + Shift Key' pressing work. Fixes #303540
-rw-r--r--libedataserverui/ChangeLog9
-rw-r--r--libedataserverui/e-source-selector.c17
2 files changed, 26 insertions, 0 deletions
diff --git a/libedataserverui/ChangeLog b/libedataserverui/ChangeLog
index 19f1627f4..7b915aedf 100644
--- a/libedataserverui/ChangeLog
+++ b/libedataserverui/ChangeLog
@@ -1,3 +1,12 @@
+2005-05-09 Mengjie Yu <meng-jie.yu@sun.com>
+
+ * e-source-selector.c: (selector_popup_menu),
+ (e_source_selector_class_init):
+ We need to implement the popup_menu function to make
+ 'F10 + Shift Key' pressing work.
+
+ Fixes #303540
+
2005-05-04 Hans Petter Jansson <hpj@novell.com>
* e-book-auth-util.c:
diff --git a/libedataserverui/e-source-selector.c b/libedataserverui/e-source-selector.c
index 9c9dc541b..3a8a84c60 100644
--- a/libedataserverui/e-source-selector.c
+++ b/libedataserverui/e-source-selector.c
@@ -68,6 +68,8 @@ enum {
};
static unsigned int signals[NUM_SIGNALS] = { 0 };
+static gboolean selector_popup_menu (GtkWidget *widget);
+
G_DEFINE_TYPE (ESourceSelector, e_source_selector, GTK_TYPE_TREE_VIEW)
/* Selection management. */
@@ -573,6 +575,18 @@ row_expanded_callback (GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *pa
}
static gboolean
+selector_popup_menu (GtkWidget *widget)
+{
+ ESourceSelector *selector = E_SOURCE_SELECTOR (widget);
+ ESource *source;
+ gboolean res = FALSE;
+
+ source = e_source_selector_peek_primary_selection (selector);
+ g_signal_emit (selector, signals[POPUP_EVENT], 0, source, NULL, &res);
+ return res;
+}
+
+static gboolean
selector_button_press_event (GtkWidget *widget, GdkEventButton *event, ESourceSelector *selector)
{
ESourceSelectorPrivate *priv = selector->priv;
@@ -679,9 +693,12 @@ static void
e_source_selector_class_init (ESourceSelectorClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
object_class->dispose = e_source_selector_dispose;
object_class->finalize = e_source_selector_finalize;
+ widget_class->popup_menu = selector_popup_menu;
+
signals[SELECTION_CHANGED] =
g_signal_new ("selection_changed",