aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-cursors.c21
-rw-r--r--widgets/misc/e-cursors.h21
2 files changed, 22 insertions, 20 deletions
diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c
index 40ec043d21..16de3abbef 100644
--- a/widgets/misc/e-cursors.c
+++ b/widgets/misc/e-cursors.c
@@ -19,17 +19,18 @@ extern GnumericCursorDef gnumeric_cursors [];
void cursors_init (void);
void cursors_shutdown (void);
-#define cursor_set(win,c) \
- do { \
- if (win) \
- gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \
-} while (0)
-
-#define cursor_set_widget(w,c) \
- do { \
- if (GTK_WIDGET (w)->window) \
+#define cursor_set(win,c) \
+G_STMT_START { \
+ if (win) \
+ gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \
+} G_STMT_END
+
+#define cursor_set_widget(w,c) \
+G_STMT_START { \
+ if (GTK_WIDGET (w)->window) \
gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor); \
-} while (0)
+} G_STMT_END
#endif /* GNUMERIC_CURSORS_H */
+
diff --git a/widgets/misc/e-cursors.h b/widgets/misc/e-cursors.h
index 40ec043d21..16de3abbef 100644
--- a/widgets/misc/e-cursors.h
+++ b/widgets/misc/e-cursors.h
@@ -19,17 +19,18 @@ extern GnumericCursorDef gnumeric_cursors [];
void cursors_init (void);
void cursors_shutdown (void);
-#define cursor_set(win,c) \
- do { \
- if (win) \
- gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \
-} while (0)
-
-#define cursor_set_widget(w,c) \
- do { \
- if (GTK_WIDGET (w)->window) \
+#define cursor_set(win,c) \
+G_STMT_START { \
+ if (win) \
+ gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \
+} G_STMT_END
+
+#define cursor_set_widget(w,c) \
+G_STMT_START { \
+ if (GTK_WIDGET (w)->window) \
gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor); \
-} while (0)
+} G_STMT_END
#endif /* GNUMERIC_CURSORS_H */
+