[gtk/default-handling: 3/18] Rename gtk_window_set_default
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/default-handling: 3/18] Rename gtk_window_set_default
- Date: Sun, 28 Apr 2019 19:32:04 +0000 (UTC)
commit 776adaf2b0274e48a8c379b684ef3f0b408ea6de
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 28 19:15:11 2019 +0000
Rename gtk_window_set_default
Call it gtk_window_set_default_widget, to match
the getter, and the property name. Update all
callers.
demos/gtk-demo/password_entry.c | 2 +-
demos/gtk-demo/tagged_entry.c | 2 +-
docs/reference/gtk/gtk4-sections.txt | 2 +-
gtk/gtkpopover.c | 6 +++---
gtk/gtkwidget.c | 2 +-
gtk/gtkwindow.c | 10 +++++-----
gtk/gtkwindow.h | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/demos/gtk-demo/password_entry.c b/demos/gtk-demo/password_entry.c
index b7083286bd..8040692950 100644
--- a/demos/gtk-demo/password_entry.c
+++ b/demos/gtk-demo/password_entry.c
@@ -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))
diff --git a/demos/gtk-demo/tagged_entry.c b/demos/gtk-demo/tagged_entry.c
index 6405d19643..b9b8915aa0 100644
--- a/demos/gtk-demo/tagged_entry.c
+++ b/demos/gtk-demo/tagged_entry.c
@@ -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))
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 33db802937..33b23a0211 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4672,7 +4672,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
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index b22ffd453c..43321fc734 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -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);
}
/**
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 89e633021a..6587a67e85 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5926,7 +5926,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");
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a39b108f41..1f6f486cbf 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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);
@@ -3067,7 +3067,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);
@@ -6645,7 +6645,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);
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 3a06f4b422..4fe9dfa609 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -165,7 +165,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]