mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 19:00:12 +00:00
shortcutswindow: Modernize some code
No functional changes, just don't call valist functions anymore.
This commit is contained in:
parent
6c7b6f9654
commit
36b7ad0cd2
@ -862,13 +862,14 @@ static void
|
|||||||
gtk_shortcuts_window_init (GtkShortcutsWindow *self)
|
gtk_shortcuts_window_init (GtkShortcutsWindow *self)
|
||||||
{
|
{
|
||||||
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
|
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
|
||||||
GtkToggleButton *search_button;
|
GtkWidget *search_button;
|
||||||
GtkBox *menu_box;
|
GtkBox *menu_box;
|
||||||
GtkBox *box;
|
GtkBox *box;
|
||||||
GtkWidget *arrow;
|
GtkWidget *arrow;
|
||||||
GtkWidget *scroller;
|
GtkWidget *scroller;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *empty;
|
GtkWidget *empty;
|
||||||
|
GtkWidget *search_icon;
|
||||||
PangoAttrList *attributes;
|
PangoAttrList *attributes;
|
||||||
|
|
||||||
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
|
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
|
||||||
@ -889,15 +890,14 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
|
|||||||
NULL);
|
NULL);
|
||||||
gtk_window_set_titlebar (GTK_WINDOW (self), GTK_WIDGET (priv->header_bar));
|
gtk_window_set_titlebar (GTK_WINDOW (self), GTK_WIDGET (priv->header_bar));
|
||||||
|
|
||||||
search_button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
|
search_icon = gtk_image_new_from_icon_name ("edit-find-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
"child", g_object_new (GTK_TYPE_IMAGE,
|
gtk_widget_show (search_icon);
|
||||||
"visible", TRUE,
|
|
||||||
"icon-name", "edit-find-symbolic",
|
search_button = gtk_toggle_button_new ();
|
||||||
NULL),
|
gtk_container_add (GTK_CONTAINER (search_button), search_icon);
|
||||||
"visible", TRUE,
|
gtk_style_context_add_class (gtk_widget_get_style_context (search_button), "image-button");
|
||||||
NULL);
|
gtk_widget_show (search_button);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (search_button)), "image-button");
|
gtk_container_add (GTK_CONTAINER (priv->header_bar), search_button);
|
||||||
gtk_container_add (GTK_CONTAINER (priv->header_bar), GTK_WIDGET (search_button));
|
|
||||||
|
|
||||||
priv->main_box = g_object_new (GTK_TYPE_BOX,
|
priv->main_box = g_object_new (GTK_TYPE_BOX,
|
||||||
"orientation", GTK_ORIENTATION_VERTICAL,
|
"orientation", GTK_ORIENTATION_VERTICAL,
|
||||||
|
Loading…
Reference in New Issue
Block a user