summaryrefslogtreecommitdiff
path: root/multiload/main.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-22 17:47:06 +0300
committermonsta <[email protected]>2016-11-22 17:47:06 +0300
commitf7acf55db3ab4b97d60faae24555a07b6b08d43c (patch)
tree6feb99e63f801161642669b01c9ce0c217e60d0b /multiload/main.c
parent45354a60352e05eba7e66e24a171e713876d71e9 (diff)
downloadmate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.bz2
mate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17 WARNING: use GTK+3 build of libmateweather for this build. that lib is not migrated to GTK+3 only as we will possibly use libgweather instead of it.
Diffstat (limited to 'multiload/main.c')
-rw-r--r--multiload/main.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/multiload/main.c b/multiload/main.c
index 9915bed1..e26cd596 100644
--- a/multiload/main.c
+++ b/multiload/main.c
@@ -27,11 +27,6 @@
#include <mate-panel-applet.h>
#include <mate-panel-applet-gsettings.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
-#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
-#endif
-
#include "global.h"
static void
@@ -101,9 +96,7 @@ start_procman (MultiloadApplet *ma)
GDesktopAppInfo *appinfo;
gchar *monitor;
GdkAppLaunchContext *launch_context;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
-#endif
GAppInfo *app_info;
GdkScreen *screen;
@@ -119,12 +112,8 @@ start_procman (MultiloadApplet *ma)
GdkScreen *screen;
GdkAppLaunchContext *context;
screen = gtk_widget_get_screen (GTK_WIDGET (ma->applet));
-#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_screen_get_display (screen);
context = gdk_display_get_app_launch_context (display);
-#else
- context = gdk_app_launch_context_new ();
-#endif
gdk_app_launch_context_set_screen (context, screen);
g_app_info_launch (G_APP_INFO (appinfo), NULL, G_APP_LAUNCH_CONTEXT (context), &error);
g_object_unref (context);
@@ -137,12 +126,8 @@ start_procman (MultiloadApplet *ma)
&error);
if (!error) {
-#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_screen_get_display (screen);
launch_context = gdk_display_get_app_launch_context (display);
-#else
- launch_context = gdk_app_launch_context_new ();
-#endif
gdk_app_launch_context_set_screen (launch_context, screen);
g_app_info_launch (app_info, NULL, G_APP_LAUNCH_CONTEXT (launch_context), &error);
@@ -440,10 +425,10 @@ multiload_applet_refresh(MultiloadApplet *ma)
if ( (orientation == MATE_PANEL_APPLET_ORIENT_UP) ||
(orientation == MATE_PANEL_APPLET_ORIENT_DOWN) ) {
- ma->box = gtk_hbox_new(FALSE, 0);
+ ma->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
}
else
- ma->box = gtk_vbox_new(FALSE, 0);
+ ma->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(ma->applet), ma->box);