[gnome-commander/gcmd-1-3] Moved GnomeCmdFileSelector::reload() to GnomeCmdFileList::reload()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] Moved GnomeCmdFileSelector::reload() to GnomeCmdFileList::reload()
- Date: Tue, 14 Jul 2009 22:19:48 +0000 (UTC)
commit b67c5454aa2055df6f80f4374e856cd75e424fb9
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Wed Jul 15 00:03:31 2009 +0200
Moved GnomeCmdFileSelector::reload() to GnomeCmdFileList::reload()
src/gnome-cmd-file-list.cc | 9 +++++++++
src/gnome-cmd-file-list.h | 2 ++
src/gnome-cmd-file-selector.cc | 11 -----------
src/gnome-cmd-file-selector.h | 2 --
src/gnome-cmd-list-popmenu.cc | 2 +-
src/gnome-cmd-user-actions.cc | 10 +++++-----
6 files changed, 17 insertions(+), 19 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index b7b4a72..3d72c64 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1617,6 +1617,15 @@ void GnomeCmdFileList::clear()
}
+void GnomeCmdFileList::reload()
+{
+ g_return_if_fail (GNOME_CMD_IS_DIR (cwd));
+
+ unselect_all();
+ gnome_cmd_dir_relist_files (cwd, gnome_cmd_con_needs_list_visprog (con));
+}
+
+
GList *GnomeCmdFileList::get_selected_files()
{
if (priv->selected_files)
diff --git a/src/gnome-cmd-file-list.h b/src/gnome-cmd-file-list.h
index 9d7e086..ff5a587 100644
--- a/src/gnome-cmd-file-list.h
+++ b/src/gnome-cmd-file-list.h
@@ -102,6 +102,8 @@ struct GnomeCmdFileList
// bool empty() { return get_visible_files()==NULL; } // FIXME should be: size()==0
void clear();
+ void reload();
+
void append_file(GnomeCmdFile *f);
gboolean insert_file(GnomeCmdFile *f); // Returns TRUE if file added to shown file list, FALSE otherwise
gboolean remove_file(GnomeCmdFile *f);
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 1e1e402..d6e87db 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1288,17 +1288,6 @@ GtkWidget *gnome_cmd_file_selector_new ()
}
-void GnomeCmdFileSelector::reload()
-{
- file_list()->unselect_all();
-
- GnomeCmdDir *dir = get_directory();
- g_return_if_fail (GNOME_CMD_IS_DIR (dir));
-
- gnome_cmd_dir_relist_files (dir, gnome_cmd_con_needs_list_visprog (get_connection()));
-}
-
-
void gnome_cmd_file_selector_start_editor (GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index e38ee57..2ed3ab6 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -73,8 +73,6 @@ struct GnomeCmdFileSelector
void set_directory(GnomeCmdDir *dir);
void goto_directory(const gchar *dir);
- void reload();
-
void first();
void back();
void forward();
diff --git a/src/gnome-cmd-list-popmenu.cc b/src/gnome-cmd-list-popmenu.cc
index a0e783c..069851e 100644
--- a/src/gnome-cmd-list-popmenu.cc
+++ b/src/gnome-cmd-list-popmenu.cc
@@ -50,7 +50,7 @@ static void on_new_textfile (GtkMenuItem *item, GnomeCmdFileSelector *fs)
static void on_refresh (GtkMenuItem *item, GnomeCmdFileSelector *fs)
{
- fs->reload();
+ fs->file_list()->reload();
}
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index d163a6d..650bb61 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1295,8 +1295,8 @@ void view_hidden_files (GtkMenuItem *menuitem, gpointer not_used)
GtkCheckMenuItem *checkitem = (GtkCheckMenuItem *) menuitem;
gnome_cmd_data.filter_settings.hidden = !checkitem->active;
- get_fs (ACTIVE)->reload();
- get_fs (INACTIVE)->reload();
+ get_fl (ACTIVE)->reload();
+ get_fl (INACTIVE)->reload();
}
@@ -1306,8 +1306,8 @@ void view_backup_files (GtkMenuItem *menuitem, gpointer not_used)
GtkCheckMenuItem *checkitem = (GtkCheckMenuItem *) menuitem;
gnome_cmd_data.filter_settings.backup = !checkitem->active;
- get_fs (ACTIVE)->reload();
- get_fs (INACTIVE)->reload();
+ get_fl (ACTIVE)->reload();
+ get_fl (INACTIVE)->reload();
}
@@ -1343,7 +1343,7 @@ void view_last (GtkMenuItem *menuitem, gpointer not_used)
void view_refresh (GtkMenuItem *menuitem, gpointer not_used)
{
- get_fs (ACTIVE)->reload();
+ get_fl (ACTIVE)->reload();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]