ekiga r7347 - in trunk: . lib/engine/gui/gtk-frontend
- From: sfre svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7347 - in trunk: . lib/engine/gui/gtk-frontend
- Date: Fri, 14 Nov 2008 22:02:43 +0000 (UTC)
Author: sfre
Date: Fri Nov 14 22:02:42 2008
New Revision: 7347
URL: http://svn.gnome.org/viewvc/ekiga?rev=7347&view=rev
Log:
Exit early from the event-after signal when uninteresting event.
Also renamed on_view_clicked to on_view_event_after.
Modified:
trunk/ChangeLog
trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
Modified: trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp (original)
+++ trunk/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp Fri Nov 14 22:02:42 2008
@@ -183,9 +183,9 @@
* BEHAVIOR : Update the menu and displays it as a popup.
* PRE : The gpointer must point to the RosterViewGtk GObject.
*/
-static gint on_view_clicked (GtkWidget *tree_view,
- GdkEventButton *event,
- gpointer data);
+static gint on_view_event_after (GtkWidget *tree_view,
+ GdkEventButton *event,
+ gpointer data);
/* DESCRIPTION : Helpers for the next function
*/
@@ -663,15 +663,18 @@
}
static gint
-on_view_clicked (GtkWidget *tree_view,
- GdkEventButton *event,
- gpointer data)
+on_view_event_after (GtkWidget *tree_view,
+ GdkEventButton *event,
+ gpointer data)
{
RosterViewGtk *self = NULL;
GtkTreeModel *model = NULL;
GtkTreePath *path = NULL;
GtkTreeIter iter;
+ if (event->type != GDK_BUTTON_PRESS && event->type != GDK_2BUTTON_PRESS)
+ return FALSE;
+
self = ROSTER_VIEW_GTK (data);
model = gtk_tree_view_get_model (self->priv->tree_view);
@@ -717,6 +720,7 @@
break;
default:
+ g_assert_not_reached ();
break; // shouldn't happen
}
g_free (name);
@@ -1520,7 +1524,7 @@
g_signal_connect (G_OBJECT (selection), "changed",
G_CALLBACK (on_selection_changed), self);
g_signal_connect (G_OBJECT (self->priv->tree_view), "event-after",
- G_CALLBACK (on_view_clicked), self);
+ G_CALLBACK (on_view_event_after), self);
/* Relay signals */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]