diff options
author | Stefano Karapetsas <[email protected]> | 2013-11-29 04:09:26 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-11-29 04:09:26 -0800 |
commit | 3f71479324ce6896c3cd8a480aacaf588ab159a9 (patch) | |
tree | b03010cddcc8dec0221b28bfc40d00cdd2c2e058 | |
parent | ef1bad990c74e1b39e3184139c7742fa6569a612 (diff) | |
parent | 27daac2e3469ec6620309b8bbcf947934874dd9d (diff) | |
download | mate-panel-3f71479324ce6896c3cd8a480aacaf588ab159a9.tar.bz2 mate-panel-3f71479324ce6896c3cd8a480aacaf588ab159a9.tar.xz |
Merge pull request #145 from infirit/master
Check if WNCK_CHECK_VERSION is defined
-rw-r--r-- | applets/wncklet/window-list.c | 14 | ||||
-rw-r--r-- | applets/wncklet/workspace-switcher.c | 6 |
2 files changed, 16 insertions, 4 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index c48b4e7b..dfa571fb 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -121,9 +121,11 @@ static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient tasklist->orientation = new_orient; -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (3, 4, 6) +#ifdef WNCK_CHECK_VERSION +#if WNCK_CHECK_VERSION (3, 4, 6) wnck_tasklist_set_orientation (tasklist->tasklist, new_orient); #endif +#endif tasklist_update(tasklist); } @@ -433,15 +435,21 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (2, 91, 6) +#ifdef WNCK_CHECK_VERSION +#if WNCK_CHECK_VERSION (2, 91, 6) tasklist->tasklist = wnck_tasklist_new(); #else tasklist->tasklist = wnck_tasklist_new(NULL); #endif +#else + tasklist->tasklist = wnck_tasklist_new(NULL); +#endif -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (3, 4, 6) +#ifdef WNCK_CHECK_VERSION +#if WNCK_CHECK_VERSION (3, 4, 6) wnck_tasklist_set_orientation (tasklist->tasklist, tasklist->orientation); #endif +#endif wnck_tasklist_set_icon_loader(WNCK_TASKLIST(tasklist->tasklist), icon_loader_func, tasklist, NULL); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 3ae4f9d2..e4202076 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -529,11 +529,15 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (2, 91, 6) +#ifdef WNCK_CHECK_VERSION +#if WNCK_CHECK_VERSION (2, 91, 6) pager->pager = wnck_pager_new(); #else pager->pager = wnck_pager_new(NULL); #endif +#else + pager->pager = wnck_pager_new(NULL); +#endif pager->screen = NULL; pager->wm = PAGER_WM_UNKNOWN; wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN); |