about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-02 20:32:07 +0100
committerJames Booth <boothj5@gmail.com>2015-06-02 20:32:07 +0100
commita3693cfbe744c6ba8274b56a437f1faaaad414bf (patch)
tree6938c09c2f9dfc831a710f6e0dc9b2f93b500a21 /src/ui
parent06fe9bec371f99a29c7de1858fbefe5e10c56882 (diff)
parentf0f3a739f4f6963d9ed3300f4b9ef8116ec39ba3 (diff)
downloadprofani-tty-a3693cfbe744c6ba8274b56a437f1faaaad414bf.tar.gz
Merge branch 'master' into openpgp
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c10
-rw-r--r--src/ui/core.c10
-rw-r--r--src/ui/ui.h3
3 files changed, 14 insertions, 9 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index c8d19825..cb52619e 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -876,6 +876,15 @@ cons_wrap_setting(void)
 }
 
 void
+cons_winstidy_setting(void)
+{
+    if (prefs_get_boolean(PREF_WINS_AUTO_TIDY))
+        cons_show("Window Auto Tidy (/winstidy)  : ON");
+    else
+        cons_show("Window Auto Tidy (/winstidy)  : OFF");
+}
+
+void
 cons_presence_setting(void)
 {
     if (prefs_get_boolean(PREF_PRESENCE))
@@ -1039,6 +1048,7 @@ cons_show_ui_prefs(void)
     cons_flash_setting();
     cons_splash_setting();
     cons_wrap_setting();
+    cons_winstidy_setting();
     cons_time_setting();
     cons_resource_setting();
     cons_vercheck_setting();
diff --git a/src/ui/core.c b/src/ui/core.c
index e7059ef0..8431371d 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1105,16 +1105,10 @@ ui_close_win(int index)
     status_bar_active(1);
 }
 
-void
+gboolean
 ui_tidy_wins(void)
 {
-    gboolean tidied = wins_tidy();
-
-    if (tidied) {
-        cons_show("Windows tidied.");
-    } else {
-        cons_show("No tidy needed.");
-    }
+    return wins_tidy();
 }
 
 void
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 0ee21be4..29ee6bef 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -216,7 +216,7 @@ void ui_show_all_room_rosters(void);
 void ui_hide_all_room_rosters(void);
 gboolean ui_chat_win_exists(const char * const barejid);
 
-void ui_tidy_wins(void);
+gboolean ui_tidy_wins(void);
 void ui_prune_wins(void);
 gboolean ui_swap_wins(int source_win, int target_win);
 
@@ -305,6 +305,7 @@ void cons_occupants_setting(void);
 void cons_roster_setting(void);
 void cons_presence_setting(void);
 void cons_wrap_setting(void);
+void cons_winstidy_setting(void);
 void cons_time_setting(void);
 void cons_mouse_setting(void);
 void cons_statuses_setting(void);