[gnome-commander] XML config: write opened tabs on exit only if set gnome_cmd_data.save_tabs_on_exit
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] XML config: write opened tabs on exit only if set gnome_cmd_data.save_tabs_on_exit
- Date: Mon, 2 Aug 2010 21:29:52 +0000 (UTC)
commit 514c2b2b15b73ada5d5992b7829eb20c99a1f23d
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Mon Aug 2 23:24:36 2010 +0200
XML config: write opened tabs on exit only if set gnome_cmd_data.save_tabs_on_exit
src/gnome-cmd-data.cc | 3 +--
src/gnome-cmd-file-selector.cc | 19 +++++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 81462aa..70aae4f 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1672,8 +1672,7 @@ void GnomeCmdData::save()
xml << XML::comment("Created with GNOME Commander (http://www.nongnu.org/gcmd/)");
xml << XML::tag("GnomeCommander") << XML::attr("version") << VERSION;
- if (save_tabs_on_exit)
- xml << *main_win;
+ xml << *main_win;
xml << advrename_defaults;
xml << search_defaults;
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 296e27c..002757c 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1356,17 +1356,20 @@ GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, GnomeCmdFileList::Col
XML::xstream &operator << (XML::xstream &xml, GnomeCmdFileSelector &fs)
{
- GList *tabs = gtk_container_get_children (*fs.notebook);
-
- for (GList *i=tabs; i; i=i->next)
+ if (gnome_cmd_data.save_tabs_on_exit)
{
- GnomeCmdFileList *fl = (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (i->data));
+ GList *tabs = gtk_container_get_children (*fs.notebook);
- if (GNOME_CMD_FILE_LIST (fl) && gnome_cmd_con_is_local (fl->con))
- xml << *fl;
- }
+ for (GList *i=tabs; i; i=i->next)
+ {
+ GnomeCmdFileList *fl = (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (i->data));
- g_list_free (tabs);
+ if (GNOME_CMD_FILE_LIST (fl) && gnome_cmd_con_is_local (fl->con))
+ xml << *fl;
+ }
+
+ g_list_free (tabs);
+ }
return xml;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]