summaryrefslogtreecommitdiffstats
path: root/src/tab-chrome.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-07 15:41:01 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-07 15:41:01 (EDT)
commitffa635fee01ea832b956700c3d7ab62a80b8b6f8 (patch)
treef09140e7555c6683acb55f1048ee30aeb46332a5 /src/tab-chrome.c
parent961ae14eda6918cc10f12c1e82b2109b5de377b8 (diff)
downloadmarquee-ffa635fee01ea832b956700c3d7ab62a80b8b6f8.zip
marquee-ffa635fee01ea832b956700c3d7ab62a80b8b6f8.tar.gz
marquee-ffa635fee01ea832b956700c3d7ab62a80b8b6f8.tar.bz2
s/__attribute__((unused))/G_GNUC_UNUSED/
And rewrap lines. G_GNUC_UNUSED expands to nothing on compilers other than GCC 2.4+.
Diffstat (limited to 'src/tab-chrome.c')
-rw-r--r--src/tab-chrome.c62
1 files changed, 27 insertions, 35 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 5eb913f..9dd376a 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -29,15 +29,13 @@
#include "tab.h"
static void
-back_clicked_cb(GtkButton __attribute__((unused)) *toolbutton,
- MqTabChrome *chrome)
+back_clicked_cb(GtkButton G_GNUC_UNUSED *toolbutton, MqTabChrome *chrome)
{
webkit_web_view_go_back(chrome->web_view);
}
static void
-forward_clicked_cb(GtkButton __attribute__((unused)) *toolbutton,
- MqTabChrome *chrome)
+forward_clicked_cb(GtkButton G_GNUC_UNUSED *toolbutton, MqTabChrome *chrome)
{
webkit_web_view_go_forward(chrome->web_view);
}
@@ -92,7 +90,7 @@ back_forward_list_item_new(WebKitBackForwardListItem *list_item,
}
static void
-back_forward_list_box_row_activated_cb(GtkListBox __attribute__((unused)) *box,
+back_forward_list_box_row_activated_cb(GtkListBox G_GNUC_UNUSED *box,
GtkListBoxRow *row, MqTabChrome *chrome)
{
webkit_web_view_go_to_back_forward_list_item(chrome->web_view,
@@ -286,7 +284,7 @@ back_forward_box_button_press_cb(GtkWidget *widget, GdkEvent *event,
}
static void
-stop_reload_clicked_cb(GtkToolButton __attribute__((unused)) *toolbutton,
+stop_reload_clicked_cb(GtkToolButton G_GNUC_UNUSED *toolbutton,
MqTabChrome *chrome)
{
if (webkit_web_view_is_loading(chrome->web_view)) {
@@ -314,32 +312,28 @@ uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome)
}
static void
-zoom_out_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome *chrome)
+zoom_out_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
webkit_web_view_set_zoom_level(chrome->web_view,
webkit_web_view_get_zoom_level(chrome->web_view) - 0.1);
}
static void
-zoom_reset_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome *chrome)
+zoom_reset_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
webkit_web_view_set_zoom_level(chrome->web_view,
mq_config_get_double(chrome->config, "zoom.default"));
}
static void
-zoom_in_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome *chrome)
+zoom_in_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
webkit_web_view_set_zoom_level(chrome->web_view,
webkit_web_view_get_zoom_level(chrome->web_view) + 0.1);
}
static void
-developer_tools_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome *chrome)
+developer_tools_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
webkit_web_inspector_show(webkit_web_view_get_inspector(
chrome->web_view));
@@ -347,8 +341,7 @@ developer_tools_clicked_cb(GtkButton __attribute__((unused)) *button,
}
static void
-preferences_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome *chrome)
+preferences_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
mq_tab_new("about:preferences", chrome->tab);
gtk_widget_hide(chrome->menu_popover);
@@ -357,7 +350,7 @@ preferences_clicked_cb(GtkButton __attribute__((unused)) *button,
}
static void
-about_clicked_cb(GtkButton __attribute__((unused)) *button, MqTabChrome *chrome)
+about_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome)
{
mq_tab_new("about:", chrome->tab);
gtk_widget_hide(chrome->menu_popover);
@@ -366,8 +359,8 @@ about_clicked_cb(GtkButton __attribute__((unused)) *button, MqTabChrome *chrome)
}
static void
-quit_clicked_cb(GtkButton __attribute__((unused)) *button,
- MqTabChrome __attribute__((unused)) *chrome)
+quit_clicked_cb(GtkButton G_GNUC_UNUSED *button,
+ MqTabChrome G_GNUC_UNUSED *chrome)
{
/* TODO: Make a function mq_application_quit() that shows a confirmation
* dialog. */
@@ -391,7 +384,7 @@ quit_clicked_cb(GtkButton __attribute__((unused)) *button,
static void
menu_button_clicked_cb(GtkToolButton *tool_button,
- MqTabChrome __attribute__((unused)) *chrome)
+ MqTabChrome G_GNUC_UNUSED *chrome)
{
GtkWidget *grid;
GtkWidget *buttons[BUTTON_ROWS * BUTTON_COLS];
@@ -600,10 +593,10 @@ load_changed_cb(WebKitWebView *web_view, WebKitLoadEvent load_event,
}
static gboolean
-load_failed_cb(WebKitWebView __attribute__((unused)) *web_view,
- WebKitLoadEvent __attribute__((unused)) load_event,
- gchar __attribute__((unused)) *failing_uri,
- GError __attribute__((unused)) *error, MqTabChrome *chrome)
+load_failed_cb(WebKitWebView G_GNUC_UNUSED *web_view,
+ WebKitLoadEvent G_GNUC_UNUSED load_event,
+ gchar G_GNUC_UNUSED *failing_uri, GError G_GNUC_UNUSED *error,
+ MqTabChrome *chrome)
{
chrome->load_failed = TRUE;
return FALSE;
@@ -612,9 +605,8 @@ load_failed_cb(WebKitWebView __attribute__((unused)) *web_view,
/* TODO: <Esc> key in URI bar should reset to URI of current hovered link, if
* any, even if different from chrome->hovered_link_uri. */
static void
-mouse_target_changed_cb(WebKitWebView __attribute__((unused)) *web_view,
- WebKitHitTestResult *hit_test_result,
- guint __attribute__((unused)) modifiers,
+mouse_target_changed_cb(WebKitWebView G_GNUC_UNUSED *web_view,
+ WebKitHitTestResult *hit_test_result, guint G_GNUC_UNUSED modifiers,
MqTabChrome *chrome)
{
gchar *uri;
@@ -672,8 +664,8 @@ mouse_target_changed_cb(WebKitWebView __attribute__((unused)) *web_view,
}
static void
-load_progress_cb(WebKitWebView *web_view,
- GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
+load_progress_cb(WebKitWebView *web_view, GParamSpec G_GNUC_UNUSED *paramspec,
+ MqTabChrome *chrome)
{
/*
* If loading fails, the WebKitWebView's "estimated-load-progress" is
@@ -691,7 +683,7 @@ load_progress_cb(WebKitWebView *web_view,
}
static void
-uri_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
+uri_cb(WebKitWebView *web_view, GParamSpec G_GNUC_UNUSED *paramspec,
MqTabChrome *chrome)
{
gchar *uri;
@@ -703,8 +695,8 @@ uri_cb(WebKitWebView *web_view, GParamSpec __attribute__((unused)) *paramspec,
}
static void
-loading_cb(WebKitWebView *web_view,
- GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
+loading_cb(WebKitWebView *web_view, GParamSpec G_GNUC_UNUSED *paramspec,
+ MqTabChrome *chrome)
{
if (webkit_web_view_is_loading(web_view)) {
gtk_tool_button_set_icon_widget(
@@ -730,9 +722,9 @@ loading_cb(WebKitWebView *web_view,
static void
back_forward_list_changed_cb(
- WebKitBackForwardList __attribute__((unused)) *back_forward_list,
- WebKitBackForwardListItem __attribute__((unused)) *item_added,
- gpointer __attribute__((unused)) items_removed, MqTabChrome *chrome)
+ WebKitBackForwardList G_GNUC_UNUSED *back_forward_list,
+ WebKitBackForwardListItem G_GNUC_UNUSED *item_added,
+ gpointer G_GNUC_UNUSED items_removed, MqTabChrome *chrome)
{
gtk_widget_set_sensitive(GTK_WIDGET(chrome->back_button),
webkit_web_view_can_go_back(chrome->web_view));