gnome-commander r2206 - trunk/src



Author: epiotr
Date: Sat Oct 18 08:41:53 2008
New Revision: 2206
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2206&view=rev

Log:
Code cleanup

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

Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc	(original)
+++ trunk/src/gnome-cmd-file-list.cc	Sat Oct 18 08:41:53 2008
@@ -1302,7 +1302,7 @@
     gtk_signal_connect (*fl, "button-release-event", GTK_SIGNAL_FUNC (on_button_release), fl);
     gtk_signal_connect (*fl, "motion-notify-event", GTK_SIGNAL_FUNC (on_motion_notify), fl);
 
-    gtk_signal_connect_after (GTK_OBJECT (fl), "realize", GTK_SIGNAL_FUNC (on_realize), fl);
+    gtk_signal_connect_after (*fl, "realize", GTK_SIGNAL_FUNC (on_realize), fl);
     gtk_signal_connect (*fl, "file-clicked", GTK_SIGNAL_FUNC (on_file_clicked), fl);
 }
 

Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h	(original)
+++ trunk/src/gnome-cmd-file-list.h	Sat Oct 18 08:41:53 2008
@@ -162,10 +162,6 @@
 };
 
 
-extern GtkTargetEntry drag_types[];
-extern GtkTargetEntry drop_types[];
-
-
 GtkType gnome_cmd_file_list_get_type ();
 GtkWidget *gnome_cmd_file_list_new (GtkSignalFunc handler=NULL, GtkObject *object=NULL);
 
@@ -228,4 +224,8 @@
 
 gboolean gnome_cmd_file_list_quicksearch_shown (GnomeCmdFileList *fl);
 
+
+extern GtkTargetEntry drag_types[];
+extern GtkTargetEntry drop_types[];
+
 #endif // __GNOME_CMD_FILE_LIST_H__

Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc	(original)
+++ trunk/src/gnome-cmd-file-selector.cc	Sat Oct 18 08:41:53 2008
@@ -956,13 +956,11 @@
 
 static void on_dir_list_ok (GnomeCmdDir *dir, GList *files, GnomeCmdFileSelector *fs)
 {
+    DEBUG('l', "on_dir_list_ok\n");
+
     g_return_if_fail (GNOME_CMD_IS_DIR (dir));
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    GnomeCmdCon *con;
-
-    DEBUG('l', "on_dir_list_ok\n");
-
     if (fs->priv->realized)
     {
         gtk_widget_set_sensitive (*fs, TRUE);
@@ -974,14 +972,10 @@
     {
         if (fs->file_list()->connected_dir != NULL)
         {
-            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir),
-                                           GTK_SIGNAL_FUNC (on_dir_file_created), fs);
-            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir),
-                                           GTK_SIGNAL_FUNC (on_dir_file_deleted), fs);
-            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir),
-                                           GTK_SIGNAL_FUNC (on_dir_file_changed), fs);
-            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir),
-                                           GTK_SIGNAL_FUNC (on_dir_file_renamed), fs);
+            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir), GTK_SIGNAL_FUNC (on_dir_file_created), fs);
+            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir), GTK_SIGNAL_FUNC (on_dir_file_deleted), fs);
+            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir), GTK_SIGNAL_FUNC (on_dir_file_changed), fs);
+            gtk_signal_disconnect_by_func (GTK_OBJECT (fs->file_list()->connected_dir), GTK_SIGNAL_FUNC (on_dir_file_renamed), fs);
         }
 
         gtk_signal_connect (GTK_OBJECT (dir), "file-created", GTK_SIGNAL_FUNC (on_dir_file_created), fs);
@@ -991,8 +985,7 @@
         fs->file_list()->connected_dir = dir;
     }
 
-    con = fs->get_connection();
-    gnome_cmd_con_set_cwd (con, dir);
+    gnome_cmd_con_set_cwd (fs->get_connection(), dir);
 
     if (fs->priv->dir_history && !fs->priv->dir_history->is_locked)
     {

Modified: trunk/src/gnome-cmd-options-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-options-dialog.cc	(original)
+++ trunk/src/gnome-cmd-options-dialog.cc	Sat Oct 18 08:41:53 2008
@@ -1175,12 +1175,10 @@
     if (app && gnome_cmd_app_get_target (app) != APP_TARGET_SOME_FILES)
         gtk_widget_set_sensitive (entry, FALSE);
 
-    gnome_cmd_dialog_add_button (
-        GNOME_CMD_DIALOG (dialog), GNOME_STOCK_BUTTON_CANCEL,
-        GTK_SIGNAL_FUNC (on_cancel), dialog);
-    gnome_cmd_dialog_add_button (
-        GNOME_CMD_DIALOG (dialog), GNOME_STOCK_BUTTON_OK,
-        GTK_SIGNAL_FUNC (on_ok), dialog);
+    gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GNOME_STOCK_BUTTON_CANCEL,
+                                 GTK_SIGNAL_FUNC (on_cancel), dialog);
+    gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GNOME_STOCK_BUTTON_OK,
+                                 GTK_SIGNAL_FUNC (on_ok), dialog);
 
     gtk_widget_show (dialog);
 



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