[Shotwell] Rightward pointing mouse cursor
Paul Novak
pnovak at alumni.caltech.edu
Thu Jan 28 22:47:12 PST 2010
Hello,
Occasionally, the mouse pointer points towards the right. This happens
when I edit a photo by double-clicking on a photo, pressing the "Crop"
button at the bottom of the screen, entering the cropped area and then
upon leaving the cropped area the mouse points rightward. This can be
fixed with the changes listed in the diff below so the mouse pointer is
consistent and always points in one direction.
The change is replacing every instance of GDK_ARROW with GDK_LEFT_PTR.
The standard cursors are at
http://library.gnome.org/devel/gdk/stable/gdk-Cursors.html, and I think
GDK_LEFT_PTR is the appropriate cursor.
Paul
Index: src/AppWindow.vala
===================================================================
--- src/AppWindow.vala (revision 1141)
+++ src/AppWindow.vala (working copy)
@@ -319,7 +319,7 @@
}
public void set_normal_cursor() {
- window.set_cursor(new Gdk.Cursor(Gdk.CursorType.ARROW));
+ window.set_cursor(new Gdk.Cursor(Gdk.CursorType.LEFT_PTR));
spin_event_loop();
}
}
Index: src/FacebookConnector.vala
===================================================================
--- src/FacebookConnector.vala (revision 1141)
+++ src/FacebookConnector.vala (working copy)
@@ -345,7 +345,7 @@
}
private void on_page_load(WebKit.WebFrame origin_frame) {
- webview.window.set_cursor(new Gdk.Cursor(Gdk.CursorType.ARROW));
+ webview.window.set_cursor(new Gdk.Cursor(Gdk.CursorType.LEFT_PTR));
string loaded_url = origin_frame.get_uri().dup();
Index: src/FlickrConnector.vala
===================================================================
--- src/FlickrConnector.vala (revision 1141)
+++ src/FlickrConnector.vala (working copy)
@@ -673,7 +673,7 @@
}
private void on_page_load(WebKit.WebFrame origin_frame) {
- white_pane.window.set_cursor(new Gdk.Cursor(Gdk.CursorType.ARROW));
+ white_pane.window.set_cursor(new
Gdk.Cursor(Gdk.CursorType.LEFT_PTR));
string token;
string username;
bool got_auth_info = false;
Index: src/EditingTools.vala
===================================================================
--- src/EditingTools.vala (revision 1141)
+++ src/EditingTools.vala (working copy)
@@ -524,7 +524,7 @@
private CropToolWindow crop_tool_window = null;
private Gdk.Pixbuf color_shifted = null;
- private Gdk.CursorType current_cursor_type = Gdk.CursorType.ARROW;
+ private Gdk.CursorType current_cursor_type = Gdk.CursorType.LEFT_PTR;
private BoxLocation in_manipulation = BoxLocation.OUTSIDE;
private Gdk.GC wide_black_gc = null;
private Gdk.GC wide_white_gc = null;
@@ -1024,7 +1024,7 @@
// make sure the cursor isn't set to a modify indicator
if (canvas != null)
- canvas.get_drawing_window().set_cursor(new
Gdk.Cursor(Gdk.CursorType.ARROW));
+ canvas.get_drawing_window().set_cursor(new
Gdk.Cursor(Gdk.CursorType.LEFT_PTR));
base.deactivate();
}
@@ -1168,7 +1168,7 @@
Gdk.Rectangle scaled_pos = canvas.get_scaled_pixbuf_position();
Box offset_scaled_crop = scaled_crop.get_offset(scaled_pos.x,
scaled_pos.y);
- Gdk.CursorType cursor_type = Gdk.CursorType.ARROW;
+ Gdk.CursorType cursor_type = Gdk.CursorType.LEFT_PTR;
switch (offset_scaled_crop.approx_location(x, y)) {
case BoxLocation.LEFT_SIDE:
cursor_type = Gdk.CursorType.LEFT_SIDE;
@@ -1207,7 +1207,7 @@
break;
default:
- // use Gdk.CursorType.ARROW
+ // use Gdk.CursorType.LEFT_PTR
break;
}
@@ -1862,7 +1862,7 @@
bind_window_handlers();
- cached_arrow_cursor = new Gdk.Cursor(Gdk.CursorType.ARROW);
+ cached_arrow_cursor = new Gdk.Cursor(Gdk.CursorType.LEFT_PTR);
cached_grab_cursor = new Gdk.Cursor(Gdk.CursorType.FLEUR);
canvas.get_photo().altered += on_photo_altered;
More information about the Shotwell
mailing list