diff options
author | John Stebbins <[email protected]> | 2019-07-29 16:40:09 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-07-29 16:40:09 -0700 |
commit | 7192eab2b82783c7a180865e35dc39f1d0a31a90 (patch) | |
tree | 24929d99c22e42b84e17720eda4d6aa404a99890 /gtk/src/settings.c | |
parent | f1eb28e3fcef8d5a01d99845781f4eede5b3cc44 (diff) |
LinGui: gtk4 port, fix reading/writing GtkSpinButton text
In GTK4, GtkSpinButton is no longer a subclass of GtkEntry. Must use
GtkEditable APIs in GTK4
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r-- | gtk/src/settings.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c index 7dad5f7e8..b95b85301 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -102,7 +102,7 @@ ghb_widget_value(GtkWidget *widget) name = ghb_get_setting_key(widget); if (type == GTK_TYPE_ENTRY) { - const gchar *str = ghb_entry_get_text(GTK_ENTRY(widget)); + const gchar *str = ghb_editable_get_text(widget); value = ghb_string_value_new(str); } else if (type == GTK_TYPE_RADIO_BUTTON) @@ -161,7 +161,7 @@ ghb_widget_value(GtkWidget *widget) else if (gtk_combo_box_get_has_entry(GTK_COMBO_BOX(widget))) { const gchar *str; - str = ghb_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(widget)))); + str = ghb_editable_get_text(gtk_bin_get_child(GTK_BIN(widget))); if (str == NULL) str = ""; value = ghb_string_value_new(str); } @@ -343,7 +343,7 @@ ghb_update_widget(GtkWidget *widget, const GhbValue *value) if (type == GTK_TYPE_ENTRY) { - ghb_entry_set_text((GtkEntry*)widget, str); + ghb_editable_set_text(widget, str); } else if (type == GTK_TYPE_RADIO_BUTTON) { @@ -412,7 +412,7 @@ ghb_update_widget(GtkWidget *widget, const GhbValue *value) GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(widget))); if (entry) { - ghb_entry_set_text (entry, str); + ghb_editable_set_text(entry, str); } else { |