Avoid a couple compilation warnings with Gtk+ 3

This commit is contained in:
Pierre Pronchery 2016-01-26 01:32:00 +01:00
parent 006b4e29f0
commit dd70931abb
2 changed files with 6 additions and 0 deletions

View File

@ -92,7 +92,11 @@ static char * _vncviewer_get_hostname(void)
gtk_dialog_set_default_response(GTK_DIALOG(dialog),
GTK_RESPONSE_ACCEPT);
gtk_window_set_title(GTK_WINDOW(dialog), PACKAGE);
#if GTK_CHECK_VERSION(3, 0, 0)
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
#else
box = gtk_hbox_new(FALSE, 4);
#endif
widget = gtk_label_new(_("Hostname: "));
gtk_box_pack_start(GTK_BOX(box), widget, FALSE, TRUE, 0);
widget = gtk_entry_new();

View File

@ -781,6 +781,8 @@ int vncviewer(gchar ** args)
gtk_window_set_icon_name(GTK_WINDOW(window), "gnome-remote-desktop");
#if WITH_LIBVIEW
layout = ViewAutoDrawer_New();
#elif GTK_CHECK_VERSION(3, 0, 0)
layout = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
#else
layout = gtk_vbox_new(FALSE, 0);
#endif