gnome-commander r2204 - in trunk: . src



Author: epiotr
Date: Thu Oct 16 20:54:40 2008
New Revision: 2204
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2204&view=rev

Log:
Rename signal "selection-changed" -> "files-changed"

Modified:
   trunk/ChangeLog
   trunk/src/gnome-cmd-file-list.cc
   trunk/src/gnome-cmd-file-list.h
   trunk/src/gnome-cmd-file-selector.cc

Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc	(original)
+++ trunk/src/gnome-cmd-file-list.cc	Thu Oct 16 20:54:40 2008
@@ -61,7 +61,7 @@
     FILE_CLICKED,        // A file in the list was clicked
     LIST_CLICKED,        // The file list widget was clicked
     EMPTY_SPACE_CLICKED, // The file list was clicked but not on a file
-    SELECTION_CHANGED,   // At least on file was selected/unselected
+    FILES_CHANGED,       // The visible content of the file list has changed (files have been: selected, created, deleted or modified)
     LAST_SIGNAL
 };
 
@@ -346,7 +346,7 @@
     gnome_cmd_file_ref (finfo);
     fl->priv->selected_files = g_list_append (fl->priv->selected_files, finfo);
 
-    gtk_signal_emit (*fl, file_list_signals[SELECTION_CHANGED]);
+    gtk_signal_emit (*fl, file_list_signals[FILES_CHANGED]);
 }
 
 
@@ -378,7 +378,7 @@
             if (fg)  gtk_clist_set_foreground (*fl, row, fg);
         }
 
-    gtk_signal_emit (*fl, file_list_signals[SELECTION_CHANGED]);
+    gtk_signal_emit (*fl, file_list_signals[FILES_CHANGED]);
 }
 
 
@@ -1273,11 +1273,11 @@
                         GTK_TYPE_NONE,
                         1, GTK_TYPE_POINTER);
 
-    file_list_signals[SELECTION_CHANGED] =
-        gtk_signal_new ("selection-changed",
+    file_list_signals[FILES_CHANGED] =
+        gtk_signal_new ("files-changed",
                         GTK_RUN_LAST,
                         G_OBJECT_CLASS_TYPE (object_class),
-                        GTK_SIGNAL_OFFSET (GnomeCmdFileListClass, selection_changed),
+                        GTK_SIGNAL_OFFSET (GnomeCmdFileListClass, files_changed),
                         gtk_marshal_NONE__NONE,
                         GTK_TYPE_NONE,
                         0);
@@ -1286,7 +1286,7 @@
     widget_class->map = ::map;
     klass->file_clicked = NULL;
     klass->list_clicked = NULL;
-    klass->selection_changed = NULL;
+    klass->files_changed = NULL;
 }
 
 static void init (GnomeCmdFileList *fl)
@@ -1335,12 +1335,15 @@
 }
 
 
-GtkWidget *gnome_cmd_file_list_new ()
+GtkWidget *gnome_cmd_file_list_new (GtkSignalFunc handler, GtkObject *object)
 {
     GnomeCmdFileList *fl = (GnomeCmdFileList *) g_object_new (gnome_cmd_file_list_get_type (), "n-columns", GnomeCmdFileList::NUM_COLUMNS, NULL);
 
     fl->create_column_titles();
 
+    if (handler)
+        gtk_signal_connect (*fl, "files-changed", handler, object);
+
     return GTK_WIDGET (fl);
 }
 

Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h	(original)
+++ trunk/src/gnome-cmd-file-list.h	Thu Oct 16 20:54:40 2008
@@ -158,7 +158,7 @@
     void (* file_clicked)        (GnomeCmdFileList *fl, GnomeCmdFile *finfo, GdkEventButton *button);
     void (* list_clicked)        (GnomeCmdFileList *fl, GdkEventButton *button);
     void (* empty_space_clicked) (GnomeCmdFileList *fl, GdkEventButton *button);
-    void (* selection_changed)   (GnomeCmdFileList *fl);
+    void (* files_changed)       (GnomeCmdFileList *fl);
 };
 
 
@@ -167,7 +167,7 @@
 
 
 GtkType gnome_cmd_file_list_get_type ();
-GtkWidget *gnome_cmd_file_list_new ();
+GtkWidget *gnome_cmd_file_list_new (GtkSignalFunc handler=NULL, GtkObject *object=NULL);
 
 inline GnomeCmdFileList::GnomeCmdFileList(): con(NULL), cwd(NULL), lwd(NULL), connected_dir(NULL)
 {

Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc	(original)
+++ trunk/src/gnome-cmd-file-selector.cc	Thu Oct 16 20:54:40 2008
@@ -948,7 +948,7 @@
 }
 
 
-static void on_list_selection_changed (GnomeCmdFileList *fl, GnomeCmdFileSelector *fs)
+static void on_list_files_changed (GnomeCmdFileList *fl, GnomeCmdFileSelector *fs)
 {
     fs->update_selected_files_label();
 }
@@ -1243,7 +1243,7 @@
     gtk_signal_connect (GTK_OBJECT (fs->file_list()), "file-clicked", GTK_SIGNAL_FUNC (on_list_file_clicked), fs);
     gtk_signal_connect (GTK_OBJECT (fs->file_list()), "list-clicked", GTK_SIGNAL_FUNC (on_list_list_clicked), fs);
     gtk_signal_connect (GTK_OBJECT (fs->file_list()), "empty-space-clicked", GTK_SIGNAL_FUNC (on_list_empty_space_clicked), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "selection-changed", GTK_SIGNAL_FUNC (on_list_selection_changed), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "files-changed", GTK_SIGNAL_FUNC (on_list_files_changed), fs);
 
     gtk_signal_connect (GTK_OBJECT (fs->file_list()), "key-press-event", GTK_SIGNAL_FUNC (on_list_key_pressed), fs);
     gtk_signal_connect (GTK_OBJECT (fs->file_list()), "key-press-event", GTK_SIGNAL_FUNC (on_list_key_pressed_private), fs);



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