forked from AuroraMiddleware/gtk
examples: Stop using gtk_widget_show/hide
This commit is contained in:
parent
fba4cea2e8
commit
b8962fcba7
@ -106,7 +106,7 @@ activate (GApplication *app,
|
||||
gtk_widget_set_halign (GTK_WIDGET (button), GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (GTK_WIDGET (button), GTK_ALIGN_START);
|
||||
gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
gtk_widget_show (win);
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
|
||||
g_object_unref (button_menu);
|
||||
g_object_unref (doc_actions);
|
||||
|
@ -292,7 +292,7 @@ new_window (GApplication *app,
|
||||
G_CALLBACK (text_buffer_changed_cb), window);
|
||||
text_buffer_changed_cb (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)), window);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -465,7 +465,7 @@ edit_accels (GSimpleAction *action,
|
||||
|
||||
gtk_drop_down_set_selected (GTK_DROP_DOWN (combo), 0);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -37,7 +37,7 @@ activate (GtkApplication *app,
|
||||
button = gtk_builder_get_object (builder, "quit");
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (quit_cb), window);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ activate (GtkApplication *app,
|
||||
|
||||
g_signal_connect (press, "pressed", G_CALLBACK (pressed), drawing_area);
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -49,7 +49,7 @@ activate (GtkApplication *app,
|
||||
*/
|
||||
gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 2, 1);
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ activate (GtkApplication *app,
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -112,7 +112,7 @@ new_window (GApplication *app,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
static void
|
||||
activate_cb (GtkApplication *app,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *search_bar;
|
||||
@ -11,12 +11,11 @@ activate_cb (GtkApplication *app,
|
||||
GtkWidget *menu_button;
|
||||
|
||||
window = gtk_application_window_new (app);
|
||||
gtk_widget_show (window);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
|
||||
search_bar = gtk_search_bar_new ();
|
||||
gtk_widget_set_valign (search_bar, GTK_ALIGN_START);
|
||||
gtk_window_set_child (GTK_WINDOW (window), search_bar);
|
||||
gtk_widget_show (search_bar);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_search_bar_set_child (GTK_SEARCH_BAR (search_bar), box);
|
||||
|
@ -43,7 +43,7 @@ new_window (GApplication *app,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -9,7 +9,7 @@ activate (GtkApplication* app,
|
||||
window = gtk_application_window_new (app);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
||||
gtk_widget_show (window);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user