gnome-commander r1980 - in trunk: . src



Author: epiotr
Date: Thu Aug 14 22:09:37 2008
New Revision: 1980
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1980&view=rev

Log:
Convert GnomeCmdFileSelector struct into C++ class, part 2

Modified:
   trunk/ChangeLog
   trunk/src/gnome-cmd-data.cc
   trunk/src/gnome-cmd-dir-indicator.cc
   trunk/src/gnome-cmd-file-props-dialog.cc
   trunk/src/gnome-cmd-file-selector.cc
   trunk/src/gnome-cmd-file-selector.h
   trunk/src/gnome-cmd-main-win.cc
   trunk/src/gnome-cmd-mkdir-dialog.cc
   trunk/src/gnome-cmd-prepare-copy-dialog.cc
   trunk/src/gnome-cmd-prepare-move-dialog.cc
   trunk/src/gnome-cmd-prepare-xfer-dialog.cc
   trunk/src/gnome-cmd-python-plugin.cc
   trunk/src/gnome-cmd-rename-dialog.cc
   trunk/src/gnome-cmd-search-dialog.cc
   trunk/src/gnome-cmd-user-actions.cc

Modified: trunk/src/gnome-cmd-data.cc
==============================================================================
--- trunk/src/gnome-cmd-data.cc	(original)
+++ trunk/src/gnome-cmd-data.cc	Thu Aug 14 22:09:37 2008
@@ -2424,13 +2424,13 @@
 
 void gnome_cmd_data_get_sort_params (GnomeCmdFileList *fl, gint *col, gboolean *direction)
 {
-    if (!gnome_cmd_main_win_get_fs (main_win, LEFT) || gnome_cmd_main_win_get_fs (main_win, LEFT)->list == fl)
+    if (!gnome_cmd_main_win_get_fs (main_win, LEFT) || gnome_cmd_main_win_get_fs (main_win, LEFT)->file_list() == fl)
     {
         *col = data->priv->sort_column[LEFT];
         *direction = data->priv->sort_direction[LEFT];
     }
     else
-        if (!gnome_cmd_main_win_get_fs (main_win, RIGHT) || gnome_cmd_main_win_get_fs (main_win, RIGHT)->list == fl)
+        if (!gnome_cmd_main_win_get_fs (main_win, RIGHT) || gnome_cmd_main_win_get_fs (main_win, RIGHT)->file_list() == fl)
         {
             *col = data->priv->sort_column[RIGHT];
             *direction = data->priv->sort_direction[RIGHT];
@@ -2440,13 +2440,13 @@
 
 void gnome_cmd_data_set_sort_params (GnomeCmdFileList *fl, gint col, gboolean direction)
 {
-    if (gnome_cmd_main_win_get_fs (main_win, LEFT)->list == fl)
+    if (gnome_cmd_main_win_get_fs (main_win, LEFT)->file_list() == fl)
     {
         data->priv->sort_column[LEFT] = col;
         data->priv->sort_direction[LEFT] = direction;
     }
     else
-        if (gnome_cmd_main_win_get_fs (main_win, RIGHT)->list == fl)
+        if (gnome_cmd_main_win_get_fs (main_win, RIGHT)->file_list() == fl)
         {
             data->priv->sort_column[RIGHT] = col;
             data->priv->sort_direction[RIGHT] = direction;

Modified: trunk/src/gnome-cmd-dir-indicator.cc
==============================================================================
--- trunk/src/gnome-cmd-dir-indicator.cc	(original)
+++ trunk/src/gnome-cmd-dir-indicator.cc	Thu Aug 14 22:09:37 2008
@@ -295,7 +295,7 @@
 {
     g_return_if_fail (GNOME_CMD_IS_DIR_INDICATOR (indicator));
 
-    GtkWidget *w = GTK_WIDGET (indicator->priv->fs->list);
+    GtkWidget *w = GTK_WIDGET (indicator->priv->fs->file_list());
 
     gdk_window_get_origin (w->window, x, y);
 }

Modified: trunk/src/gnome-cmd-file-props-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-file-props-dialog.cc	(original)
+++ trunk/src/gnome-cmd-file-props-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -218,7 +218,7 @@
         result = gnome_cmd_file_rename (data->finfo, filename);
 
         if (result==GNOME_VFS_OK)
-            gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->list, filename, TRUE);
+            gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), filename, TRUE);
     }
 
     if (result == GNOME_VFS_OK)

Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc	(original)
+++ trunk/src/gnome-cmd-file-selector.cc	Thu Aug 14 22:09:37 2008
@@ -62,14 +62,20 @@
 
     GtkWidget *filter_box;
 
+    History *dir_history;
     gboolean active;
     gboolean realized;
+
+    Private();
+    ~Private();
+
+    //////////////////////////////////////////////////////////////////  ->> GnomeCmdFileList
+
     gboolean sel_first_file;
     GnomeCmdCon *con;
     GnomeCmdDir *cwd, *lwd; // current & last working dir
     GnomeCmdDir *connected_dir;
     GList *old_btns;
-    History *dir_history;
     GnomeCmdFile *sym_file;
     GtkWidget *con_open_dialog;
     GtkWidget *con_open_dialog_label;
@@ -79,9 +85,6 @@
     gboolean autoscroll_dir;
     guint autoscroll_timeout;
     gint autoscroll_y;
-
-    Private();
-    ~Private();
 };
 
 
@@ -133,8 +136,8 @@
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->list);
-    gnome_cmd_file_list_show_dir_size (fs->list, f);
+    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->file_list());
+    gnome_cmd_file_list_show_dir_size (fs->file_list(), f);
 }
 
 
@@ -142,7 +145,7 @@
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    GList *all_files = gnome_cmd_file_list_get_all_files (fs->list);
+    GList *all_files = gnome_cmd_file_list_get_all_files (fs->file_list());
 
     if (!all_files)
         return;
@@ -183,7 +186,7 @@
         }
     }
 
-    GList *sel_files = gnome_cmd_file_list_get_marked_files (fs->list);
+    GList *sel_files = gnome_cmd_file_list_get_marked_files (fs->file_list());
     for (GList *tmp = sel_files; tmp; tmp = tmp->next)
     {
         GnomeCmdFile *f = (GnomeCmdFile *) tmp->data;
@@ -234,10 +237,10 @@
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    gnome_cmd_file_list_invalidate_tree_size (fs->list);
+    gnome_cmd_file_list_invalidate_tree_size (fs->file_list());
 
-    for (GList *files = gnome_cmd_file_list_get_all_files (fs->list); files; files = files->next)
-        gnome_cmd_file_list_show_dir_size (fs->list, (GnomeCmdFile *) files->data);
+    for (GList *files = gnome_cmd_file_list_get_all_files (fs->file_list()); files; files = files->next)
+        gnome_cmd_file_list_show_dir_size (fs->file_list(), (GnomeCmdFile *) files->data);
 
     update_selected_files_label (fs);
 }
@@ -365,13 +368,13 @@
         list2 = g_list_append (list2, create_parent_dir_file (dir));
     g_free (path);
 
-    gnome_cmd_file_list_show_files (fs->list, list2, TRUE);
-    gnome_cmd_clist_set_voffset (GNOME_CMD_CLIST (fs->list), fs->priv->cwd->voffset);
+    gnome_cmd_file_list_show_files (fs->file_list(), list2, TRUE);
+    gnome_cmd_clist_set_voffset (GNOME_CMD_CLIST (fs->file_list()), fs->priv->cwd->voffset);
 
     if (fs->priv->realized)
         update_selected_files_label (fs);
     if (fs->priv->active)
-        gnome_cmd_file_list_select_row (fs->list, 0);
+        gnome_cmd_file_list_select_row (fs->file_list(), 0);
 
     if (list2)
         g_list_free (list2);
@@ -396,7 +399,7 @@
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (GNOME_CMD_FILE_LIST (fs->list));
+    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->file_list());
 
     if (GNOME_CMD_IS_FILE (f))
     {
@@ -414,7 +417,7 @@
 
 inline void restore_drag_indicator (GnomeCmdFileSelector *fs)
 {
-    gnome_cmd_clist_set_drag_row (GNOME_CMD_CLIST (fs->list), -1);
+    gnome_cmd_clist_set_drag_row (GNOME_CMD_CLIST (fs->file_list()), -1);
 }
 
 
@@ -436,7 +439,7 @@
                     guint32             time,
                     GnomeCmdFileSelector *fs)
 {
-    GtkCList *clist = GTK_CLIST (fs->list);
+    GtkCList *clist = GTK_CLIST (fs->file_list());
     GnomeCmdFile *f;
     GnomeCmdDir *to, *cwd;
     GList *uri_list = NULL;
@@ -468,7 +471,7 @@
     y -= (clist->column_title_area.height - GTK_CONTAINER (clist)->border_width);
     if (y < 0) return;
 
-    int row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), x, y);
+    int row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->file_list()), x, y);
 
     // Transform the drag data to a list with uris
     uri_list = strings_to_uris ((gchar *) selection_data->data);
@@ -479,7 +482,7 @@
         to_fn = gnome_vfs_unescape_string (gnome_vfs_uri_extract_short_name (uri), 0);
     }
 
-    f = gnome_cmd_file_list_get_file_at_row (fs->list, row);
+    f = gnome_cmd_file_list_get_file_at_row (fs->file_list(), row);
     cwd = fs->get_directory();
 
     if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
@@ -542,8 +545,8 @@
     GnomeCmdDir *dir = fs->get_directory();
     g_return_if_fail (GNOME_CMD_IS_DIR (dir));
 
-    GList *files = gnome_cmd_file_list_get_selected_files (fs->list);
-    gnome_cmd_file_list_remove_files (fs->list, files);
+    GList *files = gnome_cmd_file_list_get_selected_files (fs->file_list());
+    gnome_cmd_file_list_remove_files (fs->file_list(), files);
     g_list_free (files);
 }
 
@@ -555,16 +558,16 @@
     gint row_count;
     guint offset;
     gint row_height;
-    GtkCList *clist = GTK_CLIST (fs->list);
+    GtkCList *clist = GTK_CLIST (fs->file_list());
 
     gdk_window_get_size (GTK_WIDGET (clist)->window, &w, &h);
 
     offset = (0-clist->voffset);
     row_height = gnome_cmd_data_get_list_row_height();
     row_count = clist->rows;
-    focus_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), 1, fs->priv->autoscroll_y);
-    top_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), 1, 0);
-    bottom_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), 1, h);
+    focus_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->file_list()), 1, fs->priv->autoscroll_y);
+    top_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->file_list()), 1, 0);
+    bottom_row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->file_list()), 1, h);
 
     if (!fs->priv->autoscroll_dir)
     {
@@ -589,7 +592,7 @@
 {
     if (y < 0) return;
 
-    GtkCList *clist = GTK_CLIST (fs->list);
+    GtkCList *clist = GTK_CLIST (fs->file_list());
     guint offset = (0-clist->voffset);
     gint w, h;
 
@@ -628,15 +631,15 @@
 {
     gdk_drag_status (context, context->suggested_action, time);
 
-    GtkCList *clist = GTK_CLIST (fs->list);
+    GtkCList *clist = GTK_CLIST (fs->file_list());
 
     y -= (clist->column_title_area.height - GTK_CONTAINER (clist)->border_width);
 
-    gint row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), x, y);
+    gint row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->file_list()), x, y);
 
     if (row > -1)
     {
-        GnomeCmdFile *f = gnome_cmd_file_list_get_file_at_row (fs->list, row);
+        GnomeCmdFile *f = gnome_cmd_file_list_get_file_at_row (fs->file_list(), row);
 
         if (f->info->type != GNOME_VFS_FILE_TYPE_DIRECTORY)
             row = -1;
@@ -655,20 +658,20 @@
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
     // Set up drag source
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-begin", GTK_SIGNAL_FUNC (drag_begin), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-end", GTK_SIGNAL_FUNC (drag_end), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-data-delete", GTK_SIGNAL_FUNC (drag_data_delete), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-begin", GTK_SIGNAL_FUNC (drag_begin), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-end", GTK_SIGNAL_FUNC (drag_end), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-data-delete", GTK_SIGNAL_FUNC (drag_data_delete), fs);
 
     // Set up drag destination
-    gtk_drag_dest_set (GTK_WIDGET (fs->list),
+    gtk_drag_dest_set (GTK_WIDGET (fs->file_list()),
                        GTK_DEST_DEFAULT_DROP,
                        drop_types, G_N_ELEMENTS (drop_types),
                        (GdkDragAction) (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK));
 
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-motion", GTK_SIGNAL_FUNC (drag_motion), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "drag-data-received", GTK_SIGNAL_FUNC (drag_data_received), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-motion", GTK_SIGNAL_FUNC (drag_motion), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "drag-data-received", GTK_SIGNAL_FUNC (drag_data_received), fs);
 }
 
 
@@ -780,7 +783,7 @@
 
     // focus the current dir when going back to the parent dir
     if (focus_dir)
-        gnome_cmd_file_list_focus_file (fs->list, focus_dir, FALSE);
+        gnome_cmd_file_list_focus_file (fs->file_list(), focus_dir, FALSE);
 
     g_free (dir);
 }
@@ -794,7 +797,7 @@
 
     if (f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
     {
-        gnome_cmd_file_list_invalidate_tree_size (fs->list);
+        gnome_cmd_file_list_invalidate_tree_size (fs->file_list());
 
         if (strcmp (f->info->name, "..") == 0)
             goto_directory (fs, "..");
@@ -806,7 +809,7 @@
 
 inline gboolean file_is_in_list (GnomeCmdFileSelector *fs, GnomeCmdFile *f)
 {
-    return g_list_index (gnome_cmd_file_list_get_all_files (fs->list), f) != -1;
+    return g_list_index (gnome_cmd_file_list_get_all_files (fs->file_list()), f) != -1;
 }
 
 
@@ -814,7 +817,7 @@
 {
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
-    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->list);
+    GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->file_list());
 
     if (f && gnome_cmd_data_get_cmdline_visibility ())
     {
@@ -863,7 +866,7 @@
     if (!file_is_wanted (f->info))
         return;
 
-    gnome_cmd_file_list_insert_file (fs->list, f);
+    gnome_cmd_file_list_insert_file (fs->file_list(), f);
     update_selected_files_label (fs);
 }
 
@@ -876,7 +879,7 @@
 
     if (fs->priv->cwd == dir && file_is_in_list (fs, f))
     {
-        fs->list->remove_file(f);
+        fs->file_list()->remove_file(f);
         update_selected_files_label (fs);
     }
 }
@@ -891,7 +894,7 @@
     if (file_is_in_list (fs, f))
     {
         gnome_cmd_file_invalidate_metadata (f);
-        gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), f);
+        gnome_cmd_file_list_update_file (fs->file_list(), f);
         update_selected_files_label (fs);
     }
 }
@@ -906,12 +909,12 @@
     if (file_is_in_list (fs, f))
     {
         // gnome_cmd_file_invalidate_metadata (f, TAG_FILE);
-        gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), f);
+        gnome_cmd_file_list_update_file (fs->file_list(), f);
 
-        GnomeCmdFileListColumnID sort_col = gnome_cmd_file_list_get_sort_column (GNOME_CMD_FILE_LIST (fs->list));
+        GnomeCmdFileListColumnID sort_col = gnome_cmd_file_list_get_sort_column (fs->file_list());
 
         if (sort_col==FILE_LIST_COLUMN_NAME || sort_col==FILE_LIST_COLUMN_EXT)
-            gnome_cmd_file_list_sort (GNOME_CMD_FILE_LIST (fs->list));
+            gnome_cmd_file_list_sort (fs->file_list());
     }
 }
 
@@ -1075,7 +1078,7 @@
     {
         gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
         set_cursor_default_for_widget (GTK_WIDGET (fs));
-        gtk_widget_grab_focus (GTK_WIDGET (fs->list));
+        gtk_widget_grab_focus (GTK_WIDGET (fs->file_list()));
     }
 
     if (fs->priv->connected_dir != dir)
@@ -1123,12 +1126,12 @@
 
     if (!fs->priv->active)
     {
-        GTK_CLIST (fs->list)->focus_row = -1;
-        gtk_clist_unselect_all (GTK_CLIST (fs->list));
+        GTK_CLIST (fs->file_list())->focus_row = -1;
+        gtk_clist_unselect_all (GTK_CLIST (fs->file_list()));
     }
 
     if (fs->priv->sel_first_file && fs->priv->active)
-        gtk_clist_select_row (GTK_CLIST (fs->list), 0, 0);
+        gtk_clist_select_row (GTK_CLIST (fs->file_list()), 0, 0);
 
     update_selected_files_label (fs);
 
@@ -1182,13 +1185,13 @@
 {
     gboolean ret = FALSE;
 
-    if (gnome_cmd_file_list_keypressed (fs->list, event))
+    if (gnome_cmd_file_list_keypressed (fs->file_list(), event))
         ret = TRUE;
     else if (gnome_cmd_file_selector_keypressed (fs, event))
         ret = TRUE;
     else if (gnome_cmd_main_win_keypressed (main_win, event))
         ret = TRUE;
-    else if (gcmd_user_actions.handle_key_event(main_win, fs->list, event))
+    else if (gcmd_user_actions.handle_key_event(main_win, fs->file_list(), event))
         ret = TRUE;
 
     if (ret)
@@ -1209,7 +1212,7 @@
             static gchar text[2];
 
             if (!gnome_cmd_data_get_cmdline_visibility ())
-                gnome_cmd_file_list_show_quicksearch (fs->list, (gchar)event->keyval);
+                gnome_cmd_file_list_show_quicksearch (fs->file_list(), (gchar)event->keyval);
             else
             {
                 text[0] = event->keyval;
@@ -1296,8 +1299,8 @@
     gtk_widget_ref (fs->list_widget);
     gtk_object_set_data_full (GTK_OBJECT (fs), "list_widget", fs->list_widget,
                               (GtkDestroyNotify) gtk_widget_unref);
-    fs->list = GNOME_CMD_FILE_LIST (fs->list_widget);
-    fs->list->show_column(FILE_LIST_COLUMN_DIR, FALSE);
+    fs->file_list() = GNOME_CMD_FILE_LIST (fs->list_widget);            // FIXME: file_list() = ...
+    fs->file_list()->show_column(FILE_LIST_COLUMN_DIR, FALSE);
 
     // create the connection combo
     fs->con_combo = gnome_cmd_combo_new (2, 1, NULL);
@@ -1374,18 +1377,18 @@
     gtk_signal_connect (GTK_OBJECT (fs->con_combo), "popwin-hidden",
                         GTK_SIGNAL_FUNC (on_combo_popwin_hidden), fs);
 
-    gtk_signal_connect (GTK_OBJECT (fs->list), "file-clicked",
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "file-clicked",
                         GTK_SIGNAL_FUNC (on_list_file_clicked), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "list-clicked",
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "list-clicked",
                         GTK_SIGNAL_FUNC (on_list_list_clicked), fs);
-    gtk_signal_connect (GTK_OBJECT (fs->list), "empty-space-clicked",
+    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->list), "selection_changed",
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "selection_changed",
                         GTK_SIGNAL_FUNC (on_list_selection_changed), fs);
 
-    gtk_signal_connect (GTK_OBJECT (fs->list), "key-press-event",
+    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->list), "key-press-event",
+    gtk_signal_connect (GTK_OBJECT (fs->file_list()), "key-press-event",
                         GTK_SIGNAL_FUNC (on_list_key_pressed_private), fs);
 
     gtk_signal_connect (GTK_OBJECT (fs->root_btn), "clicked",
@@ -1717,7 +1720,7 @@
 
     if (!fs_is_active)
     {
-        GnomeCmdFile *file = gnome_cmd_file_list_get_selected_file (other->list);
+        GnomeCmdFile *file = gnome_cmd_file_list_get_selected_file (other->file_list());
 
         if (file && file->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
             dir = gnome_cmd_dir_new_from_info (file->info, dir);
@@ -1826,7 +1829,7 @@
     g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
 
     gnome_cmd_combo_update_style (GNOME_CMD_COMBO (fs->con_combo));
-    gnome_cmd_file_list_update_style (fs->list);
+    gnome_cmd_file_list_update_style (fs->file_list());
 
     if (fs->priv->realized)
         update_files (fs);
@@ -1980,12 +1983,12 @@
 
             case GDK_Left:
                 fs->back();
-                stop_kp(GTK_OBJECT(fs->list));
+                stop_kp (GTK_OBJECT (fs->file_list()));
                 return TRUE;
 
             case GDK_Right:
                 fs->forward();
-                stop_kp(GTK_OBJECT(fs->list));
+                stop_kp (GTK_OBJECT (fs->file_list()));
                 return TRUE;
         }
     }
@@ -2018,7 +2021,7 @@
                 return TRUE;
 
             case GDK_Page_Down:
-                f = gnome_cmd_file_list_get_selected_file (fs->list);
+                f = gnome_cmd_file_list_get_selected_file (fs->file_list());
                 if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
                     do_file_specific_action (fs, f);
                 return TRUE;
@@ -2035,9 +2038,9 @@
         {
             case GDK_space:
                 set_cursor_busy ();
-                gnome_cmd_file_list_toggle (fs->list);
+                gnome_cmd_file_list_toggle (fs->file_list());
                 show_selected_dir_tree_size (fs);
-                stop_kp (GTK_OBJECT (fs->list));
+                stop_kp (GTK_OBJECT (fs->file_list()));
                 update_selected_files_label (fs);
                 set_cursor_default ();
                 return TRUE;
@@ -2050,10 +2053,10 @@
 
             case GDK_Right:
             case GDK_KP_Right:
-                f = gnome_cmd_file_list_get_selected_file (fs->list);
+                f = gnome_cmd_file_list_get_selected_file (fs->file_list());
                 if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
                     do_file_specific_action (fs, f);
-                stop_kp (GTK_OBJECT (fs->list));
+                stop_kp (GTK_OBJECT (fs->file_list()));
                 return TRUE;
 
             case GDK_Return:
@@ -2062,7 +2065,7 @@
                     && gnome_cmd_cmdline_is_empty (gnome_cmd_main_win_get_cmdline (main_win)))
                     gnome_cmd_cmdline_exec (gnome_cmd_main_win_get_cmdline (main_win));
                 else
-                    do_file_specific_action (fs, gnome_cmd_file_list_get_focused_file (fs->list));
+                    do_file_specific_action (fs, gnome_cmd_file_list_get_focused_file (fs->file_list()));
                 return TRUE;
 
             case GDK_Escape:

Modified: trunk/src/gnome-cmd-file-selector.h
==============================================================================
--- trunk/src/gnome-cmd-file-selector.h	(original)
+++ trunk/src/gnome-cmd-file-selector.h	Thu Aug 14 22:09:37 2008
@@ -52,14 +52,21 @@
     GtkWidget *scrolledwindow;
     GtkWidget *info_label;
     GtkWidget *list_widget;
-    GnomeCmdFileList *list;
     GtkWidget *con_combo;
     GtkWidget *vol_label;
 
+  private:
+
+    GnomeCmdFileList *list;
+
+  public:
+
     class Private;
 
     Private *priv;
 
+    GnomeCmdFileList *&file_list()          {  return list;  }
+    
     GnomeCmdDir *get_directory();
     void set_directory(GnomeCmdDir *dir);
 
@@ -78,7 +85,7 @@
     GnomeCmdCon *get_connection();
     void set_connection(GnomeCmdCon *con, GnomeCmdDir *start_dir=NULL);
 
-    gboolean is_local()                  {  return gnome_cmd_con_is_local (get_connection ());  }
+    gboolean is_local()                     {  return gnome_cmd_con_is_local (get_connection ());  }
 };
 
 

Modified: trunk/src/gnome-cmd-main-win.cc
==============================================================================
--- trunk/src/gnome-cmd-main-win.cc	(original)
+++ trunk/src/gnome-cmd-main-win.cc	Thu Aug 14 22:09:37 2008
@@ -141,16 +141,16 @@
         return FALSE;
 
     GnomeCmdFileSelector *fs = gnome_cmd_main_win_get_fs (mw, ACTIVE);
-    if (fs==NULL || fs->list==NULL)
+    if (fs==NULL || fs->file_list()==NULL)
         return FALSE;
 
-    if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (fs->list)))
+    if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (fs->file_list())))
         return FALSE;
 
-    if (gnome_cmd_file_list_quicksearch_shown (fs->list))
+    if (gnome_cmd_file_list_quicksearch_shown (fs->file_list()))
         return FALSE;
 
-    gnome_cmd_file_list_show_quicksearch (fs->list, event->keyval);
+    gnome_cmd_file_list_show_quicksearch (fs->file_list(), event->keyval);
 
     return TRUE;
 }
@@ -816,15 +816,15 @@
     gtk_signal_connect (GTK_OBJECT (mw->priv->file_selector[LEFT]), "changed-dir", GTK_SIGNAL_FUNC (on_fs_dir_change), mw);
     gtk_signal_connect (GTK_OBJECT (mw->priv->file_selector[RIGHT]), "changed-dir", GTK_SIGNAL_FUNC (on_fs_dir_change), mw);
 
-    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->list),
+    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->file_list()),
                         "resize_column", GTK_SIGNAL_FUNC (on_fs_list_resize_column),
-                        GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->list);
-    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->list),
+                        GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->file_list());
+    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->file_list()),
                         "resize_column", GTK_SIGNAL_FUNC (on_fs_list_resize_column),
-                        GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->list);
-    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->list),
+                        GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->file_list());
+    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[LEFT])->file_list()),
                         "button_press_event", GTK_SIGNAL_FUNC (on_left_fs_select), mw);
-    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->list),
+    gtk_signal_connect (GTK_OBJECT (GNOME_CMD_FILE_SELECTOR (mw->priv->file_selector[RIGHT])->file_list()),
                         "button_press_event", GTK_SIGNAL_FUNC (on_right_fs_select), mw);
     gtk_signal_connect (GTK_OBJECT (mw), "size-allocate", GTK_SIGNAL_FUNC (on_size_allocate), mw);
     gtk_signal_connect (GTK_OBJECT (mw), "delete-event", GTK_SIGNAL_FUNC (on_delete_event), mw);
@@ -1312,10 +1312,10 @@
     GnomeCmdState *state = &mw->priv->state;
     state->active_dir_uri = gnome_cmd_file_get_uri (GNOME_CMD_FILE (dir1));
     state->inactive_dir_uri = gnome_cmd_file_get_uri (GNOME_CMD_FILE (dir2));
-    state->active_dir_files = gnome_cmd_file_list_get_all_files (fs1->list);
-    state->inactive_dir_files = gnome_cmd_file_list_get_all_files (fs2->list);
-    state->active_dir_selected_files = gnome_cmd_file_list_get_selected_files (fs1->list);
-    state->inactive_dir_selected_files = gnome_cmd_file_list_get_selected_files (fs2->list);
+    state->active_dir_files = gnome_cmd_file_list_get_all_files (fs1->file_list());
+    state->inactive_dir_files = gnome_cmd_file_list_get_all_files (fs2->file_list());
+    state->active_dir_selected_files = gnome_cmd_file_list_get_selected_files (fs1->file_list());
+    state->inactive_dir_selected_files = gnome_cmd_file_list_get_selected_files (fs2->file_list());
 
     return state;
 }

Modified: trunk/src/gnome-cmd-mkdir-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-mkdir-dialog.cc	(original)
+++ trunk/src/gnome-cmd-mkdir-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -119,7 +119,7 @@
                 string mkdir_uri_str = stringify (gnome_vfs_uri_to_string (mkdir_uri, GNOME_VFS_URI_HIDE_NONE));
 
                 gnome_cmd_dir_file_created (dialog->priv->dir, mkdir_uri_str.c_str());
-                gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->list, focus_filename.c_str(), TRUE);
+                gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), focus_filename.c_str(), TRUE);
                 new_dir_focused = TRUE;
             }
     }

Modified: trunk/src/gnome-cmd-prepare-copy-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-prepare-copy-dialog.cc	(original)
+++ trunk/src/gnome-cmd-prepare-copy-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -75,7 +75,7 @@
     gint num_files;
     gchar *dest_dir_frame_msg, *text;
     GtkWidget *label;
-    GList *tmp = gnome_cmd_file_list_get_selected_files (from->list);
+    GList *tmp = gnome_cmd_file_list_get_selected_files (from->file_list());
 
     if (!tmp)
     {

Modified: trunk/src/gnome-cmd-prepare-move-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-prepare-move-dialog.cc	(original)
+++ trunk/src/gnome-cmd-prepare-move-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -71,7 +71,7 @@
     gchar *dest_dir_frame_msg, *text;
     GtkWidget *label;
 
-    GList *tmp = gnome_cmd_file_list_get_selected_files (from->list);
+    GList *tmp = gnome_cmd_file_list_get_selected_files (from->file_list());
 
     if (!tmp)
     {

Modified: trunk/src/gnome-cmd-prepare-xfer-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-prepare-xfer-dialog.cc	(original)
+++ trunk/src/gnome-cmd-prepare-xfer-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -223,7 +223,7 @@
     gnome_cmd_dir_ref (dest_dir);
     gnome_cmd_xfer_start (dialog->src_files,
                           dest_dir,
-                          dialog->src_fs->list,
+                          dialog->src_fs->file_list(),
                           dest_fn,
                           dialog->xferOptions,
                           dialog->xferOverwriteMode,
@@ -380,7 +380,7 @@
     gchar *dest_str = NULL;
     GnomeCmdPrepareXferDialog *dialog = (GnomeCmdPrepareXferDialog *) gtk_type_new (gnome_cmd_prepare_xfer_dialog_get_type ());
 
-    dialog->src_files = gnome_cmd_file_list_get_selected_files (from->list);
+    dialog->src_files = gnome_cmd_file_list_get_selected_files (from->file_list());
     gnome_cmd_file_list_ref (dialog->src_files);
     dialog->default_dest_dir = to->get_directory();
     dialog->src_fs = from;

Modified: trunk/src/gnome-cmd-python-plugin.cc
==============================================================================
--- trunk/src/gnome-cmd-python-plugin.cc	(original)
+++ trunk/src/gnome-cmd-python-plugin.cc	Thu Aug 14 22:09:37 2008
@@ -246,7 +246,7 @@
     GnomeCmdFileList     *active_fl;
 
     active_fs = gnome_cmd_main_win_get_fs (mw, ACTIVE);
-    active_fl = active_fs ? active_fs->list : NULL;
+    active_fl = active_fs ? active_fs->file_list() : NULL;
 
     if (!GNOME_CMD_IS_FILE_LIST (active_fl))
         goto out_D;

Modified: trunk/src/gnome-cmd-rename-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-rename-dialog.cc	(original)
+++ trunk/src/gnome-cmd-rename-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -57,7 +57,7 @@
                 GnomeVFSResult result = gnome_cmd_file_rename (dialog->priv->finfo, new_fname);
 
                 if (result==GNOME_VFS_OK)
-                    gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->list, new_fname, TRUE);
+                    gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), new_fname, TRUE);
 
                 gnome_cmd_file_unref (dialog->priv->finfo);
                 gtk_widget_destroy (widget);

Modified: trunk/src/gnome-cmd-search-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-search-dialog.cc	(original)
+++ trunk/src/gnome-cmd-search-dialog.cc	Thu Aug 14 22:09:37 2008
@@ -643,7 +643,7 @@
 
     GnomeCmdFileSelector *fs = gnome_cmd_main_win_get_fs (main_win, ACTIVE);
     gnome_cmd_file_selector_goto_directory (fs, dpath);
-    gnome_cmd_file_list_focus_file (fs->list, gnome_cmd_file_get_name (finfo), TRUE);
+    gnome_cmd_file_list_focus_file (fs->file_list(), gnome_cmd_file_get_name (finfo), TRUE);
 
     g_free (fpath);
     g_free (dpath);

Modified: trunk/src/gnome-cmd-user-actions.cc
==============================================================================
--- trunk/src/gnome-cmd-user-actions.cc	(original)
+++ trunk/src/gnome-cmd-user-actions.cc	Thu Aug 14 22:09:37 2008
@@ -57,7 +57,7 @@
 {
     GnomeCmdFileSelector *fs = get_fs (fsID);
 
-    return fs ? fs->list : NULL;
+    return fs ? fs->file_list() : NULL;
 }
 
 



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