summaryrefslogtreecommitdiff
path: root/multiload/main.c
diff options
context:
space:
mode:
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);