[gtk/wip/matthiasc/popup4: 92/94] widget: Remove special handling for has-default in ui files
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 92/94] widget: Remove special handling for has-default in ui files
- Date: Sat, 27 Apr 2019 04:49:08 +0000 (UTC)
commit bfde91d416d581602476d2a9c7d8a9427961d69c
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Apr 27 03:49:52 2019 +0000
widget: Remove special handling for has-default in ui files
We can just set default-widget in ui files.
gtk/gtkwidget.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5badab6b96..9f5af4b5c1 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9565,7 +9565,6 @@ gtk_widget_set_vexpand_set (GtkWidget *widget,
/*
* GtkBuildable implementation
*/
-static GQuark quark_builder_has_default = 0;
static GQuark quark_builder_has_focus = 0;
static GQuark quark_builder_atk_relations = 0;
static GQuark quark_builder_set_name = 0;
@@ -9598,7 +9597,6 @@ gtk_widget_buildable_add_child (GtkBuildable *buildable,
static void
gtk_widget_buildable_interface_init (GtkBuildableIface *iface)
{
- quark_builder_has_default = g_quark_from_static_string ("gtk-builder-has-default");
quark_builder_has_focus = g_quark_from_static_string ("gtk-builder-has-focus");
quark_builder_atk_relations = g_quark_from_static_string ("gtk-builder-atk-relations");
quark_builder_set_name = g_quark_from_static_string ("gtk-builder-set-name");
@@ -9677,10 +9675,7 @@ gtk_widget_buildable_set_buildable_property (GtkBuildable *buildable,
const gchar *name,
const GValue *value)
{
- if (strcmp (name, "has-default") == 0 && g_value_get_boolean (value))
- g_object_set_qdata (G_OBJECT (buildable), quark_builder_has_default,
- GINT_TO_POINTER (TRUE));
- else if (strcmp (name, "has-focus") == 0 && g_value_get_boolean (value))
+ if (strcmp (name, "has-focus") == 0 && g_value_get_boolean (value))
g_object_set_qdata (G_OBJECT (buildable), quark_builder_has_focus,
GINT_TO_POINTER (TRUE));
else
@@ -9725,12 +9720,6 @@ gtk_widget_buildable_parser_finished (GtkBuildable *buildable,
{
GSList *atk_relations;
- if (g_object_get_qdata (G_OBJECT (buildable), quark_builder_has_default))
- {
- gtk_widget_grab_default (GTK_WIDGET (buildable));
- g_object_steal_qdata (G_OBJECT (buildable), quark_builder_has_default);
- }
-
if (g_object_get_qdata (G_OBJECT (buildable), quark_builder_has_focus))
{
gtk_widget_grab_focus (GTK_WIDGET (buildable));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]