ekiga r7583 - in trunk: . src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7583 - in trunk: . src/gui
- Date: Wed, 21 Jan 2009 21:27:05 +0000 (UTC)
Author: dsandras
Date: Wed Jan 21 21:27:05 2009
New Revision: 7583
URL: http://svn.gnome.org/viewvc/ekiga?rev=7583&view=rev
Log:
When double-clicking an account, enable it or disable it. (#568586)
Modified:
trunk/ChangeLog
trunk/src/gui/accounts.cpp
Modified: trunk/src/gui/accounts.cpp
==============================================================================
--- trunk/src/gui/accounts.cpp (original)
+++ trunk/src/gui/accounts.cpp Wed Jan 21 21:27:05 2009
@@ -51,6 +51,7 @@
#include "gmdialog.h"
#include "services.h"
+#include "menu-builder-tools.h"
#include "menu-builder-gtk.h"
#include "form-dialog-gtk.h"
@@ -349,9 +350,7 @@
tree_view = GTK_TREE_VIEW (aw->accounts_list);
model = gtk_tree_view_get_model (tree_view);
- if (event->type == GDK_BUTTON_PRESS || event->type == GDK_KEY_PRESS) {
-
- populate_menu (GTK_WIDGET (data));
+ if (event->type == GDK_BUTTON_PRESS || event->type == GDK_KEY_PRESS || event->type == GDK_2BUTTON_PRESS) {
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view),
(gint) event->x, (gint) event->y,
@@ -363,26 +362,39 @@
COLUMN_ACCOUNT, &account,
-1);
- if (event->button == 3) {
-
- MenuBuilderGtk builder;
- account->populate_menu (builder);
- if (!builder.empty ()) {
-
- gtk_widget_show_all (builder.menu);
- gtk_menu_popup (GTK_MENU (builder.menu), NULL, NULL,
- NULL, NULL, event->button, event->time);
- g_signal_connect (G_OBJECT (builder.menu), "hide",
- G_CALLBACK (g_object_unref),
- (gpointer) builder.menu);
- }
- g_object_ref_sink (G_OBJECT (builder.menu));
- }
+ gtk_tree_path_free (path);
}
+ }
+ }
+
+ if (account == NULL)
+ return FALSE;
- gtk_tree_path_free (path);
+ if (event->type == GDK_BUTTON_PRESS || event->type == GDK_KEY_PRESS) {
+
+ populate_menu (GTK_WIDGET (data));
+
+ if (event->button == 3) {
+
+ MenuBuilderGtk builder;
+ account->populate_menu (builder);
+ if (!builder.empty ()) {
+
+ gtk_widget_show_all (builder.menu);
+ gtk_menu_popup (GTK_MENU (builder.menu), NULL, NULL,
+ NULL, NULL, event->button, event->time);
+ g_signal_connect (G_OBJECT (builder.menu), "hide",
+ G_CALLBACK (g_object_unref),
+ (gpointer) builder.menu);
+ }
+ g_object_ref_sink (G_OBJECT (builder.menu));
}
}
+ else if (event->type == GDK_2BUTTON_PRESS) {
+
+ Ekiga::TriggerMenuBuilder builder;
+ account->populate_menu (builder);
+ }
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]