summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-19 17:50:45 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-19 17:50:45 (EST)
commitedfe813cff04b2d115f317b1da9ab89d45b488fe (patch)
tree1879dba12e0f1737cb46f1e0bd6c27d615d65a1b
parent34996d2b0cd9caea8581e7f745c7ad0171bf6be3 (diff)
downloadmarquee-edfe813cff04b2d115f317b1da9ab89d45b488fe.zip
marquee-edfe813cff04b2d115f317b1da9ab89d45b488fe.tar.gz
marquee-edfe813cff04b2d115f317b1da9ab89d45b488fe.tar.bz2
MqMainMenu: Separate labels and tooltips of main grid buttons
-rw-r--r--src/toolbars/navigation/main-menu.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c
index 89df924..f4290b7 100644
--- a/src/toolbars/navigation/main-menu.c
+++ b/src/toolbars/navigation/main-menu.c
@@ -294,12 +294,12 @@ create_zoom_buttons(MqMainMenu *main_menu)
#define BUTTON_ROWS 3
#define BUTTON_COLS 3
#define BTN(Y, X) buttons[Y * BUTTON_COLS + X]
-#define NEW_BTN(Y, X, ID, ICON, TOOLTIP) \
+#define NEW_BTN(Y, X, ID, ICON, LABEL, TOOLTIP) \
G_STMT_START { \
BTN(Y, X) = gtk_button_new_from_icon_name(ICON, \
GTK_ICON_SIZE_BUTTON); \
gtk_button_set_relief(GTK_BUTTON(BTN(Y, X)), GTK_RELIEF_NONE); \
- gtk_button_set_label(GTK_BUTTON(BTN(Y, X)), TOOLTIP); \
+ gtk_button_set_label(GTK_BUTTON(BTN(Y, X)), LABEL); \
gtk_button_set_image_position(GTK_BUTTON(BTN(Y, X)), \
GTK_POS_TOP); \
gtk_button_set_always_show_image(GTK_BUTTON(BTN(Y, X)), TRUE); \
@@ -320,20 +320,32 @@ create_main_grid(MqMainMenu *main_menu)
gtk_grid_set_row_homogeneous(GTK_GRID(grid), TRUE);
gtk_grid_set_column_homogeneous(GTK_GRID(grid), TRUE);
- /* Y, X, ID, ICON, TOOLTIP */
- NEW_BTN(0, 0, new_window, "window-new", "New window");
- NEW_BTN(0, 1, find, "edit-find", "Find");
- NEW_BTN(0, 2, fullscreen, "view-fullscreen", "Full screen");
-
- /* Y, X, ID, ICON, TOOLTIP */
- NEW_BTN(1, 0, open, "document-open", "Open file");
- NEW_BTN(1, 1, save, "document-save-as", "Save page");
- NEW_BTN(1, 2, email_link, "mail-message-new", "E-mail link");
-
- /* Y, X, ID, ICON, TOOLTIP */
- NEW_BTN(2, 0, print_preview, "document-print-preview", "Print preview");
- NEW_BTN(2, 1, print, "document-print", "Print");
- NEW_BTN(2, 2, inspector, "preferences-system", "Inspector");
+ /* Y, X, ID, ICON, LABEL,
+ * TOOLTIP */
+ NEW_BTN(0, 0, new_window, "window-new", "New window",
+ "Open a new window");
+ NEW_BTN(0, 1, find, "edit-find", "Find",
+ "Find text in this page");
+ NEW_BTN(0, 2, fullscreen, "view-fullscreen", "Full screen",
+ "Display the window in full screen");
+
+ /* Y, X, ID, ICON, LABEL,
+ * TOOLTIP */
+ NEW_BTN(1, 0, open, "document-open", "Open file",
+ "Open a local file");
+ NEW_BTN(1, 1, save, "document-save-as", "Save page",
+ "Save this page");
+ NEW_BTN(1, 2, email_link, "mail-message-new", "E-mail link",
+ "E-mail a link to this page");
+
+ /* Y, X, ID, ICON, LABEL,
+ * TOOLTIP */
+ NEW_BTN(2, 0, print_preview, "document-print-preview", "Print preview",
+ "Preview this page");
+ NEW_BTN(2, 1, print, "document-print", "Print",
+ "Print this page");
+ NEW_BTN(2, 2, inspector, "preferences-system", "Inspector",
+ "Open the Web inspector");
gtk_widget_set_sensitive(BTN(1, 2), FALSE); /* E-mail link */
gtk_widget_set_sensitive(BTN(2, 0), FALSE); /* Print preview */