@eht16 commented on this pull request.
> @@ -635,7 +1237,46 @@ static void checkbox_toggled_cb(GtkToggleButton *tb, gpointer data) break; } } +} + + +static void radio_toggled_cb(GtkRadioButton *rb, gpointer data) +{ + gboolean enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rb)); + + switch (GPOINTER_TO_INT(data)) + { + case NOTEBOOK_UNTITLEDDOCUMENTSAVE_RADIO_DISABLED:
I think we should also disable the "Default filetype to use for new files" combo box if both variants are disabled and enable it again if one of them is enabled.
Suggestion:
diff --git a/plugins/saveactions.c b/plugins/saveactions.c
index f20cafcad..8d441a88f 100644
--- a/plugins/saveactions.c
+++ b/plugins/saveactions.c
@@ -1253,6 +1253,8 @@ static void radio_toggled_cb(GtkRadioButton *rb, gpointer data)
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_entry_dir, FALSE);
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_interval_spin, FALSE);
+
+ gtk_widget_set_sensitive(pref_widgets.untitled_document_save_ft_combo, FALSE);
}
break;
}
@@ -1263,6 +1265,8 @@ static void radio_toggled_cb(GtkRadioButton *rb, gpointer data)
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_entry_dir, FALSE);
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_interval_spin, FALSE);
+
+ gtk_widget_set_sensitive(pref_widgets.untitled_document_save_ft_combo, TRUE);
}
break;
}
@@ -1273,6 +1277,8 @@ static void radio_toggled_cb(GtkRadioButton *rb, gpointer data)
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_entry_dir, TRUE);
gtk_widget_set_sensitive(pref_widgets.persistent_untitled_docs_interval_spin, TRUE);
+
+ gtk_widget_set_sensitive(pref_widgets.untitled_document_save_ft_combo, TRUE);
}
break;
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.