summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-04-05 18:43:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-04-05 18:43:11 +0200
commit55d77ed216607dfc2d31f9a46c2564e333ee1b90 (patch)
tree736aadfc70f3be524b6019eedddd457a26ca3a36 /src/gui
parent21cfd8d858697bbe56d38dc3a477b59f186af148 (diff)
downloadweechat-55d77ed216607dfc2d31f9a46c2564e333ee1b90.zip
core: add option -all for command /buffer hide|unhide
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-buffer.c32
-rw-r--r--src/gui/gui-buffer.h2
2 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 5413e29a3..ae4a2a995 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -3467,6 +3467,22 @@ gui_buffer_hide (struct t_gui_buffer *buffer)
}
/*
+ * Hides all buffers.
+ */
+
+void
+gui_buffer_hide_all ()
+{
+ struct t_gui_buffer *ptr_buffer;
+
+ for (ptr_buffer = gui_buffers; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
+ {
+ gui_buffer_hide (ptr_buffer);
+ }
+}
+
+/*
* Unhides a buffer.
*/
@@ -3483,6 +3499,22 @@ gui_buffer_unhide (struct t_gui_buffer *buffer)
}
/*
+ * Unhides all buffers.
+ */
+
+void
+gui_buffer_unhide_all ()
+{
+ struct t_gui_buffer *ptr_buffer;
+
+ for (ptr_buffer = gui_buffers; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
+ {
+ gui_buffer_unhide (ptr_buffer);
+ }
+}
+
+/*
* Sorts buffers by layout number.
*/
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index a9a55f295..fa0c6c8fa 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -316,7 +316,9 @@ extern void gui_buffer_merge (struct t_gui_buffer *buffer,
extern void gui_buffer_unmerge (struct t_gui_buffer *buffer, int number);
extern void gui_buffer_unmerge_all ();
extern void gui_buffer_hide (struct t_gui_buffer *buffer);
+extern void gui_buffer_hide_all ();
extern void gui_buffer_unhide (struct t_gui_buffer *buffer);
+extern void gui_buffer_unhide_all ();
extern void gui_buffer_sort_by_layout_number ();
extern void gui_buffer_undo_snap (struct t_gui_buffer *buffer);
extern void gui_buffer_undo_snap_free (struct t_gui_buffer *buffer);