[nautilus-actions] Double-click on an action opens the editor
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-actions] Double-click on an action opens the editor
- Date: Thu, 28 May 2009 17:48:04 -0400 (EDT)
commit 0344462ae736fe2e02bd230eb25e3383dcf46f6d
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu May 28 23:14:55 2009 +0200
Double-click on an action opens the editor
---
ChangeLog | 4 ++++
nact/nact.c | 12 ++++++++++++
nact/nautilus-actions-config.glade | 2 ++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ea82c84..5ee91ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,10 @@
* nact/nact-action-editor.c:
Restore tooltip display for the icon name depending on Gtk+ version.
+ * nact/nact.c:
+ * nact/nautilus-actions-config.glade:
+ Double-click on an action opens the editor.
+
2009-05-25 Pierre Wieser <pwieser trychlos org>
* configure.ac:
diff --git a/nact/nact.c b/nact/nact.c
index 66c5397..8283d2d 100644
--- a/nact/nact.c
+++ b/nact/nact.c
@@ -52,6 +52,7 @@ void delete_button_clicked_cb (GtkButton *button, gpointer user_data);
void duplicate_button_clicked_cb (GtkButton *button, gpointer user_data);
void edit_button_clicked_cb (GtkButton *button, gpointer user_data);
void im_export_button_clicked_cb (GtkButton *button, gpointer user_data);
+gboolean on_ActionsList_button_press_event( GtkWidget *widget, GdkEventButton *event, gpointer data );
static gint actions_list_sort_by_label (gconstpointer a1, gconstpointer a2);
static guint get_profiles_count( const NautilusActionsConfigAction *action );
@@ -61,6 +62,17 @@ static void setup_actions_list (GtkWidget *list);
static NautilusActionsConfigGconfWriter *config = NULL;
+gboolean
+on_ActionsList_button_press_event( GtkWidget *widget, GdkEventButton *event, gpointer data )
+{
+ if( event->type == GDK_2BUTTON_PRESS ){
+ edit_button_clicked_cb( NULL, NULL );
+ return( TRUE );
+ }
+ /* unmanaged event: let the framework do its job */
+ return( FALSE );
+}
+
static guint
get_profiles_count( const NautilusActionsConfigAction *action )
{
diff --git a/nact/nautilus-actions-config.glade b/nact/nautilus-actions-config.glade
index 2f19998..a7887b3 100644
--- a/nact/nautilus-actions-config.glade
+++ b/nact/nautilus-actions-config.glade
@@ -86,6 +86,7 @@
<widget class="GtkTreeView" id="ActionsList">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_PRESS_MASK</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
@@ -93,6 +94,7 @@
<property name="fixed_height_mode">False</property>
<property name="hover_selection">False</property>
<property name="hover_expand">False</property>
+ <signal name="button_press_event" handler="on_ActionsList_button_press_event" last_modification_time="Thu, 28 May 2009 17:11:36 GMT"/>
</widget>
</child>
</widget>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]