From e453fc3773d3b49665c42d54069c4c82a853bc64 Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 27 Nov 2013 13:23:16 +0100 Subject: Revert "Correct wnck/gtk3 check." This reverts commit a2b1af54a24b93766f5e2ed4a216637dc510ec47. --- applets/wncklet/window-list.c | 13 +++++++++---- applets/wncklet/workspace-switcher.c | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index fc913617..dd11af99 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -121,8 +121,10 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 0) +#if WNCK_CHECK_VERSION (3, 4, 6) wnck_tasklist_set_orientation (tasklist->tasklist, new_orient); +#endif #endif tasklist_update(tasklist); } @@ -425,16 +427,19 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (2, 91, 6) +#if GTK_CHECK_VERSION (3, 0, 0) +#if WNCK_CHECK_VERSION (2, 91, 6) tasklist->tasklist = wnck_tasklist_new(); +#endif #else tasklist->tasklist = wnck_tasklist_new(NULL); #endif -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (3, 4, 6) +#if GTK_CHECK_VERSION (3, 0, 0) +#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); g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 3ae4f9d2..64f0b330 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -529,8 +529,10 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) && WNCK_CHECK_VERSION (2, 91, 6) +#if GTK_CHECK_VERSION (3, 0, 0) +#if WNCK_CHECK_VERSION (2, 91, 6) pager->pager = wnck_pager_new(); +#endif #else pager->pager = wnck_pager_new(NULL); #endif -- cgit v1.2.1 From 39ad4f5cc370685777e53f3be10781179ea1bd9e Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 27 Nov 2013 13:23:20 +0100 Subject: Revert "Fixed the WNCK_CHECK_VERSION calls to only be used when GTK is version" This reverts commit 428e32cd0f3f2df0cbd4e859304f0935a11612bc. --- applets/wncklet/window-list.c | 7 +------ applets/wncklet/workspace-switcher.c | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index dd11af99..e24d6eb6 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -121,10 +121,8 @@ static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient tasklist->orientation = new_orient; -#if GTK_CHECK_VERSION (3, 0, 0) #if WNCK_CHECK_VERSION (3, 4, 6) wnck_tasklist_set_orientation (tasklist->tasklist, new_orient); -#endif #endif tasklist_update(tasklist); } @@ -427,19 +425,16 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) #if WNCK_CHECK_VERSION (2, 91, 6) tasklist->tasklist = wnck_tasklist_new(); -#endif #else tasklist->tasklist = wnck_tasklist_new(NULL); #endif -#if GTK_CHECK_VERSION (3, 0, 0) #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); g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 64f0b330..29a386e4 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -529,10 +529,8 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) break; } -#if GTK_CHECK_VERSION (3, 0, 0) #if WNCK_CHECK_VERSION (2, 91, 6) pager->pager = wnck_pager_new(); -#endif #else pager->pager = wnck_pager_new(NULL); #endif -- cgit v1.2.1 From 27daac2e3469ec6620309b8bbcf947934874dd9d Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 28 Nov 2013 15:27:13 +0100 Subject: Check if WNCK_CHECK_VERSION is defined --- applets/wncklet/window-list.c | 8 ++++++++ applets/wncklet/workspace-switcher.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index e24d6eb6..561658df 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -121,8 +121,10 @@ static void applet_change_orient(MatePanelApplet* applet, MatePanelAppletOrient tasklist->orientation = new_orient; +#ifdef WNCK_CHECK_VERSION #if WNCK_CHECK_VERSION (3, 4, 6) wnck_tasklist_set_orientation (tasklist->tasklist, new_orient); +#endif #endif tasklist_update(tasklist); } @@ -425,14 +427,20 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) break; } +#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 +#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 29a386e4..e4202076 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -529,8 +529,12 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) break; } +#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 -- cgit v1.2.1