summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-19 19:00:30 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-19 19:00:30 (EDT)
commit4ed5bcb2d89cd28e7a8ce0daea05eb491b3cd904 (patch)
tree03dedd37238bd56a2b8746afadd20ae8167ca88a /src
parent32741b91a658fc66152454bcb68524bd9cdb449b (diff)
downloadmarquee-4ed5bcb2d89cd28e7a8ce0daea05eb491b3cd904.zip
marquee-4ed5bcb2d89cd28e7a8ce0daea05eb491b3cd904.tar.gz
marquee-4ed5bcb2d89cd28e7a8ce0daea05eb491b3cd904.tar.bz2
src/window.c: Put tab list under tab menu buttons
Diffstat (limited to 'src')
-rw-r--r--src/window.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/window.c b/src/window.c
index e627d8e..ed4f65a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -66,9 +66,8 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
{
GtkWidget *button_grid;
GtkWidget *buttons[BUTTON_ROWS * BUTTON_COLS];
- GtkWidget *button_rows_box;
- GtkWidget *tab_list_box;
- GtkWidget *stack;
+ GtkWidget *box;
+ GtkWidget *tab_list;
GtkWidget *popover; /* TODO: Add to MqWindow */
/* Make sure this is a right mouse button press event. */
@@ -90,41 +89,27 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
NEW_BUTTON(1, 3, "view-list-symbolic", "Tab list...");
/* Set up the button rows box. */
- button_rows_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start(GTK_BOX(button_rows_box), button_grid,
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ gtk_box_pack_start(GTK_BOX(box), button_grid,
TRUE, FALSE, 0);
- /* Set up tab list box. */
- tab_list_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-
- /* Set up tab list back button. */
- /*
- buttons[7] = gtk_button_new_from_icon_name("go-previous-symbolic",
- GTK_ICON_SIZE_BUTTON);
- gtk_widget_set_tooltip_text(buttons[7], "Back");
- gtk_widget_set_can_focus(buttons[7], FALSE);
- gtk_widget_set_halign(buttons[7], GTK_ALIGN_START);
- gtk_box_pack_start(GTK_BOX(tab_list_box), buttons[7], TRUE, FALSE, 0);
- */
-
- gtk_box_pack_start(GTK_BOX(tab_list_box), gtk_label_new("Tab list"),
+ /* Set up the tab list. */
+ tab_list = gtk_label_new("Tab list");
+ gtk_box_pack_start(GTK_BOX(box), tab_list,
TRUE, FALSE, 0);
- /* Set up the stack. */
- stack = gtk_stack_new();
- gtk_stack_add_named(GTK_STACK(stack), button_rows_box, "buttons");
- gtk_stack_add_named(GTK_STACK(stack), tab_list_box, "tab_list");
-
+ /*
g_signal_connect(buttons[1 * BUTTON_COLS + 3], "clicked",
G_CALLBACK(tab_list_button_clicked_cb), GTK_STACK(stack));
+ */
/* Set up the popover. */
popover = gtk_popover_new(widget);
- gtk_container_add(GTK_CONTAINER(popover), stack);
+ gtk_container_add(GTK_CONTAINER(popover), box);
/* NB: gtk_popover_popup() is new in GTK+ 3.22. */
gtk_widget_show_all(popover);
- /* TODO: gtk_widget_hide() tab list */
+ gtk_widget_hide(tab_list);
return FALSE;
}