[gnome-commander] Added GnomeCmdFile* parameter to 'list-clicked' signal



commit 751c7d97ecce018bc768e022c8140b9a25253e05
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Nov 20 23:04:50 2010 +0100

    Added GnomeCmdFile* parameter to 'list-clicked' signal

 src/gnome-cmd-file-list.cc     |    9 +++++----
 src/gnome-cmd-file-selector.cc |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 9852bda..2c6c487 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1107,17 +1107,18 @@ static gboolean on_button_press (GtkCList *clist, GdkEventButton *event, GnomeCm
     if (GTK_CLIST (fl)->clist_window != event->window)
         return FALSE;
 
-    g_signal_emit (fl, signals[LIST_CLICKED], 0, event);
-
     gint row = gnome_cmd_clist_get_row (*fl, event->x, event->y);
+
     if (row < 0)
     {
+        g_signal_emit (fl, signals[LIST_CLICKED], 0, NULL, event);
         g_signal_emit (fl, signals[EMPTY_SPACE_CLICKED], 0, event);
         return FALSE;
     }
 
     GnomeCmdFile *f = fl->get_file_at_row(row);
 
+    g_signal_emit (fl, signals[LIST_CLICKED], 0, f, event);
     g_signal_emit (fl, signals[FILE_CLICKED], 0, f, event);
 
     g_signal_stop_emission_by_name (clist, "button-press-event");
@@ -1557,9 +1558,9 @@ static void gnome_cmd_file_list_class_init (GnomeCmdFileListClass *klass)
             G_SIGNAL_RUN_LAST,
             G_STRUCT_OFFSET (GnomeCmdFileListClass, list_clicked),
             NULL, NULL,
-            g_cclosure_marshal_VOID__POINTER,
+            g_cclosure_marshal_VOID__POINTER_POINTER,
             G_TYPE_NONE,
-            1, G_TYPE_POINTER);
+            2, G_TYPE_POINTER, G_TYPE_POINTER);
 
     signals[EMPTY_SPACE_CLICKED] =
         g_signal_new ("empty-space-clicked",
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index cf4345b..0bf23d3 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -454,7 +454,7 @@ static void on_list_file_released (GnomeCmdFileList *fl, GnomeCmdFile *f, GdkEve
 }
 
 
-static void on_list_list_clicked (GnomeCmdFileList *fl, GdkEventButton *event, GnomeCmdFileSelector *fs)
+static void on_list_list_clicked (GnomeCmdFileList *fl, GnomeCmdFile *f, GdkEventButton *event, GnomeCmdFileSelector *fs)
 {
     if (event->type == GDK_BUTTON_PRESS)
         switch (event->button)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]