summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-01-31 13:46:21 -0800
committerJohn Stebbins <[email protected]>2018-01-31 13:47:47 -0800
commitdaf004959fe696425e7fcb64a39dde200236dd31 (patch)
treeffc687957f8fa89f029364f31040226be80da617
parentbee8e5bd5f7b6e9258e9aaab98babd2d3cca1388 (diff)
LinGui: don't remember state of presets window
Do not automatically open the presets window when restarting the application.
-rw-r--r--gtk/src/callbacks.c16
-rw-r--r--gtk/src/internal_defaults.json1
2 files changed, 7 insertions, 10 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index e025e240b..ed52ac358 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -4088,9 +4088,12 @@ show_activity_action_cb(GSimpleAction *action, GVariant *value,
G_MODULE_EXPORT gboolean
presets_window_delete_cb(GtkWidget *xwidget, GdkEvent *event, signal_user_data_t *ud)
{
- gtk_widget_set_visible(xwidget, FALSE);
- GtkWidget *widget = GHB_WIDGET(ud->builder, "show_presets");
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), FALSE);
+ GSimpleAction * action;
+ GVariant * state = g_variant_new_boolean(FALSE);
+
+ action = G_SIMPLE_ACTION(g_action_map_lookup_action(
+ G_ACTION_MAP(ud->app), "show-presets"));
+ g_action_change_state(G_ACTION(action), state);
return TRUE;
}
@@ -4285,10 +4288,7 @@ show_presets_action_cb(GSimpleAction *action, GVariant *value,
gboolean state = g_variant_get_boolean(value);
g_simple_action_set_state(action, value);
- ghb_dict_set(ud->prefs, "show_presets", ghb_boolean_value(state));
- presets_window_set_visible(ud, ghb_dict_get_bool(ud->prefs,
- "show_presets"));
- ghb_pref_save(ud->prefs, "show_presets");
+ presets_window_set_visible(ud, state);
}
static void
@@ -5805,8 +5805,6 @@ window_map_cb(
GdkEventAny *event,
signal_user_data_t *ud)
{
- presets_window_set_visible(ud, ghb_dict_get_bool(ud->prefs,
- "show_presets"));
return FALSE;
}
diff --git a/gtk/src/internal_defaults.json b/gtk/src/internal_defaults.json
index 967a80c31..4057fd290 100644
--- a/gtk/src/internal_defaults.json
+++ b/gtk/src/internal_defaults.json
@@ -96,7 +96,6 @@
"preview_show_crop": false,
"preview_x": -1,
"preview_y": -1,
- "show_presets": false,
"UseM4v": true,
"auto_name": true,
"auto_name_template": "{source}",