summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-02-23 22:27:10 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-02-23 22:28:10 -0800
commitc7ebc73c89db6e9ee6c53d13d97707f75372e5e1 (patch)
tree987c2f4e1348d3ab27da3212e68da50fa80bf82c
parent19ff61a9767dd4a0efd14a42dbbb440716003b13 (diff)
Avoid Gtk[HV]Box warnings on gtk3
-rw-r--r--src/ev-page-action-widget.c4
-rw-r--r--test/previewer.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ev-page-action-widget.c b/src/ev-page-action-widget.c
index 311c442..143ff70 100644
--- a/src/ev-page-action-widget.c
+++ b/src/ev-page-action-widget.c
@@ -158,7 +158,11 @@ ev_page_action_widget_init (EvPageActionWidget *action_widget)
GtkWidget *hbox;
AtkObject *obj;
+#if GTK_MAJOR_VERSION > 2
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+#else
hbox = gtk_hbox_new (FALSE, 0);
+#endif
gtk_box_set_spacing (GTK_BOX (hbox), 6);
action_widget->entry = gtk_entry_new ();
diff --git a/test/previewer.c b/test/previewer.c
index ff8143b..acd8f5f 100644
--- a/test/previewer.c
+++ b/test/previewer.c
@@ -148,7 +148,11 @@ main(int argc, char *argv[])
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
/* box with button to quit */
+#if GTK_MAJOR_VERSION > 2
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+#else
box = gtk_vbox_new(FALSE, 0);
+#endif
gtk_container_add(GTK_CONTAINER(window), box);
button = gtk_button_new_with_label("Quit");
gtk_box_pack_end(GTK_BOX(box), button, FALSE, FALSE, 0);