summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-20 13:10:48 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-20 13:10:48 (EST)
commita50771ef2f9acf1df9351625a551237541152e2f (patch)
treed2ab122edcdad94b053ab68d79b3fc52e837dc20
parentcdd50b4b4ed650cb52c0a763a30f35ee56bab140 (diff)
downloadmarquee-a50771ef2f9acf1df9351625a551237541152e2f.zip
marquee-a50771ef2f9acf1df9351625a551237541152e2f.tar.gz
marquee-a50771ef2f9acf1df9351625a551237541152e2f.tar.bz2
MqMainMenu: Shorten NEW_BUTTON() macro names to NEW_BTN()
-rw-r--r--src/toolbars/navigation/main-menu.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c
index 4f7df80..207c2d3 100644
--- a/src/toolbars/navigation/main-menu.c
+++ b/src/toolbars/navigation/main-menu.c
@@ -218,7 +218,7 @@ quit_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqMainMenu *main_menu)
mq_tab_page_quit(main_menu->tab_page);
}
-#define NEW_BUTTON(ID, ICON, TOOLTIP) \
+#define NEW_BTN(ID, ICON, TOOLTIP) \
G_STMT_START { \
ID##_button = gtk_button_new_from_icon_name(ICON, \
GTK_ICON_SIZE_BUTTON); \
@@ -242,24 +242,24 @@ create_edit_buttons(MqMainMenu *main_menu)
gtk_style_context_add_class(gtk_widget_get_style_context(box),
"linked");
- /* ID, ICON, TOOLTIP */
- NEW_BUTTON(cut, "edit-cut", _("Cut"));
+ /* ID, ICON, TOOLTIP */
+ NEW_BTN(cut, "edit-cut", _("Cut"));
gtk_widget_set_sensitive(cut_button, FALSE);
webkit_web_view_can_execute_editing_command(
WEBKIT_WEB_VIEW(main_menu->web_view),
WEBKIT_EDITING_COMMAND_CUT,
NULL, (GAsyncReadyCallback) can_edit_cb, cut_button);
- /* ID, ICON, TOOLTIP */
- NEW_BUTTON(copy, "edit-copy", _("Copy"));
+ /* ID, ICON, TOOLTIP */
+ NEW_BTN(copy, "edit-copy", _("Copy"));
gtk_widget_set_sensitive(copy_button, FALSE);
webkit_web_view_can_execute_editing_command(
WEBKIT_WEB_VIEW(main_menu->web_view),
WEBKIT_EDITING_COMMAND_COPY,
NULL, (GAsyncReadyCallback) can_edit_cb, copy_button);
- /* ID, ICON, TOOLTIP */
- NEW_BUTTON(paste, "edit-paste", _("Paste"));
+ /* ID, ICON, TOOLTIP */
+ NEW_BTN(paste, "edit-paste", _("Paste"));
gtk_widget_set_sensitive(paste_button, FALSE);
webkit_web_view_can_execute_editing_command(
WEBKIT_WEB_VIEW(main_menu->web_view),
@@ -282,15 +282,15 @@ create_zoom_buttons(MqMainMenu *main_menu)
gtk_style_context_add_class(gtk_widget_get_style_context(box),
"linked");
- /* ID, ICON, TOOLTIP */
- NEW_BUTTON(zoom_out, "zoom-out", _("Zoom out"));
- NEW_BUTTON(zoom_reset, "zoom-original", _("Reset zoom"));
- NEW_BUTTON(zoom_in, "zoom-in", _("Zoom in"));
+ /* ID, ICON, TOOLTIP */
+ NEW_BTN(zoom_out, "zoom-out", _("Zoom out"));
+ NEW_BTN(zoom_reset, "zoom-original", _("Reset zoom"));
+ NEW_BTN(zoom_in, "zoom-in", _("Zoom in"));
return box;
}
-#undef NEW_BUTTON
+#undef NEW_BTN
#define BUTTON_ROWS 3
#define BUTTON_COLS 3
@@ -360,7 +360,7 @@ create_main_grid(MqMainMenu *main_menu)
#undef BTN
#undef NEW_BTN
-#define NEW_BUTTON(ID, ICON, LABEL, TOOLTIP) \
+#define NEW_BTN(ID, ICON, LABEL, TOOLTIP) \
G_STMT_START { \
ID##_button = gtk_button_new_from_icon_name(ICON, \
GTK_ICON_SIZE_BUTTON); \
@@ -391,8 +391,8 @@ create_profile_buttons(MqMainMenu *main_menu)
cur_prof_name = mq_profiles_get_name(profiles, cur_prof);
cur_prof_color = mq_profiles_get_color(profiles, cur_prof);
- /* ID, ICON, LABEL, TOOLTIP */
- NEW_BUTTON(profile, NULL, cur_prof_name, _("Manage profiles"));
+ /* ID, ICON, LABEL, TOOLTIP */
+ NEW_BTN(profile, NULL, cur_prof_name, _("Manage profiles"));
gtk_button_set_image(GTK_BUTTON(profile_button),
gtk_image_new_from_pixbuf(
mq_profile_icon_new_pixbuf(cur_prof_color)));
@@ -401,8 +401,8 @@ create_profile_buttons(MqMainMenu *main_menu)
g_free(cur_prof_name);
g_free(cur_prof_color);
- /* ID, ICON, LABEL, TOOLTIP */
- NEW_BUTTON(preferences, "preferences-desktop", NULL, _("Preferences"));
+ /* ID, ICON, LABEL, TOOLTIP */
+ NEW_BTN(preferences, "preferences-desktop", NULL, _("Preferences"));
/* Set up the grid. */
grid = gtk_grid_new();
@@ -422,9 +422,9 @@ create_application_buttons(MqMainMenu *main_menu)
GtkWidget *quit_button;
GtkWidget *grid;
- /* ID, ICON, LABEL, TOOLTIP */
- NEW_BUTTON(about, "help-about", _("About Marquee"), _("About Marquee"));
- NEW_BUTTON(quit, "application-exit", NULL, _("Quit"));
+ /* ID, ICON, LABEL, TOOLTIP */
+ NEW_BTN(about, "help-about", _("About Marquee"), _("About Marquee"));
+ NEW_BTN(quit, "application-exit", NULL, _("Quit"));
/* Set up the grid. */
grid = gtk_grid_new();
@@ -437,7 +437,7 @@ create_application_buttons(MqMainMenu *main_menu)
return grid;
}
-#undef NEW_BUTTON
+#undef NEW_BTN
static void
menu_clicked_cb(MqMainMenu *main_menu)