Bug fix: Start-up directory setting not preserved
authorColin Clark <colin.clark@cclark.uk>
Sat, 22 Jun 2019 15:37:40 +0000 (16:37 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Fri, 26 Jul 2019 17:54:44 +0000 (18:54 +0100)
When the Start-up directory radio buttons were initialized, the setting
always reverted to No change.

src/layout.c

index dc9352a..fe9a31e 100644 (file)
@@ -2108,18 +2108,30 @@ static void home_path_set_current_cb(GtkWidget *widget, gpointer data)
 static void startup_path_set_current_cb(GtkWidget *widget, gpointer data)
 {
        LayoutConfig *lc = data;
+       if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
+               {
+               return;
+               }
        lc->options.startup_path = STARTUP_PATH_CURRENT;
 }
 
 static void startup_path_set_last_cb(GtkWidget *widget, gpointer data)
 {
        LayoutConfig *lc = data;
+       if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
+               {
+               return;
+               }
        lc->options.startup_path = STARTUP_PATH_LAST;
 }
 
 static void startup_path_set_home_cb(GtkWidget *widget, gpointer data)
 {
        LayoutConfig *lc = data;
+       if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
+               {
+               return;
+               }
        lc->options.startup_path = STARTUP_PATH_HOME;
 }