[Xfce4-commits] [apps/xfce4-taskmanager] 01/01: Made the hide code gtk2/3 compatible
noreply at xfce.org
noreply at xfce.org
Fri Dec 19 12:29:09 CET 2014
This is an automated email from the git hooks/post-receive script.
peter pushed a commit to branch master
in repository apps/xfce4-taskmanager.
commit 867e10b1d09b8dbc9e9d771acbea1b20bc9388ac
Author: Peter de Ridder <peter at xfce.org>
Date: Fri Dec 19 12:00:25 2014 +0100
Made the hide code gtk2/3 compatible
---
src/main.c | 6 +-----
src/process-window.c | 8 ++------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/main.c b/src/main.c
index 48dfa76..1244bd6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,11 +31,7 @@ static gboolean timeout = 0;
static void
status_icon_activated (void)
{
-#ifdef HAVE_GTK3
- if (!(gtk_widget_is_visible (window)))
-#else
- if (!(GTK_WIDGET_VISIBLE (window)))
-#endif
+ if (!(gtk_widget_get_visible (window)))
gtk_widget_show (window);
else
gtk_widget_hide (window);
diff --git a/src/process-window.c b/src/process-window.c
index 91cb71e..8032cdc 100644
--- a/src/process-window.c
+++ b/src/process-window.c
@@ -379,9 +379,7 @@ xtm_process_window_show (GtkWidget *widget)
g_return_if_fail (GTK_IS_WIDGET (XTM_PROCESS_WINDOW (widget)->window));
gtk_widget_show (XTM_PROCESS_WINDOW (widget)->window);
gtk_window_present (GTK_WINDOW (XTM_PROCESS_WINDOW (widget)->window));
-#ifndef HAVE_GTK3
- GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
-#endif
+ GTK_WIDGET_CLASS (xtm_process_window_parent_class)->show(widget);
}
static void
@@ -394,9 +392,7 @@ xtm_process_window_hide (GtkWidget *widget)
gtk_window_get_position (GTK_WINDOW (XTM_PROCESS_WINDOW (widget)->window), &winx, &winy);
gtk_widget_hide (XTM_PROCESS_WINDOW (widget)->window);
gtk_window_move (GTK_WINDOW (XTM_PROCESS_WINDOW (widget)->window), winx, winy);
-#ifndef HAVE_GTK3
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
-#endif
+ GTK_WIDGET_CLASS (xtm_process_window_parent_class)->hide(widget);
}
GtkTreeModel *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list