summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-20 17:25:18 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-20 17:25:18 (EDT)
commitc534c7e1bedb56b0f2e44b45a9d1ac5fcb9cef68 (patch)
treee2a4963aed250aafb76ea53e5e7ce6aa017f0322 /src
parentbccb3d6e17eba026a975ed8c4c8cabb4d136e00f (diff)
downloadmarquee-c534c7e1bedb56b0f2e44b45a9d1ac5fcb9cef68.zip
marquee-c534c7e1bedb56b0f2e44b45a9d1ac5fcb9cef68.tar.gz
marquee-c534c7e1bedb56b0f2e44b45a9d1ac5fcb9cef68.tar.bz2
src/tab-chrome.c: Hack tab history scrollbar policies
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 0e12da5..d5de77b 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -41,6 +41,16 @@ forward_clicked_cb(GtkButton __attribute__((unused)) *toolbutton,
}
static void
+back_forward_scrolled_window_size_allocate_cb(
+ GtkScrolledWindow *scrolled_window,
+ GdkRectangle __attribute__((unused)) *allocation,
+ gpointer __attribute__((unused)) user_data)
+{
+ gtk_scrolled_window_set_policy(scrolled_window,
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+}
+
+static void
back_forward_toggle_button_toggled_cb(GtkToggleButton *toggle_button,
GtkStack *stack)
{
@@ -205,19 +215,25 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
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_POLICY_NEVER, GTK_POLICY_NEVER);
/* gtk_scrolled_window_set_propagate_natural_width(
GTK_SCROLLED_WINDOW(list_scrolled_window), TRUE); */
gtk_container_add(GTK_CONTAINER(list_scrolled_window), list_box);
+ g_signal_connect(list_scrolled_window, "size-allocate",
+ G_CALLBACK(back_forward_scrolled_window_size_allocate_cb),
+ NULL);
/* 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_POLICY_NEVER, GTK_POLICY_NEVER);
/* gtk_scrolled_window_set_propagate_natural_width(
GTK_SCROLLED_WINDOW(text_scrolled_window), TRUE); */
gtk_container_add(GTK_CONTAINER(text_scrolled_window), text_view);
+ g_signal_connect(text_scrolled_window, "size-allocate",
+ G_CALLBACK(back_forward_scrolled_window_size_allocate_cb),
+ NULL);
/* Set up the stack. */
stack = gtk_stack_new();