[gtk/wip/matthiasc/popup2: 92/103] tests: Stop using gtk_window_set_gravity
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup2: 92/103] tests: Stop using gtk_window_set_gravity
- Date: Tue, 26 Mar 2019 00:15:37 +0000 (UTC)
commit 83a7ada721bfbe41a1cc7ba25d6077987d6a69f9
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 24 21:50:51 2019 -0400
tests: Stop using gtk_window_set_gravity
This api is going away.
tests/animated-resizing.c | 3 ---
tests/testgtk.c | 39 ---------------------------------------
2 files changed, 42 deletions(-)
---
diff --git a/tests/animated-resizing.c b/tests/animated-resizing.c
index dd849a4155..1984aace2d 100644
--- a/tests/animated-resizing.c
+++ b/tests/animated-resizing.c
@@ -189,9 +189,6 @@ main(int argc, char **argv)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
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 ();
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
gtk_container_add (GTK_CONTAINER (window), da);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index ab5bf82be7..a8d82b8e45 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5336,14 +5336,6 @@ resizable_callback (GtkWidget *widget,
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
pos_selected (GtkWidget *widget,
gpointer data)
@@ -5500,37 +5492,6 @@ window_controls (GtkWidget *window)
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);
return control_window;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]