Rename gtk_application_window_get_observer
This should have been called _create_observer https://bugzilla.gnome.org/show_bug.cgi?id=667394 Fixup switch
This commit is contained in:
committed by
Matthias Clasen
parent
bec43213da
commit
ab91527032
@ -35,7 +35,7 @@ G_GNUC_INTERNAL
|
||||
void gtk_application_window_unpublish (GtkApplicationWindow *window);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GSimpleActionObserver * gtk_application_window_get_observer (GtkApplicationWindow *window,
|
||||
GSimpleActionObserver * gtk_application_window_create_observer (GtkApplicationWindow *window,
|
||||
const gchar *action_name,
|
||||
GVariant *target);
|
||||
|
||||
|
||||
@ -984,7 +984,7 @@ gtk_application_window_set_show_menubar (GtkApplicationWindow *window,
|
||||
}
|
||||
|
||||
GSimpleActionObserver *
|
||||
gtk_application_window_get_observer (GtkApplicationWindow *window,
|
||||
gtk_application_window_create_observer (GtkApplicationWindow *window,
|
||||
const gchar *action_name,
|
||||
GVariant *target)
|
||||
{
|
||||
|
||||
@ -709,7 +709,7 @@ gtk_button_update_action_observer (GtkButton *button)
|
||||
{
|
||||
GSimpleActionObserver *observer;
|
||||
|
||||
observer = gtk_application_window_get_observer (GTK_APPLICATION_WINDOW (window),
|
||||
observer = gtk_application_window_create_observer (GTK_APPLICATION_WINDOW (window),
|
||||
button->priv->action_name,
|
||||
button->priv->action_target);
|
||||
|
||||
|
||||
@ -713,11 +713,10 @@ gtk_switch_update_action_observer (GtkSwitch *sw)
|
||||
{
|
||||
GSimpleActionObserver *observer;
|
||||
|
||||
observer = gtk_application_window_get_observer (GTK_APPLICATION_WINDOW (window),
|
||||
observer = gtk_application_window_create_observer (GTK_APPLICATION_WINDOW (window),
|
||||
sw->priv->action_name,
|
||||
sw->priv->action_target);
|
||||
|
||||
if (g_object_class_find_property (G_OBJECT_GET_CLASS (sw), "active"))
|
||||
g_object_bind_property (observer, "active", sw, "active", G_BINDING_SYNC_CREATE);
|
||||
g_object_bind_property (observer, "enabled", sw, "sensitive", G_BINDING_SYNC_CREATE);
|
||||
|
||||
@ -733,15 +732,12 @@ gtk_switch_set_action_name (GtkActionable *actionable,
|
||||
|
||||
g_return_if_fail (GTK_IS_SWITCH (sw));
|
||||
|
||||
if (g_strcmp0 (action_name, sw->priv->action_name) != 0)
|
||||
{
|
||||
g_free (sw->priv->action_name);
|
||||
sw->priv->action_name = g_strdup (action_name);
|
||||
|
||||
gtk_switch_update_action_observer (sw);
|
||||
|
||||
g_object_notify (G_OBJECT (sw), "action-name");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user