Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gnome-commander
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
75
Issues
75
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnome-commander
Commits
906cfe63
Commit
906cfe63
authored
Aug 07, 2016
by
Uwe Scholz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merges master into GSettings branch
parent
fef432b6
Changes
40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
674 additions
and
555 deletions
+674
-555
NEWS
NEWS
+3
-0
README.md
README.md
+1
-1
TODO
TODO
+0
-1
doc/C/releases.xml
doc/C/releases.xml
+9
-0
po/ar.po
po/ar.po
+1
-0
po/bg.po
po/bg.po
+1
-0
po/da.po
po/da.po
+1
-0
po/dz.po
po/dz.po
+1
-0
po/en_CA.po
po/en_CA.po
+1
-0
po/en_GB.po
po/en_GB.po
+1
-0
po/eo.po
po/eo.po
+1
-1
po/es.po
po/es.po
+168
-168
po/fr.po
po/fr.po
+1
-1
po/ga.po
po/ga.po
+1
-1
po/hr.po
po/hr.po
+1
-0
po/hu.po
po/hu.po
+267
-262
po/ko.po
po/ko.po
+1
-0
po/nb.po
po/nb.po
+1
-1
po/ne.po
po/ne.po
+1
-0
po/pa.po
po/pa.po
+1
-0
po/rw.po
po/rw.po
+1
-1
po/sl.po
po/sl.po
+1
-1
po/sq.po
po/sq.po
+1
-0
po/sr@latin.po
po/sr@latin.po
+1
-1
po/th.po
po/th.po
+1
-0
po/uk.po
po/uk.po
+1
-1
po/vi.po
po/vi.po
+1
-0
po/zh_CN.po
po/zh_CN.po
+1
-0
po/zh_TW.po
po/zh_TW.po
+1
-0
src/dialogs/gnome-cmd-file-props-dialog.cc
src/dialogs/gnome-cmd-file-props-dialog.cc
+3
-2
src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
+36
-8
src/dialogs/gnome-cmd-manage-bookmarks-dialog.h
src/dialogs/gnome-cmd-manage-bookmarks-dialog.h
+2
-0
src/gnome-cmd-con.cc
src/gnome-cmd-con.cc
+27
-0
src/gnome-cmd-con.h
src/gnome-cmd-con.h
+3
-9
src/gnome-cmd-data.cc
src/gnome-cmd-data.cc
+123
-69
src/gnome-cmd-data.h
src/gnome-cmd-data.h
+2
-3
src/gnome-cmd-dir-indicator.cc
src/gnome-cmd-dir-indicator.cc
+2
-12
src/gnome-cmd-file-list.cc
src/gnome-cmd-file-list.cc
+1
-11
src/gnome-cmd-xml-config.cc
src/gnome-cmd-xml-config.cc
+3
-1
src/tags/gnome-cmd-tags-poppler.cc
src/tags/gnome-cmd-tags-poppler.cc
+1
-0
No files found.
NEWS
View file @
906cfe63
...
...
@@ -3,6 +3,8 @@ gnome-commander 1.6.0
---------------
Bug fixes:
* Fixed problem bgo#671616 (Right-Mouse popup menu is displayed in wrong position, Thanks to Puux)
* Fixed problem bgo#683087 (Crash opening properties window on certain objects, Thanks to Puux)
* Fixed problem bgo#742752 (Made options dialog resizable and added scrollbars)
* Preserve focused file after renamed with AdvRenDialog (Thanks to Martin Mocko)
* Fixed problem bgo#767158 (Shortcuts stop working after changing layout)
...
...
@@ -16,6 +18,7 @@ New features:
* Show/hide mainmenu can be set as keyboard shortcut now (Thanks to Puux)
* Simple plug-in system for file context menu (Thanks to Puux)
* Display of application icons in the "Open With" popup menu (Thanks to Puux)
* Write bookmark changes immediately to file, Sync bookmarks between all instances (Thanks to Puux)
* Started usage of google test framework for unit tests
* New color theme 'Winter'
* Code cleanup
...
...
README.md
View file @
906cfe63
# GNOME Commander #
[

](https://raw.githubusercontent.com/GNOME/gnome-commander/master/COPYING) |
[

](https://git.gnome.org/browse/gnome-commander/atom/?h=master)
[

](https://raw.githubusercontent.com/GNOME/gnome-commander/master/COPYING) |
[

](https://git.gnome.org/browse/gnome-commander/atom/?h=master)
## Introduction ##
...
...
TODO
View file @
906cfe63
...
...
@@ -11,7 +11,6 @@
* Browsing of compressed archives
* Tab completion at the built-in command line
* Splitting/merging files
* Write bookmark changes immediately to file
* Optional deleting to .Trash
* Unmounting a device via device button
* advrename & FAM: do not re-sort file list for every single renamed file
...
...
doc/C/releases.xml
View file @
906cfe63
...
...
@@ -29,6 +29,12 @@
<para>
Bug fixes:
</para>
<para>
<itemizedlist>
<listitem>
<para>
Fixed problem bgo#671616 (Right-Mouse popup menu is displayed in wrong position, Thanks to Puux)
</para>
</listitem>
<listitem>
<para>
Fixed problem bgo#683087 (Crash opening properties window on certain objects, Thanks to Puux)
</para>
</listitem>
<listitem>
<para>
Fixed problem bgo#742752 (Made options dialog resizable and added scrollbars)
</para>
</listitem>
...
...
@@ -70,6 +76,9 @@
<listitem>
<para>
Display of application icons in the "Open With" popup menu (Thanks to Puux)
</para>
</listitem>
<listitem>
<para>
Write bookmark changes immediately to file, Sync bookmarks between all instances (Thanks to Puux)
</para>
</listitem>
<listitem>
<para>
Started usage of google test framework for unit tests
</para>
</listitem>
...
...
po/ar.po
View file @
906cfe63
...
...
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2008-01-03 08:08+0200\n"
"Last-Translator: Anas Husseini <linux.anas@gmail.com>\n"
"Language-Team: Arabic <doc@arabeyes.org>\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/bg.po
View file @
906cfe63
...
...
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2007-10-24 20:01+0200\n"
"Last-Translator: sstpr@narod.ru <sstpr@narod.ru>\n"
"Language-Team: ССТАНЕВ <sstpr@narod.ru>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/da.po
View file @
906cfe63
...
...
@@ -14,6 +14,7 @@ msgstr ""
"PO-Revision-Date: 2009-09-12 03:11+0200\n"
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/dz.po
View file @
906cfe63
...
...
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2007-06-21 11:55+0530\n"
"Last-Translator: Dawa pemo <daws_403@hotmail.com>\n"
"Language-Team: dzongkha <pgeyleg@dit.gov.bt>\n"
"Language: dz\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/en_CA.po
View file @
906cfe63
...
...
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2005-03-15 18:14-0400\n"
"Last-Translator: Adam Weinberger <adamw@gnome.org>\n"
"Language-Team: Canadian English <adamw@gnome.org>\n"
"Language: en_CA\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/en_GB.po
View file @
906cfe63
...
...
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2008-03-09 17:59+0000\n"
"Last-Translator: David Lodge <dave@cirt.net>\n"
"Language-Team: <en@li.org>\n"
"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/eo.po
View file @
906cfe63
...
...
@@ -19,7 +19,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bits\n"
"Language: \n"
"Language:
eo
\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../data/gnome-commander.desktop.in.in.h:1
...
...
po/es.po
View file @
906cfe63
This diff is collapsed.
Click to expand it.
po/fr.po
View file @
906cfe63
...
...
@@ -22,7 +22,7 @@ msgstr ""
"PO-Revision-Date: 2014-04-02 17:01+0200\n"
"Last-Translator: Bruno Brouard <annoa.b@gmail.com>\n"
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
"Language: \n"
"Language:
fr
\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/ga.po
View file @
906cfe63
...
...
@@ -11,11 +11,11 @@ msgstr ""
"PO-Revision-Date: 2004-03-08 18:20+0000\n"
"Last-Translator: Alastair McKinstry <mckinstry@computer.org>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
"Language: ga\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
# "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: ../data/gnome-commander.desktop.in.in.h:1
#, fuzzy
msgid "A two paned file manager"
...
...
po/hr.po
View file @
906cfe63
...
...
@@ -9,6 +9,7 @@ msgstr ""
"PO-Revision-Date: 2004-03-21 00:22+CET\n"
"Last-Translator: auto\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/hu.po
View file @
906cfe63
This diff is collapsed.
Click to expand it.
po/ko.po
View file @
906cfe63
...
...
@@ -6,6 +6,7 @@ msgstr ""
"PO-Revision-Date: 2010-10-19 11:50+0900\n"
"Last-Translator: Sewon Jang <jangblue@gmail.com>\n"
"Language-Team: <>\n"
"Language: ko\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/nb.po
View file @
906cfe63
...
...
@@ -10,7 +10,7 @@ msgstr ""
"PO-Revision-Date: 2014-03-27 20:39+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
"Language: n
o
\n"
"Language: n
b
\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
...
...
po/ne.po
View file @
906cfe63
...
...
@@ -18,6 +18,7 @@ msgstr ""
"PO-Revision-Date: 2006-08-25 17:19+0545\n"
"Last-Translator: Mahesh subedi <submanesh@hotmail.com>\n"
"Language-Team: Nepali <info@mpp.org.np>\n"
"Language: ne\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/pa.po
View file @
906cfe63
...
...
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-11-24 16:41+0530\n"
"Last-Translator: Amanpreet Singh Alam <aalam@redhat.com>\n"
"Language-Team: Punjabi <fedora-trans-pa@redhat.com>\n"
"Language: pa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/rw.po
View file @
906cfe63
...
...
@@ -19,10 +19,10 @@ msgstr ""
"PO-Revision-Date: 2005-03-31 20:55-0700\n"
"Last-Translator: Steve Murphy <murf@e-tools.com>\n"
"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
"Language: rw\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"ULL NAME <EMAIL@ADDRESS>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../data/gnome-commander.desktop.in.in.h:1
...
...
po/sl.po
View file @
906cfe63
...
...
@@ -14,7 +14,7 @@ msgstr ""
"PO-Revision-Date: 2016-03-12 21:33+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl
_SI
\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/sq.po
View file @
906cfe63
...
...
@@ -11,6 +11,7 @@ msgstr ""
"PO-Revision-Date: 2004-09-03 18:45+0200\n"
"Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
"Language-Team: Albanian <gnome-albanian-perkthyesit@lists.sourceforge.net>\n"
"Language: sq\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/sr@latin.po
View file @
906cfe63
...
...
@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: 2016-03-31 18:46+0200\n"
"Last-Translator: Miroslav Nikolić <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <gnom@prevod.org>\n"
"Language: sr\n"
"Language: sr
@latin
\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/th.po
View file @
906cfe63
...
...
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2012-10-12 12:07+0700\n"
"Last-Translator: Akom Chotiphantawanon <knight2000@gmail.com>\n"
"Language-Team: Thai <thai-l10n@googlegroups.com>\n"
"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/uk.po
View file @
906cfe63
...
...
@@ -11,7 +11,7 @@ msgstr ""
"PO-Revision-Date: 2010-04-12 00:13+0300\n"
"Last-Translator: Korpan Roman <krv@dnet.com.ua>\n"
"Language-Team: <uk@li.org>\n"
"Language: \n"
"Language:
uk
\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/vi.po
View file @
906cfe63
...
...
@@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2006-08-23 21:14+0930\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
"Language: vi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/zh_CN.po
View file @
906cfe63
...
...
@@ -13,6 +13,7 @@ msgstr ""
"PO-Revision-Date: 2011-02-23 18:23+0000\n"
"Last-Translator: Aron Xu <happyaron.xu@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
...
...
po/zh_TW.po
View file @
906cfe63
...
...
@@ -12,6 +12,7 @@ msgstr ""
"PO-Revision-Date: 2005-07-09 12:29+0800\n"
"Last-Translator: Woodman Tuen <wmtuen@gmail.com>\n"
"Language-Team: Chinese/Traditional <community@linuxhall.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bitPlural-Forms: nplurals=2; plural=(n != 1);\n"
...
...
src/dialogs/gnome-cmd-file-props-dialog.cc
View file @
906cfe63
...
...
@@ -489,7 +489,8 @@ inline GtkWidget *create_properties_tab (GnomeCmdFilePropsDialogPrivate *data)
data
->
size_label
=
label
;
gcmd_tags_bulk_load
(
data
->
f
);
if
(
data
->
f
->
info
->
type
!=
GNOME_VFS_FILE_TYPE_CHARACTER_DEVICE
)
gcmd_tags_bulk_load
(
data
->
f
);
if
(
data
->
f
->
metadata
)
{
...
...
@@ -559,7 +560,7 @@ static GtkTreeModel *create_and_fill_model (GnomeCmdFile *f)
G_TYPE_STRING
,
G_TYPE_STRING
);
if
(
!
gcmd_tags_bulk_load
(
f
))
if
(
f
->
info
->
type
==
GNOME_VFS_FILE_TYPE_CHARACTER_DEVICE
||
!
gcmd_tags_bulk_load
(
f
))
return
GTK_TREE_MODEL
(
treestore
);
GnomeCmdTagClass
prev_tagclass
=
TAG_NONE_CLASS
;
...
...
src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
View file @
906cfe63
...
...
@@ -65,6 +65,7 @@ enum
const
int
RESPONSE_JUMP_TO
=
123
;
GtkWidget
*
view
=
NULL
;
void
gnome_cmd_bookmark_dialog_new
(
const
gchar
*
title
,
GtkWindow
*
parent
)
{
...
...
@@ -79,7 +80,7 @@ void gnome_cmd_bookmark_dialog_new (const gchar *title, GtkWindow *parent)
GtkWidget
*
content_area
=
gtk_dialog_get_content_area
(
GTK_DIALOG
(
dialog
));
#endif
GtkWidget
*
vbox
,
*
hbox
,
*
scrolled_window
,
*
view
,
*
button
;
GtkWidget
*
vbox
,
*
hbox
,
*
scrolled_window
,
*
button
;
gtk_window_set_position
(
GTK_WINDOW
(
dialog
),
GTK_WIN_POS_CENTER
);
gtk_dialog_set_has_separator
(
GTK_DIALOG
(
dialog
),
FALSE
);
...
...
@@ -158,17 +159,13 @@ void gnome_cmd_bookmark_dialog_new (const gchar *title, GtkWindow *parent)
gtk_dialog_run
(
GTK_DIALOG
(
dialog
));
gtk_widget_destroy
(
dialog
);
view
=
NULL
;
}
static
GtkTreeModel
*
create_and_fill_model
(
GtkTreePath
*&
current_group
)
static
void
fill_tree
(
GtkTreeStore
*
store
,
GtkTreePath
*&
current_group
)
{
GtkTreeStore
*
store
=
gtk_tree_store_new
(
NUM_COLUMNS
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_POINTER
);
gtk_tree_store_clear
(
store
);
GnomeCmdCon
*
current_con
=
main_win
->
fs
(
ACTIVE
)
->
get_connection
();
GtkTreeIter
toplevel
;
...
...
@@ -219,6 +216,19 @@ static GtkTreeModel *create_and_fill_model (GtkTreePath *¤t_group)
-
1
);
}
}
}
static
GtkTreeModel
*
create_and_fill_model
(
GtkTreePath
*&
current_group
)
{
GtkTreeStore
*
store
=
gtk_tree_store_new
(
NUM_COLUMNS
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_STRING
,
G_TYPE_POINTER
);
fill_tree
(
store
,
current_group
);
return
GTK_TREE_MODEL
(
store
);
}
...
...
@@ -290,6 +300,18 @@ static GtkWidget *create_view_and_model ()
}
void
gnome_cmd_update_bookmark_dialog
()
{
if
(
view
)
{
GtkTreePath
*
group
=
NULL
;
fill_tree
(
GTK_TREE_STORE
(
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
view
))),
group
);
if
(
group
)
gtk_tree_view_expand_row
(
GTK_TREE_VIEW
(
view
),
group
,
TRUE
);
}
}
static
void
cursor_changed_callback
(
GtkTreeView
*
view
,
GtkWidget
*
dialog
)
{
GtkTreeModel
*
model
=
gtk_tree_view_get_model
(
view
);
...
...
@@ -358,6 +380,10 @@ static void remove_clicked_callback (GtkButton *button, GtkWidget *view)
g_free
(
bookmark
->
name
);
g_free
(
bookmark
->
path
);
g_free
(
bookmark
);
main_win
->
update_bookmarks
();
gnome_cmd_data
.
save_xml
();
}
}
}
...
...
@@ -550,6 +576,8 @@ void gnome_cmd_bookmark_add_current (GnomeCmdDir *dir)
group
->
bookmarks
=
g_list_append
(
group
->
bookmarks
,
bookmark
);
main_win
->
update_bookmarks
();
gnome_cmd_data
.
save_xml
();
}
else
{
...
...
src/dialogs/gnome-cmd-manage-bookmarks-dialog.h
View file @
906cfe63
...
...
@@ -29,4 +29,6 @@ void gnome_cmd_bookmark_dialog_new (const gchar *title, GtkWindow *parent);
void
gnome_cmd_bookmark_goto
(
GnomeCmdBookmark
*
bookmark
);
void
gnome_cmd_bookmark_add_current
(
GnomeCmdDir
*
dir
);
void
gnome_cmd_update_bookmark_dialog
();
#endif // __GNOME_CMD_MANAGE_BOOKMARKS_DIALOG_H__
src/gnome-cmd-con.cc
View file @
906cfe63
...
...
@@ -383,6 +383,33 @@ void gnome_cmd_con_set_bookmarks (GnomeCmdCon *con, GnomeCmdBookmarkGroup *bookm
}
void
gnome_cmd_con_add_bookmark
(
GnomeCmdCon
*
con
,
gchar
*
name
,
gchar
*
path
)
{
GnomeCmdBookmarkGroup
*
group
=
gnome_cmd_con_get_bookmarks
(
con
);
GnomeCmdBookmark
*
bookmark
=
g_new
(
GnomeCmdBookmark
,
1
);
bookmark
->
name
=
name
;
bookmark
->
path
=
path
;
bookmark
->
group
=
group
;
group
->
bookmarks
=
g_list_append
(
group
->
bookmarks
,
bookmark
);
}
void
gnome_cmd_con_erase_bookmark
(
GnomeCmdCon
*
con
)
{
GnomeCmdBookmarkGroup
*
group
=
con
->
priv
->
bookmarks
;
for
(
GList
*
l
=
group
->
bookmarks
;
l
;
l
=
l
->
next
)
{
GnomeCmdBookmark
*
bookmark
=
(
GnomeCmdBookmark
*
)
l
->
data
;
g_free
(
bookmark
->
name
);
g_free
(
bookmark
->
path
);
g_free
(
bookmark
);
}
g_list_free
(
group
->
bookmarks
);
con
->
priv
->
bookmarks
=
g_new0
(
GnomeCmdBookmarkGroup
,
1
);
con
->
priv
->
bookmarks
->
con
=
con
;
}
void
gnome_cmd_con_updated
(
GnomeCmdCon
*
con
)
{
g_return_if_fail
(
GNOME_CMD_IS_CON
(
con
));
...
...
src/gnome-cmd-con.h
View file @
906cfe63
...
...
@@ -334,15 +334,9 @@ GnomeCmdBookmarkGroup *gnome_cmd_con_get_bookmarks (GnomeCmdCon *con);
void
gnome_cmd_con_set_bookmarks
(
GnomeCmdCon
*
con
,
GnomeCmdBookmarkGroup
*
bookmarks
);
inline
void
gnome_cmd_con_add_bookmark
(
GnomeCmdCon
*
con
,
gchar
*
name
,
gchar
*
path
)
{
GnomeCmdBookmarkGroup
*
group
=
gnome_cmd_con_get_bookmarks
(
con
);
GnomeCmdBookmark
*
bookmark
=
g_new
(
GnomeCmdBookmark
,
1
);
bookmark
->
name
=
name
;
bookmark
->
path
=
path
;
bookmark
->
group
=
group
;
group
->
bookmarks
=
g_list_append
(
group
->
bookmarks
,
bookmark
);
}
void
gnome_cmd_con_add_bookmark
(
GnomeCmdCon
*
con
,
gchar
*
name
,
gchar
*
path
);
void
gnome_cmd_con_erase_bookmark
(
GnomeCmdCon
*
con
);
void
gnome_cmd_con_updated
(
GnomeCmdCon
*
con
);
...
...
src/gnome-cmd-data.cc
View file @
906cfe63
...
...
@@ -38,6 +38,7 @@
#include "utils.h"
#include "owner.h"
#include "dialogs/gnome-cmd-advrename-dialog.h"
#include "dialogs/gnome-cmd-manage-bookmarks-dialog.h"
#include "gnome-cmd-gkeyfile-utils.h"
using
namespace
std
;
...
...
@@ -58,6 +59,8 @@ struct GnomeCmdData::Private
gboolean
sort_direction
[
2
];
gchar
*
ftp_anonymous_password
;
GFileMonitor
*
settings_monitor
;
gboolean
settings_monitor_enabled
;
};
...
...
@@ -1800,7 +1803,9 @@ inline gboolean load_connections (const gchar *fname)
gchar
*
alias
=
gnome_vfs_unescape_string
(
a
[
1
].
c_str
(),
NULL
);
if
(
gnome_cmd_data
.
priv
->
con_list
->
has_alias
(
alias
))
g_warning
(
"%s: ignored duplicate entry: %s"
,
path
,
alias
);
{
gnome_cmd_con_erase_bookmark
(
gnome_cmd_data
.
priv
->
con_list
->
find_alias
(
alias
));
}
else
{
server
=
gnome_cmd_con_remote_new
(
alias
,
a
[
2
]);
...
...
@@ -2598,6 +2603,8 @@ void GnomeCmdData::free()
// free the anonymous password string
g_free
(
priv
->
ftp_anonymous_password
);
g_object_unref
(
priv
->
settings_monitor
);
g_free
(
priv
);
}
}
...
...
@@ -3098,12 +3105,42 @@ gboolean GnomeCmdData::set_valid_color_string(GSettings *settings, const char* k
return
return_value
;
}
static
void
settings_file_changes
(
GFileMonitor
*
monitor
,
GFile
*
file
,
GFile
*
other_file
,
GFileMonitorEvent
event_type
,
gpointer
user_data
)
{
if
(
event_type
==
G_FILE_MONITOR_EVENT_CHANGED
)
{
if
(
gnome_cmd_data
.
priv
->
settings_monitor_enabled
)
{
gnome_cmd_data
.
priv
->
settings_monitor_enabled
=
false
;
}
else
{
gnome_cmd_data
.
load
();
main_win
->
update_bookmarks
();
gnome_cmd_update_bookmark_dialog
();
}
}
}
void
GnomeCmdData
::
set_settings_monitor
(
const
char
*
file_path
)
{
if
(
priv
->
settings_monitor
)
return
;
GFile
*
file
=
g_file_new_for_path
(
file_path
);
priv
->
settings_monitor
=
g_file_monitor_file
(
file
,
G_FILE_MONITOR_NONE
,
NULL
,
NULL
);
g_signal_connect
(
priv
->
settings_monitor
,
"changed"
,
G_CALLBACK
(
settings_file_changes
),
NULL
);
g_object_unref
(
file
);
}
void
GnomeCmdData
::
load
()
{
gchar
*
xml_cfg_path
=
config_dir
?
g_build_filename
(
config_dir
,
PACKAGE
".xml"
,
NULL
)
:
g_build_filename
(
g_get_home_dir
(),
"."
PACKAGE
,
PACKAGE
".xml"
,
NULL
);
gchar
*
colorstring
;
priv
=
g_new0
(
Private
,
1
);
if
(
!
priv
)
priv
=
g_new0
(
Private
,
1
);
options
.
use_ls_colors
=
g_settings_get_boolean
(
options
.
gcmd_settings
->
colors
,
GCMD_SETTINGS_COLORS_USE_LS_COLORS
);
...
...
@@ -3691,7 +3728,16 @@ void GnomeCmdData::load()
load_cmdline_history
();
//load_dir_history ();
priv
->
con_list
=
gnome_cmd_con_list_new
();
if
(
!
priv
->
con_list
)
priv
->
con_list
=
gnome_cmd_con_list_new
();
else
{
gnome_cmd_con_erase_bookmark
(
priv
->
con_list
->
get_home
());
#ifdef HAVE_SAMBA
gnome_cmd_con_erase_bookmark
(
priv
->
con_list
->
get_smb
());
#endif
advrename_defaults
.
profiles
.
clear
();
}
priv
->
con_list
->
lock
();
if
(
load_devices_old
(
"devices"
)
==
FALSE
)
...
...
@@ -3739,6 +3785,8 @@ void GnomeCmdData::load()
set_vfs_volume_monitor
();
set_settings_monitor
(
xml_cfg_path
);
g_free
(
xml_cfg_path
);
}
...
...
@@ -3822,6 +3870,77 @@ gint GnomeCmdData::migrate_data_int_value_into_gsettings(int user_value, GSettin
return
return_value
;
}
void
GnomeCmdData
::
save_xml
()
{
priv
->
settings_monitor_enabled
=
true
;
gchar
*
xml_cfg_path
=
config_dir
?
g_build_filename
(
config_dir
,
PACKAGE
".xml"
,
NULL
)
:
g_build_filename
(
g_get_home_dir
(),
"."
PACKAGE
,
PACKAGE
".xml"
,
NULL
);
ofstream
f
(
xml_cfg_path
);
XML
::
xstream
xml
(
f
);
xml
<<
XML
::
comment
(
"Created with GNOME Commander (http://gcmd.github.io/)"
);
xml
<<
XML
::
tag
(
"GnomeCommander"
)
<<
XML
::
attr
(
"version"
)
<<
VERSION
;
xml
<<
*
main_win
;
xml
<<
XML
::
tag
(
"History"
);
if
(
options
.
save_dir_history_on_exit
)
{
xml
<<
XML
::
tag
(
"Directories"
);
for
(
GList
*
i
=
gnome_cmd_con_get_dir_history
(
priv
->
con_list
->
get_home
())
->
ents
;
i
;
i
=
i
->
next
)
xml
<<
XML
::
tag
(
"Directory"
)
<<
XML
::
attr
(
"path"
)
<<
XML
::
escape
((
const
gchar
*
)
i
->
data
)
<<
XML
::
endtag
();
xml
<<
XML
::
endtag
(
"Directories"
);
}
xml
<<
XML
::
endtag
(
"History"
);
xml
<<
advrename_defaults
;
xml
<<
search_defaults
;
xml
<<
bookmarks_defaults
;
xml
<<
XML
::
tag
(
"Connections"
);
for
(
GList
*
i
=
gnome_cmd_con_list_get_all_remote
(
gnome_cmd_data
.
priv
->
con_list
);
i
;
i
=
i
->
next
)
{
GnomeCmdCon
*
con
=
GNOME_CMD_CON
(
i
->
data
);
if
(
con
)
xml
<<
*
con
;
}
xml
<<
XML
::
endtag
(
"Connections"
);
xml
<<
XML
::
tag
(
"Bookmarks"
);
write
(
xml
,
priv
->
con_list
->
get_home
(),
"Home"
);
#ifdef HAVE_SAMBA
write
(
xml
,
priv
->
con_list
->
get_smb
(),
"SMB"
);
#endif
for
(
GList
*
i
=
gnome_cmd_con_list_get_all_remote
(
gnome_cmd_data
.
priv
->
con_list
);
i
;
i
=
i
->
next
)
{
GnomeCmdCon
*
con
=
GNOME_CMD_CON
(
i
->
data
);
write
(
xml
,
con
,
XML
::
escape
(
gnome_cmd_con_get_alias
(
con
)));
}
xml
<<
XML
::
endtag
(
"Bookmarks"
);
xml
<<
XML
::
tag
(
"Selections"
);
for
(
vector
<
Selection
>::
iterator
i
=
selections
.
begin
();
i
!=
selections
.
end
();
++
i
)
xml
<<
*
i
;
xml
<<
XML
::
endtag
(
"Selections"
);
xml
<<
gcmd_user_actions
;
xml
<<
XML
::
endtag
(
"GnomeCommander"
);
g_free
(
xml_cfg_path
);
}
/**
* This method sets the value of a given GSettings key to the string stored in user_value or to the default value,
* depending on the value of user_value. If the class of the key is not a string but a string array, the first
...
...
@@ -4014,72 +4133,7 @@ void GnomeCmdData::save()
save_fav_apps
(
"fav-apps"
);
save_intviewer_defaults
();
{
gchar
*
xml_cfg_path
=
config_dir
?
g_build_filename
(
config_dir
,
PACKAGE
".xml"
,
NULL
)
:
g_build_filename
(
g_get_home_dir
(),
"."
PACKAGE
,
PACKAGE
".xml"
,
NULL
);