diff options
author | Elias Aebi <[email protected]> | 2013-11-21 17:35:20 +0100 |
---|---|---|
committer | Elias Aebi <[email protected]> | 2013-11-21 17:35:20 +0100 |
commit | cec5516cb84a7ecc9489a36cd19bfe28d1bba54e (patch) | |
tree | 57f472180ae1fb84be63be95e81611d656c5c787 /src/interface.cpp | |
parent | 11c4069c618a6253db551fa5300b0ee5fc4f5de6 (diff) | |
download | mate-system-monitor-cec5516cb84a7ecc9489a36cd19bfe28d1bba54e.tar.bz2 mate-system-monitor-cec5516cb84a7ecc9489a36cd19bfe28d1bba54e.tar.xz |
add support for GTK3
Diffstat (limited to 'src/interface.cpp')
-rw-r--r-- | src/interface.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index b12301b..ab201d5 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -618,12 +618,17 @@ create_main_window (ProcData *procdata) app = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(app), _("System Monitor")); + /* use rgba colormap, if available */ GdkScreen* screen = gtk_widget_get_screen(app); +#if GTK_CHECK_VERSION(3,0,0) + GdkVisual* visual = gdk_screen_get_rgba_visual(screen); + if (visual) + gtk_widget_set_visual(app, visual); +#else GdkColormap* colormap = gdk_screen_get_rgba_colormap(screen); - - /* use rgba colormap, if available */ if (colormap) gtk_widget_set_default_colormap(colormap); +#endif main_box = gtk_vbox_new (FALSE, 0); gtk_container_add(GTK_CONTAINER(app), main_box); |