diff options
author | James Booth <boothj5@gmail.com> | 2015-09-19 23:31:04 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-09-19 23:31:04 +0100 |
commit | d7bba740919b2be154d141c1683ea43e771c4b33 (patch) | |
tree | 38d9ba5c65c5d0789b6e55c74d6610a78d224736 /src/command/commands.c | |
parent | a3dccce2fa859b3030d740b609fa9e9466601cc7 (diff) | |
download | profani-tty-d7bba740919b2be154d141c1683ea43e771c4b33.tar.gz |
Moved /winstidy command to /wins autotidy
Diffstat (limited to 'src/command/commands.c')
-rw-r--r-- | src/command/commands.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index e3374ddd..61c0373b 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -747,6 +747,17 @@ cmd_wins(ProfWin *window, const char * const command, gchar **args) cons_show("Same source and target window supplied."); } } + } else if (strcmp(args[0], "autotidy") == 0) { + if (g_strcmp0(args[1], "on") == 0) { + cons_show("Window autotidy enabled"); + prefs_set_boolean(PREF_WINS_AUTO_TIDY, TRUE); + ui_tidy_wins(); + } else if (g_strcmp0(args[1], "off") == 0) { + cons_show("Window autotidy disabled"); + prefs_set_boolean(PREF_WINS_AUTO_TIDY, FALSE); + } else { + cons_bad_cmd_usage(command); + } } else { cons_bad_cmd_usage(command); } @@ -755,18 +766,6 @@ cmd_wins(ProfWin *window, const char * const command, gchar **args) } gboolean -cmd_winstidy(ProfWin *window, const char * const command, gchar **args) -{ - gboolean result = _cmd_set_boolean_preference(args[0], command, "Wins Auto Tidy", PREF_WINS_AUTO_TIDY); - - if (result && g_strcmp0(args[0], "on") == 0) { - ui_tidy_wins(); - } - - return result; -} - -gboolean cmd_win(ProfWin *window, const char * const command, gchar **args) { int num = atoi(args[0]); |