summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-20 16:40:33 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-20 16:40:33 (EDT)
commite67e7f19253fdbb4c6f98dbe6fdf3715237dd75b (patch)
treef752bb44808b466173b593cbd96bd1b77bcd7802 /src
parent467b966c6cd12b474553a6b2a739829111433830 (diff)
downloadmarquee-e67e7f19253fdbb4c6f98dbe6fdf3715237dd75b.zip
marquee-e67e7f19253fdbb4c6f98dbe6fdf3715237dd75b.tar.gz
marquee-e67e7f19253fdbb4c6f98dbe6fdf3715237dd75b.tar.bz2
src/tab-chrome.c: Better organize tab history scrolled windows code
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index cdaa51c..0e12da5 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -128,8 +128,9 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
GtkTextIter text_iter;
gchar *str;
GtkTextTag *text_tag;
+ GtkWidget *list_scrolled_window;
+ GtkWidget *text_scrolled_window;
GtkWidget *stack;
- GtkWidget *scrolled_window;
GtkWidget *toggle_button;
GtkWidget *box;
@@ -200,22 +201,28 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
++chrome->back_items;
}
- /* Set up the stack. */
- stack = gtk_stack_new();
- scrolled_window = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
+ /* Set up the list scrolled window. */
+ list_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(
+ GTK_SCROLLED_WINDOW(list_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_SCROLLED_WINDOW(list_scrolled_window), TRUE); */
+ gtk_container_add(GTK_CONTAINER(list_scrolled_window), list_box);
+
+ /* Set up the text scrolled window. */
+ text_scrolled_window = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(
+ GTK_SCROLLED_WINDOW(text_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");
+ GTK_SCROLLED_WINDOW(text_scrolled_window), TRUE); */
+ gtk_container_add(GTK_CONTAINER(text_scrolled_window), text_view);
+
+ /* Set up the stack. */
+ stack = gtk_stack_new();
+ gtk_stack_add_named(GTK_STACK(stack), list_scrolled_window, "list");
+ gtk_stack_add_named(GTK_STACK(stack), text_scrolled_window, "text");
/* Set up the toggle button. */
toggle_button = gtk_toggle_button_new();