summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-20 15:16:08 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-20 15:16:38 (EDT)
commita5676333c4e7148f879a4d5210e62801dade127c (patch)
tree27e4a3c3fa814dbbb0c124db416e1382d002d759 /src
parenta5a0f45e6d69f2a0abe94bac387b5ac829c23620 (diff)
downloadmarquee-a5676333c4e7148f879a4d5210e62801dade127c.zip
marquee-a5676333c4e7148f879a4d5210e62801dade127c.tar.gz
marquee-a5676333c4e7148f879a4d5210e62801dade127c.tar.bz2
src/tab-chrome.c: Make tab history list and text scrollable
Currently, the list's and text view's sizes aren't propagated to their parent scrolled windows.
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index bf4d636..cdaa51c 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -47,7 +47,7 @@ back_forward_toggle_button_toggled_cb(GtkToggleButton *toggle_button,
/* 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,
+ gtk_widget_show_all(gtk_stack_get_child_by_name(stack,
gtk_toggle_button_get_active(toggle_button) ?
"text" : "list"));
gtk_widget_hide(gtk_stack_get_child_by_name(stack,
@@ -129,6 +129,7 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
gchar *str;
GtkTextTag *text_tag;
GtkWidget *stack;
+ GtkWidget *scrolled_window;
GtkWidget *toggle_button;
GtkWidget *box;
@@ -201,8 +202,20 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
/* Set up the stack. */
stack = gtk_stack_new();
- gtk_stack_add_named(GTK_STACK(stack), list_box, "list");
- gtk_stack_add_named(GTK_STACK(stack), text_view, "text");
+ scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ /* gtk_scrolled_window_set_propagate_natural_width(
+ GTK_SCROLLED_WINDOW(scrolled_window), TRUE); */
+ gtk_container_add(GTK_CONTAINER(scrolled_window), list_box);
+ gtk_stack_add_named(GTK_STACK(stack), scrolled_window, "list");
+ scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ /* gtk_scrolled_window_set_propagate_natural_width(
+ GTK_SCROLLED_WINDOW(scrolled_window), TRUE); */
+ gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);
+ gtk_stack_add_named(GTK_STACK(stack), scrolled_window, "text");
/* Set up the toggle button. */
toggle_button = gtk_toggle_button_new();