forked from AuroraMiddleware/gtk
Rename gtk_window_set_default
Call it gtk_window_set_default_widget, to match the getter, and the property name. Update all callers.
This commit is contained in:
parent
1364eb2f62
commit
65052a5d6c
@ -77,7 +77,7 @@ do_password_entry (GtkWidget *do_widget)
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_window_set_default (GTK_WINDOW (window), button);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@ -100,7 +100,7 @@ do_tagged_entry (GtkWidget *do_widget)
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_window_set_default (GTK_WINDOW (window), button);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@ -4671,7 +4671,7 @@ gtk_window_propagate_key_event
|
||||
gtk_window_get_focus
|
||||
gtk_window_set_focus
|
||||
gtk_window_get_default_widget
|
||||
gtk_window_set_default
|
||||
gtk_window_set_default_widget
|
||||
gtk_window_present
|
||||
gtk_window_present_with_time
|
||||
gtk_window_close
|
||||
|
@ -818,7 +818,7 @@ gtk_popover_map (GtkWidget *widget)
|
||||
gdk_surface_show (gtk_widget_get_surface (widget));
|
||||
gtk_popover_update_position (GTK_POPOVER (widget));
|
||||
|
||||
gtk_window_set_default (priv->window, priv->default_widget);
|
||||
gtk_window_set_default_widget (priv->window, priv->default_widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -832,7 +832,7 @@ gtk_popover_unmap (GtkWidget *widget)
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->unmap (widget);
|
||||
|
||||
if (gtk_window_get_default_widget (priv->window) == priv->default_widget)
|
||||
gtk_window_set_default (priv->window, priv->prev_default);
|
||||
gtk_window_set_default_widget (priv->window, priv->prev_default);
|
||||
g_clear_object (&priv->prev_default);
|
||||
}
|
||||
|
||||
@ -2392,7 +2392,7 @@ gtk_popover_set_default_widget (GtkPopover *popover,
|
||||
g_object_ref (priv->default_widget);
|
||||
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (popover)))
|
||||
gtk_window_set_default (priv->window, priv->default_widget);
|
||||
gtk_window_set_default_widget (priv->window, priv->default_widget);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5927,7 +5927,7 @@ gtk_widget_grab_default (GtkWidget *widget)
|
||||
window = _gtk_widget_get_toplevel (widget);
|
||||
|
||||
if (window && _gtk_widget_is_toplevel (window))
|
||||
gtk_window_set_default (GTK_WINDOW (window), widget);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), widget);
|
||||
else
|
||||
g_warning (G_STRLOC ": widget not within a GtkWindow");
|
||||
}
|
||||
|
@ -2529,7 +2529,7 @@ gtk_window_set_startup_id (GtkWindow *window,
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_default:
|
||||
* gtk_window_set_default_widget:
|
||||
* @window: a #GtkWindow
|
||||
* @default_widget: (allow-none): widget to be the default, or %NULL
|
||||
* to unset the default widget for the toplevel
|
||||
@ -2543,8 +2543,8 @@ gtk_window_set_startup_id (GtkWindow *window,
|
||||
* the widget you’d like to make the default.
|
||||
*/
|
||||
void
|
||||
gtk_window_set_default (GtkWindow *window,
|
||||
GtkWidget *default_widget)
|
||||
gtk_window_set_default_widget (GtkWindow *window,
|
||||
GtkWidget *default_widget)
|
||||
{
|
||||
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
|
||||
|
||||
@ -3046,7 +3046,7 @@ gtk_window_dispose (GObject *object)
|
||||
priv->foci = NULL;
|
||||
|
||||
gtk_window_set_focus (window, NULL);
|
||||
gtk_window_set_default (window, NULL);
|
||||
gtk_window_set_default_widget (window, NULL);
|
||||
remove_attach_widget (window);
|
||||
|
||||
G_OBJECT_CLASS (gtk_window_parent_class)->dispose (object);
|
||||
@ -6618,7 +6618,7 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
|
||||
child = _gtk_widget_get_parent (child);
|
||||
|
||||
if (child == widget)
|
||||
gtk_window_set_default (window, NULL);
|
||||
gtk_window_set_default_widget (window, NULL);
|
||||
|
||||
g_object_unref (widget);
|
||||
g_object_unref (window);
|
||||
|
@ -163,7 +163,7 @@ void gtk_window_set_focus (GtkWindow *window,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget *gtk_window_get_focus (GtkWindow *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_window_set_default (GtkWindow *window,
|
||||
void gtk_window_set_default_widget (GtkWindow *window,
|
||||
GtkWidget *default_widget);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget *gtk_window_get_default_widget (GtkWindow *window);
|
||||
|
Loading…
Reference in New Issue
Block a user