summaryrefslogtreecommitdiff
path: root/applets/notification_area/testtray.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area/testtray.c')
-rw-r--r--applets/notification_area/testtray.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/applets/notification_area/testtray.c b/applets/notification_area/testtray.c
index 74cde0e7..c541aaa2 100644
--- a/applets/notification_area/testtray.c
+++ b/applets/notification_area/testtray.c
@@ -215,19 +215,28 @@ main (int argc, char *argv[])
{
GdkDisplay *display;
GdkScreen *screen;
+#if !GTK_CHECK_VERSION (3, 0, 0)
int n_screens, i;
+#endif
gtk_init (&argc, &argv);
gtk_window_set_default_icon_name (NOTIFICATION_AREA_ICON);
display = gdk_display_get_default ();
+#if GTK_CHECK_VERSION (3, 0, 0)
+ screen = gdk_display_get_default_screen (display);
+
+ create_tray_on_screen (screen, FALSE);
+#else
n_screens = gdk_display_get_n_screens (display);
for (i = 0; i < n_screens; ++i) {
screen = gdk_display_get_screen (display, i);
-
create_tray_on_screen (screen, FALSE);
+
+ create_tray_on_screen (screen, FALSE);
}
+#endif
gtk_main ();