[gnome-commander/ConfigurableFileListColumns: 25/26] noop: Refactoring
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConfigurableFileListColumns: 25/26] noop: Refactoring
- Date: Sun, 12 May 2019 13:20:00 +0000 (UTC)
commit e3d0df2089456c45874954b596709db740b1fbf8
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat May 11 19:03:57 2019 +0200
noop: Refactoring
src/gnome-cmd-file-selector.cc | 2 +-
src/gnome-cmd-main-win.cc | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index d1d740e5..d9e0c74f 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1478,7 +1478,7 @@ GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, GnomeCmdFileList::Col
GtkSortType sort_order, gboolean locked, gboolean activate)
{
// create the list
- GnomeCmdFileList *fl = new GnomeCmdFileList(sort_col,sort_order);
+ GnomeCmdFileList *fl = new GnomeCmdFileList(sort_col, sort_order);
if (activate)
this->list = fl; // ... update GnomeCmdFileSelector::list to point at newly created
tab
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 1bd2c60d..fae8142d 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1153,14 +1153,16 @@ void GnomeCmdMainWin::open_tabs(FileSelectorID id)
GnomeCmdCon *home = get_home_con ();
if (gnome_cmd_data.tabs[id].empty())
- gnome_cmd_data.tabs[id].push_back(make_pair(string(g_get_home_dir ()),
make_triple(GnomeCmdFileList::COLUMN_NAME, GTK_SORT_ASCENDING, FALSE)));
+ gnome_cmd_data.tabs[id].push_back(
+ make_pair(string(g_get_home_dir ()),
+ make_triple(GnomeCmdFileList::COLUMN_NAME, GTK_SORT_ASCENDING, FALSE)));
- vector<GnomeCmdData::Tab>::const_iterator last_tab =
unique(gnome_cmd_data.tabs[id].begin(),gnome_cmd_data.tabs[id].end());
+ auto last_tab = unique(gnome_cmd_data.tabs[id].begin(), gnome_cmd_data.tabs[id].end());
- for (vector<GnomeCmdData::Tab>::const_iterator i=gnome_cmd_data.tabs[id].begin(); i!=last_tab; ++i)
+ for (auto tab = gnome_cmd_data.tabs[id].begin(); tab != last_tab; ++tab)
{
- GnomeCmdDir *dir = gnome_cmd_dir_new (home, gnome_cmd_con_create_path (home, i->first.c_str()));
- fs(id)->new_tab(dir, i->second.first, i->second.second, i->second.third, TRUE);
+ GnomeCmdDir *dir = gnome_cmd_dir_new (home, gnome_cmd_con_create_path (home, tab->first.c_str()));
+ fs(id)->new_tab(dir, tab->second.first, tab->second.second, tab->second.third, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]