Commit 6a8395fa authored by Jim Nelson's avatar Jim Nelson

#347: All toolbar buttons now have tooltips.

parent 0451a8bb
......@@ -45,8 +45,11 @@ public class FullscreenWindow : Gtk.Window {
set_screen(screen);
set_border_width(0);
pin_button.set_label("Pin toolbar");
pin_button.set_label("Pin Toolbar");
pin_button.set_tooltip_text("Pin the toolbar open");
// TODO: Don't stock items supply their own tooltips?
close_button.set_tooltip_text("Leave fullscreen");
close_button.clicked += on_close;
Gtk.Toolbar toolbar = photo_page.get_toolbar();
......
......@@ -121,7 +121,8 @@ public class CollectionPage : CheckerboardPage {
//
// rotate tool
rotate_button = new Gtk.ToolButton.from_stock(Resources.STOCK_CLOCKWISE);
rotate_button.label = "Rotate";
rotate_button.set_label(Resources.ROTATE_CLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CLOCKWISE_TOOLTIP);
rotate_button.sensitive = false;
rotate_button.clicked += on_rotate_clockwise;
......@@ -144,6 +145,7 @@ public class CollectionPage : CheckerboardPage {
toolitem.add(slider);
toolitem.set_expand(false);
toolitem.set_size_request(200, -1);
toolitem.set_tooltip_text("Adjust the size of the thumbnails");
toolbar.insert(toolitem, -1);
......@@ -621,6 +623,8 @@ public class CollectionPage : CheckerboardPage {
private override bool on_ctrl_pressed(Gdk.EventKey event) {
rotate_button.set_stock_id(Resources.STOCK_COUNTERCLOCKWISE);
rotate_button.set_label(Resources.ROTATE_COUNTERCLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_COUNTERCLOCKWISE_TOOLTIP);
rotate_button.clicked -= on_rotate_clockwise;
rotate_button.clicked += on_rotate_counterclockwise;
......@@ -629,6 +633,8 @@ public class CollectionPage : CheckerboardPage {
private override bool on_ctrl_released(Gdk.EventKey event) {
rotate_button.set_stock_id(Resources.STOCK_CLOCKWISE);
rotate_button.set_label(Resources.ROTATE_CLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CLOCKWISE_TOOLTIP);
rotate_button.clicked -= on_rotate_counterclockwise;
rotate_button.clicked += on_rotate_clockwise;
......
......@@ -132,10 +132,10 @@ public class ImportPage : CheckerboardPage {
// toolbar
// Camera label
Gtk.ToolItem cameraLabelItem = new Gtk.ToolItem();
cameraLabelItem.add(camera_label);
Gtk.ToolItem camera_label_item = new Gtk.ToolItem();
camera_label_item.add(camera_label);
toolbar.insert(cameraLabelItem, -1);
toolbar.insert(camera_label_item, -1);
// separator to force buttons to right side of toolbar
Gtk.SeparatorToolItem separator = new Gtk.SeparatorToolItem();
......@@ -145,18 +145,20 @@ public class ImportPage : CheckerboardPage {
toolbar.insert(separator, -1);
progress_bar.set_orientation(Gtk.ProgressBarOrientation.LEFT_TO_RIGHT);
Gtk.ToolItem progressItem = new Gtk.ToolItem();
progressItem.add(progress_bar);
Gtk.ToolItem progress_item = new Gtk.ToolItem();
progress_item.add(progress_bar);
toolbar.insert(progressItem, -1);
toolbar.insert(progress_item, -1);
import_selected_button = new Gtk.ToolButton(new Gtk.Label("Import Selected"), "");
import_selected_button.set_tooltip_text("Import the selected photos into your library");
import_selected_button.clicked += on_import_selected;
import_selected_button.sensitive = false;
toolbar.insert(import_selected_button, -1);
import_all_button = new Gtk.ToolButton(new Gtk.Label("Import All"), "");
import_all_button.set_tooltip_text("Import all the photos on this camera into your library");
import_all_button.clicked += on_import_all;
import_all_button.sensitive = false;
......
......@@ -17,6 +17,9 @@ public class CropToolWindow : Gtk.Window {
type_hint = Gdk.WindowTypeHint.TOOLBAR;
set_transient_for(owner);
apply_button.set_tooltip_text("Set the crop for this photo");
cancel_button.set_tooltip_text("Return to current photo dimensions");
apply_button.set_image_position(Gtk.PositionType.LEFT);
cancel_button.set_image_position(Gtk.PositionType.LEFT);
......@@ -142,13 +145,15 @@ public class PhotoPage : Page {
//
// rotate tool
rotate_button = new Gtk.ToolButton.from_stock(Resources.STOCK_CLOCKWISE);
rotate_button.set_label("Rotate");
rotate_button.set_label(Resources.ROTATE_CLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CLOCKWISE_TOOLTIP);
rotate_button.clicked += on_rotate_clockwise;
toolbar.insert(rotate_button, -1);
// crop tool
crop_button = new Gtk.ToggleToolButton();
crop_button.set_label("Crop");
crop_button.set_tooltip_text("Crop the photo's size");
crop_button.toggled += on_crop_toggled;
toolbar.insert(crop_button, -1);
......@@ -160,10 +165,12 @@ public class PhotoPage : Page {
toolbar.insert(separator, -1);
// previous button
prev_button.set_tooltip_text("Previous photo");
prev_button.clicked += on_previous_photo;
toolbar.insert(prev_button, -1);
// next button
next_button.set_tooltip_text("Next photo");
next_button.clicked += on_next_photo;
toolbar.insert(next_button, -1);
......@@ -851,6 +858,8 @@ public class PhotoPage : Page {
private override bool on_ctrl_pressed(Gdk.EventKey event) {
rotate_button.set_stock_id(Resources.STOCK_COUNTERCLOCKWISE);
rotate_button.set_label(Resources.ROTATE_COUNTERCLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_COUNTERCLOCKWISE_TOOLTIP);
rotate_button.clicked -= on_rotate_clockwise;
rotate_button.clicked += on_rotate_counterclockwise;
......@@ -859,6 +868,8 @@ public class PhotoPage : Page {
private override bool on_ctrl_released(Gdk.EventKey event) {
rotate_button.set_stock_id(Resources.STOCK_CLOCKWISE);
rotate_button.set_label(Resources.ROTATE_CLOCKWISE_LABEL);
rotate_button.set_tooltip_text(Resources.ROTATE_CLOCKWISE_TOOLTIP);
rotate_button.clicked -= on_rotate_counterclockwise;
rotate_button.clicked += on_rotate_clockwise;
......
......@@ -6,6 +6,12 @@ namespace Resources {
public const string STOCK_CLOCKWISE = "shotwell-rotate-clockwise";
public const string STOCK_COUNTERCLOCKWISE = "shotwell-rotate-counterclockwise";
public static const string ROTATE_CLOCKWISE_LABEL = "Rotate";
public static const string ROTATE_CLOCKWISE_TOOLTIP = "Rotate the photo(s) clockwise";
public static const string ROTATE_COUNTERCLOCKWISE_LABEL = "Rotate";
public static const string ROTATE_COUNTERCLOCKWISE_TOOLTIP = "Rotate the photo(s) counterclockwise";
private Gtk.IconFactory factory = null;
public void init () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment