summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-05 09:39:30 -0700
committerJohn Stebbins <[email protected]>2015-10-05 09:39:53 -0700
commitfe7cf56e8129d7376dde8857360652b39e514b28 (patch)
tree4bb553271cbb02f8229f241e96f8da1bdf72dafd /gtk/src/callbacks.c
parent04905abaeb7d85064c579218f0c1639269fc02e7 (diff)
LinGui: use libhb to validate filter settings
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 390abc36e..6c8dc88e4 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -5003,69 +5003,6 @@ ghb_uninhibit_gsm()
}
G_MODULE_EXPORT gboolean
-tweak_setting_cb(
- GtkWidget *widget,
- GdkEventButton *event,
- signal_user_data_t *ud)
-{
- const gchar *name;
- gchar *tweak_name;
- gboolean ret = FALSE;
- gboolean allow_tweaks;
-
- g_debug("press %d %d", event->type, event->button);
- allow_tweaks = ghb_dict_get_bool(ud->prefs, "allow_tweaks");
- if (allow_tweaks && event->type == GDK_BUTTON_PRESS && event->button == 3)
- { // Its a right mouse click
- GtkWidget *dialog;
- GtkEntry *entry;
- GtkResponseType response;
- const gchar *tweak = NULL;
-
- name = ghb_get_setting_key(widget);
- if (g_str_has_prefix(name, "tweak_"))
- {
- tweak_name = g_strdup(name);
- }
- else
- {
- tweak_name = g_strdup_printf("tweak_%s", name);
- }
-
- tweak = ghb_dict_get_string(ud->settings, tweak_name);
- dialog = GHB_WIDGET(ud->builder, "tweak_dialog");
- gtk_window_set_title(GTK_WINDOW(dialog), tweak_name);
- entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "tweak_setting"));
- if (tweak)
- {
- gtk_entry_set_text(entry, tweak);
- }
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_hide(dialog);
- if (response == GTK_RESPONSE_OK)
- {
- tweak = (gchar*)gtk_entry_get_text(entry);
- if (ghb_validate_filter_string(tweak, -1))
- ghb_dict_set_string(ud->settings, tweak_name, tweak);
- else
- {
- GtkWindow *hb_window;
- gchar *message;
- hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
- message = g_strdup_printf(
- _("Invalid Settings:\n%s"),
- tweak);
- ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
- g_free(message);
- }
- }
- g_free(tweak_name);
- ret = TRUE;
- }
- return ret;
-}
-
-G_MODULE_EXPORT gboolean
easter_egg_cb(
GtkWidget *widget,
GdkEventButton *event,