forked from AuroraMiddleware/gtk
tests: Stop using gtk_window_set_gravity
This api is going away.
This commit is contained in:
parent
0481f123ea
commit
de741e57f3
@ -189,9 +189,6 @@ main(int argc, char **argv)
|
|||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
frame_stats_ensure (GTK_WINDOW (window));
|
frame_stats_ensure (GTK_WINDOW (window));
|
||||||
|
|
||||||
gtk_window_set_keep_above (GTK_WINDOW (window), TRUE);
|
|
||||||
gtk_window_set_gravity (GTK_WINDOW (window), GDK_GRAVITY_CENTER);
|
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
da = gtk_drawing_area_new ();
|
||||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
|
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (window), da);
|
gtk_container_add (GTK_CONTAINER (window), da);
|
||||||
|
@ -5336,14 +5336,6 @@ resizable_callback (GtkWidget *widget,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gravity_selected (GtkWidget *widget,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
gtk_window_set_gravity (GTK_WINDOW (g_object_get_data (data, "target")),
|
|
||||||
gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) + GDK_GRAVITY_NORTH_WEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pos_selected (GtkWidget *widget,
|
pos_selected (GtkWidget *widget,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -5500,37 +5492,6 @@ window_controls (GtkWidget *window)
|
|||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (vbox), om);
|
gtk_container_add (GTK_CONTAINER (vbox), om);
|
||||||
|
|
||||||
om = gtk_combo_box_text_new ();
|
|
||||||
i = 0;
|
|
||||||
while (i < 10)
|
|
||||||
{
|
|
||||||
static gchar *names[] = {
|
|
||||||
"GDK_GRAVITY_NORTH_WEST",
|
|
||||||
"GDK_GRAVITY_NORTH",
|
|
||||||
"GDK_GRAVITY_NORTH_EAST",
|
|
||||||
"GDK_GRAVITY_WEST",
|
|
||||||
"GDK_GRAVITY_CENTER",
|
|
||||||
"GDK_GRAVITY_EAST",
|
|
||||||
"GDK_GRAVITY_SOUTH_WEST",
|
|
||||||
"GDK_GRAVITY_SOUTH",
|
|
||||||
"GDK_GRAVITY_SOUTH_EAST",
|
|
||||||
"GDK_GRAVITY_STATIC",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
g_assert (names[i]);
|
|
||||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (om), names[i]);
|
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_signal_connect (om,
|
|
||||||
"changed",
|
|
||||||
G_CALLBACK (gravity_selected),
|
|
||||||
control_window);
|
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (vbox), om);
|
|
||||||
|
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
return control_window;
|
return control_window;
|
||||||
|
Loading…
Reference in New Issue
Block a user