[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add --minimize command line option
noreply at xfce.org
noreply at xfce.org
Sat Mar 4 12:27:46 CET 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 36f4cc3332ee3a49e64f1e483cc2f5f33f10bde8
Author: Igor <f2404 at yandex.ru>
Date: Sat Mar 4 14:27:41 2017 +0300
Add --minimize command line option
---
terminal/main.c | 2 +-
terminal/terminal-app.c | 2 ++
terminal/terminal-options.c | 4 ++++
terminal/terminal-options.h | 1 +
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/terminal/main.c b/terminal/main.c
index f054041..de0410e 100644
--- a/terminal/main.c
+++ b/terminal/main.c
@@ -129,7 +129,7 @@ usage (void)
g_print ("%s:\n"
" --display=%s; --geometry=%s; --role=%s; --drop-down;\n"
- " --startup-id=%s; -I, --icon=%s; --fullscreen; --maximize;\n"
+ " --startup-id=%s; -I, --icon=%s; --fullscreen; --maximize; --minimize;\n"
" --show-menubar, --hide-menubar; --show-borders, --hide-borders;\n"
" --show-toolbar, --hide-toolbar; --show-scrollbar, --hide-scrollbar;\n"
" --font=%s; --zoom=%s\n\n",
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 0355ce8..8b5ab51 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -762,6 +762,8 @@ terminal_app_open_window (TerminalApp *app,
/* apply normal window properties */
if (attr->maximize)
gtk_window_maximize (GTK_WINDOW (window));
+ if (attr->minimize)
+ gtk_window_iconify (GTK_WINDOW (window));
if (attr->startup_id != NULL)
gtk_window_set_startup_id (GTK_WINDOW (window), attr->startup_id);
diff --git a/terminal/terminal-options.c b/terminal/terminal-options.c
index ce0abdd..c7c9a31 100644
--- a/terminal/terminal-options.c
+++ b/terminal/terminal-options.c
@@ -417,6 +417,10 @@ terminal_window_attr_parse (gint argc,
{
win_attr->maximize = TRUE;
}
+ else if (terminal_option_cmp ("minimize", 0, argc, argv, &n, NULL))
+ {
+ win_attr->minimize = TRUE;
+ }
else if (terminal_option_show_hide_cmp ("borders", argc, argv, &n, &visible))
{
win_attr->borders = visible;
diff --git a/terminal/terminal-options.h b/terminal/terminal-options.h
index d228b86..91e7a92 100644
--- a/terminal/terminal-options.h
+++ b/terminal/terminal-options.h
@@ -72,6 +72,7 @@ typedef struct
guint drop_down : 1;
guint fullscreen : 1;
guint maximize : 1;
+ guint minimize : 1;
guint reuse_last_window : 1;
TerminalVisibility menubar;
TerminalVisibility borders;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list