[gedit] Bug 620436 - Add gtk_widget_set_visible to gseal-gtk-compat.h
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Bug 620436 - Add gtk_widget_set_visible to gseal-gtk-compat.h
- Date: Thu, 3 Jun 2010 08:51:34 +0000 (UTC)
commit 9d4cfcb5780f59e6a37379952d39c8d0557c3bca
Author: Garrett Regier <alias301 gmail com>
Date: Thu Jun 3 00:53:00 2010 -0700
Bug 620436 - Add gtk_widget_set_visible to gseal-gtk-compat.h
gedit/gseal-gtk-compat.h | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gseal-gtk-compat.h b/gedit/gseal-gtk-compat.h
index cb8460e..d4d1c21 100644
--- a/gedit/gseal-gtk-compat.h
+++ b/gedit/gseal-gtk-compat.h
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
gtk_im_context_reset (view->im_context); \
} \
} G_STMT_END
-#define gdk_drag_context_get_suggested_action(context) ((context)->suggested_action)
+#define gdk_drag_context_get_suggested_action(context) ((context)->suggested_action)
#endif /* GTK < 2.22.0 */
#if !GTK_CHECK_VERSION (2, 20, 0)
@@ -57,6 +57,17 @@ G_BEGIN_DECLS
#define gtk_widget_get_state(widget) ((widget)->state)
#define gtk_widget_get_visible(widget) (GTK_WIDGET_VISIBLE (widget))
#define gtk_widget_set_window(widget, _window) ((widget)->window = _window)
+#define gtk_widget_set_visible(widget, visible) \
+ G_STMT_START { \
+ if (visible) \
+ { \
+ gtk_widget_show (widget); \
+ } \
+ else \
+ { \
+ gtk_widget_hide (widget); \
+ } \
+ } G_STMT_END
#endif /* GTK+ < 2.18.0 */
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]