diff options
author | Stefano Karapetsas <[email protected]> | 2013-11-23 07:42:37 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-11-23 07:42:37 -0800 |
commit | 43414fec3d31d10c8ca2c9fa227b7e4a75500719 (patch) | |
tree | dc02ba832518d84d7c1ae7a2d3ab65f076708ce6 /src/interface.cpp | |
parent | 77940a42279f216e9707223e7f3320f13cb8d500 (diff) | |
parent | cec5516cb84a7ecc9489a36cd19bfe28d1bba54e (diff) | |
download | mate-system-monitor-43414fec3d31d10c8ca2c9fa227b7e4a75500719.tar.bz2 mate-system-monitor-43414fec3d31d10c8ca2c9fa227b7e4a75500719.tar.xz |
Merge pull request #29 from eyelash/gtk3
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); |