summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-12-09 00:11:49 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2020-12-09 00:11:49 +0000
commitc4b768a4ec5cc72dea0efbe7c6277a4753df45f6 (patch)
tree7b8092e15150a8b33ed8fdbed57f25f77684b1d8
parent6d1be832d9120c6991613b873a32378169e19b47 (diff)
downloadgtk+-ebassi/prop-names.tar.gz
Rename GtkWindow:fullscreen to :fullscreenedebassi/prop-names
Having a property with the same name of a method makes some languages which put properties and method names in the same flat namespace not really happy about our choices. To avoid collisions, let's put the the "fullscreen" property into the past, alongside the "maximized" property.
-rw-r--r--gtk/gtkwindow.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 117e923624..1b6d994a3a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -285,7 +285,7 @@ enum {
PROP_FOCUS_VISIBLE,
PROP_MAXIMIZED,
- PROP_FULLSCREEN,
+ PROP_FULLSCREENED,
LAST_ARG
};
@@ -881,7 +881,7 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWindow:fullscreen:
+ * GtkWindow:fullscreened:
*
* Whether the window is fullscreen.
*
@@ -890,8 +890,8 @@ gtk_window_class_init (GtkWindowClass *klass)
* means you will need to connect to the #GObject::notify signal in order to
* know whether the operation was successful.
*/
- window_props[PROP_FULLSCREEN] =
- g_param_spec_boolean ("fullscreen",
+ window_props[PROP_FULLSCREENED] =
+ g_param_spec_boolean ("fullscreened",
P_("Is fullscreen"),
P_("Whether the window is fullscreen"),
FALSE,
@@ -1683,7 +1683,7 @@ gtk_window_set_property (GObject *object,
else
gtk_window_unmaximize (window);
break;
- case PROP_FULLSCREEN:
+ case PROP_FULLSCREENED:
if (g_value_get_boolean (value))
gtk_window_fullscreen (window);
else
@@ -1766,7 +1766,7 @@ gtk_window_get_property (GObject *object,
case PROP_MAXIMIZED:
g_value_set_boolean (value, gtk_window_is_maximized (window));
break;
- case PROP_FULLSCREEN:
+ case PROP_FULLSCREENED:
g_value_set_boolean (value, gtk_window_is_fullscreen (window));
break;
case PROP_FOCUS_WIDGET:
@@ -4493,7 +4493,7 @@ surface_state_changed (GtkWidget *widget)
priv->fullscreen = (new_surface_state & GDK_TOPLEVEL_STATE_FULLSCREEN) ? TRUE : FALSE;
priv->fullscreen_initially = priv->fullscreen;
- g_object_notify_by_pspec (G_OBJECT (widget), window_props[PROP_FULLSCREEN]);
+ g_object_notify_by_pspec (G_OBJECT (widget), window_props[PROP_FULLSCREENED]);
}
if (changed_mask & GDK_TOPLEVEL_STATE_MAXIMIZED)
@@ -5270,7 +5270,7 @@ gtk_window_fullscreen (GtkWindow *window)
if (priv->surface && gdk_surface_get_mapped (priv->surface))
gtk_window_update_toplevel (window);
else if (!was_fullscreen_initially)
- g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FULLSCREEN]);
+ g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FULLSCREENED]);
}
static void
@@ -5357,7 +5357,7 @@ gtk_window_unfullscreen (GtkWindow *window)
if (priv->surface && gdk_surface_get_mapped (priv->surface))
gtk_window_update_toplevel (window);
else if (was_fullscreen_initially)
- g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FULLSCREEN]);
+ g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_FULLSCREENED]);
}
/**