aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-22 01:43:15 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-22 01:44:57 +0100
commitcd72ea902f31d659cd2c02cf59f5ccae3cfad549 (patch)
tree8ff32cf5f625ae866549f476bf4920c0cac5515c
parentc4dead2eee2d7a480c5765d6e6f83837a2a44771 (diff)
downloadfiv-cd72ea902f31d659cd2c02cf59f5ccae3cfad549.tar.gz
fiv-cd72ea902f31d659cd2c02cf59f5ccae3cfad549.tar.xz
fiv-cd72ea902f31d659cd2c02cf59f5ccae3cfad549.zip
Fix two issues with browser scrolling
-rw-r--r--fastiv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fastiv.c b/fastiv.c
index c77e8bf..0709ac0 100644
--- a/fastiv.c
+++ b/fastiv.c
@@ -128,6 +128,11 @@ load_directory(const gchar *dirname)
if (dirname) {
free(g.directory);
g.directory = g_strdup(dirname);
+
+ GtkAdjustment *vadjustment = gtk_scrolled_window_get_vadjustment(
+ GTK_SCROLLED_WINDOW(g.browser_scroller));
+ gtk_adjustment_set_value(
+ vadjustment, gtk_adjustment_get_lower(vadjustment));
}
g_ptr_array_set_size(g.files, 0);
@@ -601,6 +606,11 @@ main(int argc, char *argv[])
G_CALLBACK(on_button_press_browser), NULL);
gtk_container_add(GTK_CONTAINER(g.browser_scroller), g.browser);
+ // Christ, no.
+ GtkWidget *browser_port = gtk_bin_get_child(GTK_BIN(g.browser_scroller));
+ gtk_container_set_focus_hadjustment(GTK_CONTAINER(browser_port), NULL);
+ gtk_container_set_focus_vadjustment(GTK_CONTAINER(browser_port), NULL);
+
// TODO(p): As with GtkFileChooserWidget, bind:
// - C-h to filtering,
// - M-Up to going a level above,