summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-19 02:04:18 -0800
committerStefano Karapetsas <[email protected]>2012-11-19 02:04:18 -0800
commit4f79502e2c626d037b380f451c16ce1135ea3623 (patch)
tree31c1ebf3bda44cd1f8c5fb27de356caf3037567f
parent98be82c4742bf3a5be20d07d70b1a81beadda4f5 (diff)
parent879bd3789e84f31d90cf1b46a2985c6e78685609 (diff)
downloadmate-netbook-4f79502e2c626d037b380f451c16ce1135ea3623.tar.bz2
mate-netbook-4f79502e2c626d037b380f451c16ce1135ea3623.tar.xz
Merge pull request #1 from sbalneav/mastermate-netbook-1.5.0
Fixed deprecation, compile error & warnings.
-rw-r--r--maximus/main.c13
-rw-r--r--maximus/maximus-bind.c16
-rw-r--r--maximus/tomboykeybinder.h2
-rw-r--r--maximus/xutils.c8
4 files changed, 31 insertions, 8 deletions
diff --git a/maximus/main.c b/maximus/main.c
index 6bf4e1b..8083f48 100644
--- a/maximus/main.c
+++ b/maximus/main.c
@@ -30,6 +30,12 @@
#include "maximus-app.h"
+#ifdef __GNUC__
+#define UNUSED_VARIABLE __attribute__ ((unused))
+#else
+#define UNUSED_VARIABLE
+#endif
+
static gboolean version = FALSE;
gboolean no_maximize = FALSE;
@@ -55,10 +61,15 @@ GOptionEntry entries[] =
gint main (gint argc, gchar *argv[])
{
UniqueApp *unique;
- MaximusApp *app;
+ MaximusApp UNUSED_VARIABLE *app;
GOptionContext *context;
+#if GLIB_CHECK_VERSION (2, 32, 0)
+ /* g_thread_init (NULL); */
+#else
g_thread_init (NULL);
+#endif
+
g_set_application_name ("Maximus");
gtk_init (&argc, &argv);
diff --git a/maximus/maximus-bind.c b/maximus/maximus-bind.c
index 69de949..b58cbc1 100644
--- a/maximus/maximus-bind.c
+++ b/maximus/maximus-bind.c
@@ -58,6 +58,12 @@ G_DEFINE_TYPE (MaximusBind, maximus_bind, G_TYPE_OBJECT);
#define SYSRULESDIR SYSCONFDIR"/maximus"
+#ifdef __GNUC__
+#define UNUSED_VARIABLE __attribute__ ((unused))
+#else
+#define UNUSED_VARIABLE
+#endif
+
struct _MaximusBindPrivate
{
FakeKey *fk;
@@ -131,7 +137,7 @@ static gboolean
real_fullscreen (MaximusBind *bind)
{
MaximusBindPrivate *priv;
- GdkDisplay *display;
+ GdkDisplay UNUSED_VARIABLE *display;
MatewnckWindow *active;
const gchar *keystroke;
@@ -194,7 +200,7 @@ real_fullscreen (MaximusBind *bind)
static void
fullscreen (MaximusBind *bind, MatewnckWindow *window)
{
- MaximusBindPrivate *priv;
+ MaximusBindPrivate UNUSED_VARIABLE *priv;
priv = bind->priv;
@@ -205,7 +211,7 @@ static gboolean
real_unfullscreen (MaximusBind *bind)
{
MaximusBindPrivate *priv;
- GdkDisplay *display;
+ GdkDisplay UNUSED_VARIABLE *display;
MatewnckWindow *active;
const gchar *keystroke;
@@ -267,7 +273,7 @@ real_unfullscreen (MaximusBind *bind)
static void
unfullscreen (MaximusBind *bind, MatewnckWindow *window)
{
- MaximusBindPrivate *priv;
+ MaximusBindPrivate UNUSED_VARIABLE *priv;
priv = bind->priv;
@@ -390,7 +396,7 @@ create_rule (MaximusBind *bind, const gchar *filename)
static void
load_rules (MaximusBind *bind, const gchar *path)
{
- MaximusBindPrivate *priv;
+ MaximusBindPrivate UNUSED_VARIABLE *priv;
GDir *dir;
const gchar *name;
diff --git a/maximus/tomboykeybinder.h b/maximus/tomboykeybinder.h
index 97c1887..ea70ef4 100644
--- a/maximus/tomboykeybinder.h
+++ b/maximus/tomboykeybinder.h
@@ -18,7 +18,7 @@
#ifndef __TOMBOY_KEY_BINDER_H__
#define __TOMBOY_KEY_BINDER_H__
-#include <glib/gtypes.h>
+#include <glib.h>
G_BEGIN_DECLS
diff --git a/maximus/xutils.c b/maximus/xutils.c
index f131f81..4e79569 100644
--- a/maximus/xutils.c
+++ b/maximus/xutils.c
@@ -27,6 +27,12 @@
#include <stdio.h>
#include <libmatewnck/libmatewnck.h>
+#ifdef __GNUC__
+#define UNUSED_VARIABLE __attribute__ ((unused))
+#else
+#define UNUSED_VARIABLE
+#endif
+
void
_matewnck_error_trap_push (void)
{
@@ -64,7 +70,7 @@ _matewnck_get_wmclass (Window xwindow,
char **res_name)
{
XClassHint ch;
- char *retval;
+ char UNUSED_VARIABLE *retval;
_matewnck_error_trap_push ();