diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-17 21:44:46 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-18 16:43:00 (EDT) |
commit | cb9e6083a32de99f2cc9ea96730ef168431b93a4 (patch) | |
tree | 104ce26129858dcb0901664501aa836dfab34d5a /src | |
parent | e1058f4d43e81c0d4364d54f1ae033682e2f1baa (diff) | |
download | marquee-cb9e6083a32de99f2cc9ea96730ef168431b93a4.zip marquee-cb9e6083a32de99f2cc9ea96730ef168431b93a4.tar.gz marquee-cb9e6083a32de99f2cc9ea96730ef168431b93a4.tar.bz2 |
src/tab-chrome.c: Add basic stack to tab history popover
Doesn't work.
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index fba1741..e089e9c 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -44,14 +44,38 @@ static gboolean back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTabChrome *chrome) { + GtkWidget *stack; + GtkWidget *stack_switcher; + GtkWidget *box; GtkWidget *popover; if (event->type != GDK_BUTTON_PRESS) { return FALSE; } + stack = gtk_stack_new(); + gtk_stack_add_named(GTK_STACK(stack), gtk_label_new("List"), "list"); + gtk_stack_add_named(GTK_STACK(stack), gtk_label_new("Text"), "text"); + + stack_switcher = gtk_stack_switcher_new(); + gtk_stack_switcher_set_stack(GTK_STACK_SWITCHER(stack_switcher), + GTK_STACK(stack)); + gtk_box_pack_start(GTK_BOX(stack_switcher), + gtk_image_new_from_icon_name("view-list-symbolic", + GTK_ICON_SIZE_SMALL_TOOLBAR), + FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(stack_switcher), + gtk_image_new_from_icon_name("edit-select-all-symbolic", + GTK_ICON_SIZE_SMALL_TOOLBAR), + FALSE, FALSE, 0); + + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + gtk_box_pack_start(GTK_BOX(box), stack_switcher, TRUE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(box), stack, TRUE, FALSE, 0); + popover = gtk_popover_new(widget); - gtk_container_add(GTK_CONTAINER(popover), gtk_label_new("History")); + gtk_container_add(GTK_CONTAINER(popover), box); + /* NB: gtk_popover_popup() is new in GTK+ 3.22. */ gtk_widget_show_all(popover); |