diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-25 11:48:57 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-25 11:48:57 (EDT) |
commit | c64472f47e5434caddb247ca9e7500111b82f7dc (patch) | |
tree | 9652f9596668024cb7f48891f01e06fbafdcd809 /src/web-view.c | |
parent | e736b0c8aaa5e415b204c98ae1564b552198dc08 (diff) | |
download | marquee-c64472f47e5434caddb247ca9e7500111b82f7dc.zip marquee-c64472f47e5434caddb247ca9e7500111b82f7dc.tar.gz marquee-c64472f47e5434caddb247ca9e7500111b82f7dc.tar.bz2 |
MqTabLabel, MqMainMenu, MqWebView: Use G_STMT_START/G_STMT_END in macros
Diffstat (limited to 'src/web-view.c')
-rw-r--r-- | src/web-view.c | 20 |
1 files changed, 10 insertions, 10 deletions
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, |