[gnome-commander] Adds option to leave the terminal window open when a command finishes
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Adds option to leave the terminal window open when a command finishes
- Date: Sun, 24 Sep 2017 20:59:27 +0000 (UTC)
commit b1775781922503134c81f2f97c2565c5341557bd
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sun Sep 24 22:29:01 2017 +0200
Adds option to leave the terminal window open when a command finishes
Furthermore this commit renames the accociated gschema option.
NEWS | 1 +
data/org.gnome.gnome-commander.gschema.xml | 4 +-
doc/C/index.docbook | 9 ++++++
doc/C/releases.xml | 3 ++
po/POTFILES.in | 1 +
src/Makefile.am | 2 +-
src/block.cc | 38 ----------------------------
src/dialogs/gnome-cmd-options-dialog.cc | 14 +++++++---
src/gnome-cmd-data.cc | 2 +-
9 files changed, 28 insertions(+), 46 deletions(-)
---
diff --git a/NEWS b/NEWS
index f0a6164..c2b414f 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ New features:
* Quick search can be activated by just typing a letter, adjustable in the options tab
* Option for saving/not saving the command line history on exit
* Option for saving/not saving the search history on exit
+ * Added a checkbox for option to leave the terminal window open when a command finishes to the options menu
Other changes:
* Increased minimum GTK version from 2.8.0 to 2.18.0
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index 74ff1d3..ee9622b 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -557,8 +557,8 @@
</description>
</key>
<key name="use-gcmd-block" type="b">
- <default>false</default>
- <summary>Use gcmd-block for terminal commands</summary>
+ <default>true</default>
+ <summary>Leave terminal open</summary>
<description>
This option defines if a terminal window should stay open after a command finishes inside of it.
</description>
diff --git a/doc/C/index.docbook b/doc/C/index.docbook
index 481dae8..35ce285 100644
--- a/doc/C/index.docbook
+++ b/doc/C/index.docbook
@@ -5664,6 +5664,15 @@
<para>In this text box you can type in the command line used to start your app from the
list above with a favourite terminal application. %s is the variable used to pass the command to be executed
in the terminal. Default value: "gnome-terminal -e %s".</para>
</entry>
</row>
+ <row>
+ <entry><para></para></entry>
+ <entry colname="colspec2">
+ <para>Leave terminal window open</para>
+ </entry>
+ <entry colname="colspec3">
+ <para>With this checkbox you can decide if you want the leave a terminal window open when
the command in it finishes.</para>
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>
diff --git a/doc/C/releases.xml b/doc/C/releases.xml
index a66baad..412499c 100644
--- a/doc/C/releases.xml
+++ b/doc/C/releases.xml
@@ -47,6 +47,9 @@
<listitem>
<para>Option for saving/not saving the search history on exit</para>
</listitem>
+ <listitem>
+ <para>Added a checkbox for option to leave the terminal window open when a
command finishes to the options menu</para>
+ </listitem>
</itemizedlist>
</para>
<para>Other changes:</para>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8000856..1758f03 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -32,6 +32,7 @@ src/dirlist.cc
src/eggcellrendererkeys.cc
src/gnome-cmd-about-plugin.cc
src/gnome-cmd-advrename-profile-component.cc
+src/gnome-cmd-block.cc
src/gnome-cmd-chmod-component.cc
src/gnome-cmd-chown-component.cc
src/gnome-cmd-con.cc
diff --git a/src/Makefile.am b/src/Makefile.am
index c0b7a6c..33226fb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,6 +116,6 @@ gnome_commander_LDADD = \
CLEANFILES = \
gnome-cmd-advrename-lexer.cc
-gcmd_block_SOURCES = block.cc
+gcmd_block_SOURCES = gnome-cmd-block.cc
-include $(top_srcdir)/git.mk
diff --git a/src/dialogs/gnome-cmd-options-dialog.cc b/src/dialogs/gnome-cmd-options-dialog.cc
index 8ee736a..8a1655a 100644
--- a/src/dialogs/gnome-cmd-options-dialog.cc
+++ b/src/dialogs/gnome-cmd-options-dialog.cc
@@ -1341,9 +1341,9 @@ static void on_add_app_dialog_ok (GtkButton *button, GtkWidget *dialog)
if (gnome_cmd_data.options.is_name_double(name))
{
- gnome_cmd_show_message (GTK_WINDOW (dialog),
- _("An app with this label exists already.\nPlease choose another label."));
- return;
+ gnome_cmd_show_message (GTK_WINDOW (dialog),
+ _("An app with this label exists already.\nPlease choose another label."));
+ return;
}
GnomeCmdApp *app = gnome_cmd_app_new_with_values (name, cmd, icon_path,
@@ -1680,7 +1680,7 @@ static GtkWidget *create_programs_tab (GtkWidget *parent, GnomeCmdData::Options
for (GList *apps = gnome_cmd_data.options.fav_apps; apps; apps = apps->next)
add_app_to_list (GTK_CLIST (clist), (GnomeCmdApp *) apps->data);
- table2 = create_table (parent, 1, 2);
+ table2 = create_table (parent, 1, 3);
cat = create_category (parent, table2, _("Global app options"));
gtk_box_pack_start (GTK_BOX (vbox), cat, FALSE, FALSE, 0);
@@ -1690,6 +1690,10 @@ static GtkWidget *create_programs_tab (GtkWidget *parent, GnomeCmdData::Options
entry = create_entry (parent, "termexec", cfg.termexec);
table_add (table2, entry, 0, 1, (GtkAttachOptions) (GTK_EXPAND|GTK_FILL));
+ check = create_check (parent, _("Leave terminal window open"), "is_use_gcmd_block");
+ table_add (table2, check, 0, 2, GTK_FILL);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gnome_cmd_data.use_gcmd_block);
+
return frame;
}
@@ -1702,6 +1706,7 @@ inline void store_programs_options (GtkWidget *dialog, GnomeCmdData::Options &cf
GtkWidget *entry4 = lookup_widget (dialog, "sendto");
GtkWidget *entry5 = lookup_widget (dialog, "termopen");
GtkWidget *entry6 = lookup_widget (dialog, "termexec");
+ GtkWidget *check_use_gcmd_block = lookup_widget (dialog, "is_use_gcmd_block");
GtkWidget *check_uris = lookup_widget (dialog, "honor_expect_uris");
GtkWidget *check_iv = lookup_widget (dialog, "use_internal_viewer");
@@ -1711,6 +1716,7 @@ inline void store_programs_options (GtkWidget *dialog, GnomeCmdData::Options &cf
cfg.set_sendto(gtk_entry_get_text (GTK_ENTRY (entry4)));
cfg.set_termopen(gtk_entry_get_text (GTK_ENTRY (entry5)));
cfg.set_termexec(gtk_entry_get_text (GTK_ENTRY (entry6)));
+ gnome_cmd_data.use_gcmd_block = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_use_gcmd_block));
cfg.honor_expect_uris = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_uris));
cfg.use_internal_viewer = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_iv));
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index cce46fb..82bea50 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -2676,7 +2676,7 @@ GnomeCmdData::GnomeCmdData(): search_defaults(selections)
cmdline_history = NULL;
cmdline_history_length = 0;
- use_gcmd_block = FALSE;
+ use_gcmd_block = TRUE;
main_win_width = 600;
main_win_height = 400;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]