summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-label.c8
-rw-r--r--src/toolbars/navigation/main-menu.c4
-rw-r--r--src/web-view.c20
3 files changed, 16 insertions, 16 deletions
diff --git a/src/tab-label.c b/src/tab-label.c
index 6889585..c837961 100644
--- a/src/tab-label.c
+++ b/src/tab-label.c
@@ -91,7 +91,7 @@ new_window_clicked_cb(GtkWidget G_GNUC_UNUSED *button, MqTabLabel *tab_label)
#define BUTTON_ROWS 2
#define BUTTON_COLS 4
#define NEW_BUTTON(Y, X, ICON, TOOLTIP) \
- do { \
+ G_STMT_START { \
buttons[Y * BUTTON_COLS + X] = gtk_button_new_from_icon_name(\
ICON, GTK_ICON_SIZE_BUTTON); \
gtk_widget_set_tooltip_text(buttons[Y * BUTTON_COLS + X], \
@@ -99,9 +99,9 @@ new_window_clicked_cb(GtkWidget G_GNUC_UNUSED *button, MqTabLabel *tab_label)
gtk_widget_set_can_focus(buttons[Y * BUTTON_COLS + X], FALSE); \
gtk_grid_attach(GTK_GRID(button_grid), \
buttons[Y * BUTTON_COLS + X], X, Y, 1, 1); \
- } while (0)
+ } G_STMT_END
#define NEW_TOGGLE(Y, X, ICON, TOOLTIP) \
- do { \
+ G_STMT_START { \
buttons[Y * BUTTON_COLS + X] = gtk_toggle_button_new(); \
gtk_button_set_image(GTK_BUTTON(buttons[Y * BUTTON_COLS + X]), \
gtk_image_new_from_icon_name(ICON, \
@@ -111,7 +111,7 @@ new_window_clicked_cb(GtkWidget G_GNUC_UNUSED *button, MqTabLabel *tab_label)
gtk_widget_set_can_focus(buttons[Y * BUTTON_COLS + X], FALSE); \
gtk_grid_attach(GTK_GRID(button_grid), \
buttons[Y * BUTTON_COLS + X], X, Y, 1, 1); \
- } while (0)
+ } G_STMT_END
#define CLICKED_CB(Y, X, CB) \
g_signal_connect(buttons[Y * BUTTON_COLS + X], "clicked", CB, tab_label)
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c
index 58b4bf2..8b18076 100644
--- a/src/toolbars/navigation/main-menu.c
+++ b/src/toolbars/navigation/main-menu.c
@@ -130,14 +130,14 @@ quit_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqMainMenu *main_menu)
#define BUTTON_ROWS 6
#define BUTTON_COLS 3
#define NEW_BUTTON(Y, X, ICON, TOOLTIP) \
- do { \
+ G_STMT_START { \
buttons[Y * BUTTON_COLS + X] = gtk_button_new_from_icon_name(\
ICON, GTK_ICON_SIZE_BUTTON); \
gtk_widget_set_tooltip_text(buttons[Y * BUTTON_COLS + X], \
TOOLTIP); \
gtk_grid_attach(GTK_GRID(grid), buttons[Y * BUTTON_COLS + X], \
X, Y, 1, 1); \
- } while (0)
+ } G_STMT_END
#define CLICKED_CB(Y, X, CB) \
g_signal_connect(buttons[Y * BUTTON_COLS + X], "clicked", \
G_CALLBACK(CB), main_menu)
diff --git a/src/web-view.c b/src/web-view.c
index ca7f4fb..2c07216 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -195,7 +195,7 @@ menu_open_audio_win_activate_cb(GtkAction G_GNUC_UNUSED *action,
#define ITEM_DECLS_NO_CUSTOM \
WebKitContextMenuItem *menu_item;
#define NEW_CUSTOM_ITEM(NAME, LABEL) \
- do { \
+ G_STMT_START { \
/* Don't blame me; blame WebKitGTK+ for using GtkAction. */ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
action = gtk_action_new(#NAME, (LABEL), NULL, NULL); \
@@ -204,25 +204,25 @@ menu_open_audio_win_activate_cb(GtkAction G_GNUC_UNUSED *action,
G_CALLBACK(menu_##NAME##_activate_cb), web_view); \
menu_item = webkit_context_menu_item_new(action); \
webkit_context_menu_append(context_menu, menu_item); \
- } while (0)
+ } G_STMT_END
#define NEW_STOCK_ITEM(STOCK) \
- do { \
+ G_STMT_START { \
menu_item = webkit_context_menu_item_new_from_stock_action( \
WEBKIT_CONTEXT_MENU_ACTION_##STOCK); \
webkit_context_menu_append(context_menu, menu_item); \
- } while (0)
+ } G_STMT_END
#define NEW_SEPARATOR_ITEM() \
- do { \
+ G_STMT_START { \
webkit_context_menu_append(context_menu, \
webkit_context_menu_item_new_separator()); \
- } while (0)
+ } G_STMT_END
#define RESTORE_ITEMS(ITEMS) \
- do { \
+ G_STMT_START { \
for (; ITEMS; ITEMS = ITEMS->next) { \
webkit_context_menu_append(context_menu, ITEMS->data); \
g_object_unref(ITEMS->data); \
} \
- } while (0)
+ } G_STMT_END
static void
context_menu_link_cb(WebKitContextMenu *context_menu, MqWebView *web_view)
@@ -313,10 +313,10 @@ context_menu_document_cb(WebKitContextMenu *context_menu, GList *nav_items,
}
#define PRESERVE_ITEM(ITEMS) \
- do { \
+ G_STMT_START { \
g_object_ref(items->data); \
ITEMS = g_list_prepend(ITEMS, items->data); \
- } while (0)
+ } G_STMT_END
static gboolean
context_menu_cb(WebKitWebView *wk_web_view, WebKitContextMenu *context_menu,