[gtk/wip/exalm/test: 34/37] tests: Remove orientation from testvolumebutton
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/exalm/test: 34/37] tests: Remove orientation from testvolumebutton
- Date: Mon, 11 May 2020 15:19:54 +0000 (UTC)
commit 2323e8d77d4749eff6f23d6abe87fc2e42baffb3
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon May 11 19:53:31 2020 +0500
tests: Remove orientation from testvolumebutton
GtkVolumeButton isn't orientable anymore.
tests/testvolumebutton.c | 29 -----------------------------
1 file changed, 29 deletions(-)
---
diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c
index 5a3b31f049..bb38c8c306 100644
--- a/tests/testvolumebutton.c
+++ b/tests/testvolumebutton.c
@@ -25,23 +25,6 @@ value_changed (GtkWidget *button,
g_message ("volume changed to %f", volume);
}
-static void
-toggle_orientation (GtkWidget *button,
- GtkWidget *scalebutton)
-{
- if (gtk_orientable_get_orientation (GTK_ORIENTABLE (scalebutton)) ==
- GTK_ORIENTATION_HORIZONTAL)
- {
- gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
- GTK_ORIENTATION_VERTICAL);
- }
- else
- {
- gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
- GTK_ORIENTATION_HORIZONTAL);
- }
-}
-
static void
response_cb (GtkDialog *dialog,
gint arg1,
@@ -78,7 +61,6 @@ main (int argc,
GtkWidget *window;
GtkWidget *button;
GtkWidget *button2;
- GtkWidget *button3;
GtkWidget *box;
GtkWidget *vbox;
@@ -100,18 +82,7 @@ main (int argc,
gtk_container_add (GTK_CONTAINER (box), button);
gtk_container_add (GTK_CONTAINER (box), button2);
- button3 = gtk_button_new_with_label ("Toggle orientation");
- gtk_container_add (GTK_CONTAINER (box), button3);
-
- g_signal_connect (G_OBJECT (button3), "clicked",
- G_CALLBACK (toggle_orientation),
- button);
- g_signal_connect (G_OBJECT (button3), "clicked",
- G_CALLBACK (toggle_orientation),
- button2);
-
gtk_widget_show (window);
- g_signal_emit_by_name (button, "clicked");
g_timeout_add (4000, (GSourceFunc) show_error, window);
while (TRUE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]