summaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-19 19:14:16 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-19 19:14:16 (EDT)
commit919c36764d1cd74c265f222c267dde6f869256ce (patch)
tree37f67cbd721edd363986b85985aee05f6662e6c1 /src/window.c
parentc41de59a3accda61fe12bb73b0ec05a11974730b (diff)
downloadmarquee-919c36764d1cd74c265f222c267dde6f869256ce.zip
marquee-919c36764d1cd74c265f222c267dde6f869256ce.tar.gz
marquee-919c36764d1cd74c265f222c267dde6f869256ce.tar.bz2
src/window.c: Make tab list button functional (again)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/window.c b/src/window.c
index f3bfa41..c1eaa4e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -27,14 +27,13 @@
#include "tab.h"
static void
-tab_list_button_clicked_cb(GtkButton __attribute__((unused)) *button,
- GtkStack *stack)
+tab_list_button_toggled_cb(GtkToggleButton *toggle_button, GtkWidget *tab_list)
{
- /* Use gtk_widget_show() and gtk_widget_hide() instead of
- * gtk_stack_set_visible_child() so that the stack fits the size of only
- * the visible child. */
- gtk_widget_show(gtk_stack_get_child_by_name(stack, "tab_list"));
- gtk_widget_hide(gtk_stack_get_child_by_name(stack, "buttons"));
+ if (gtk_toggle_button_get_active(toggle_button)) {
+ gtk_widget_show(tab_list);
+ } else {
+ gtk_widget_hide(tab_list);
+ }
}
static void
@@ -110,10 +109,8 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
gtk_box_pack_start(GTK_BOX(box), tab_list,
TRUE, FALSE, 0);
- /*
- g_signal_connect(buttons[1 * BUTTON_COLS + 3], "clicked",
- G_CALLBACK(tab_list_button_clicked_cb), GTK_STACK(stack));
- */
+ g_signal_connect(buttons[1 * BUTTON_COLS + 3], "toggled",
+ G_CALLBACK(tab_list_button_toggled_cb), tab_list);
/* Set up the popover. */
popover = gtk_popover_new(widget);