2007-07-24 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-view-private.h:
* shell/ev-view.c: (ev_view_handle_cursor_over_xy),
(ev_view_leave_notify_event), (ev_view_finalize),
(ev_view_get_property), (ev_view_class_init):
Use IBEAM cursor for text form fields and NORMAL cursor for read
only fields. Remove unused status attribute.
svn path=/trunk/; revision=2577
+2007-07-24 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * shell/ev-view-private.h:
+ * shell/ev-view.c: (ev_view_handle_cursor_over_xy),
+ (ev_view_leave_notify_event), (ev_view_finalize),
+ (ev_view_get_property), (ev_view_class_init):
+
+ Use IBEAM cursor for text form fields and NORMAL cursor for read
+ only fields. Remove unused status attribute.
+
2007-07-20 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_form_field_button_create_widget):
2007-07-20 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_form_field_button_create_widget):
char *find_status;
int find_result;
gboolean jump_to_find_result;
char *find_status;
int find_result;
gboolean jump_to_find_result;
PROP_FIND_STATUS,
PROP_CONTINUOUS,
PROP_DUAL_PAGE,
PROP_FIND_STATUS,
PROP_CONTINUOUS,
PROP_DUAL_PAGE,
-/*** Status messages ***/
-static void ev_view_set_status (EvView *view,
- const char *message);
static void update_find_status_message (EvView *view,
gboolean this_page);
static void ev_view_set_find_status (EvView *view,
const char *message);
static void update_find_status_message (EvView *view,
gboolean this_page);
static void ev_view_set_find_status (EvView *view,
const char *message);
static void jump_to_find_result (EvView *view);
static void jump_to_find_page (EvView *view,
EvViewFindDirection direction,
static void jump_to_find_result (EvView *view);
static void jump_to_find_page (EvView *view,
EvViewFindDirection direction,
static void
ev_view_handle_cursor_over_xy (EvView *view, gint x, gint y)
{
static void
ev_view_handle_cursor_over_xy (EvView *view, gint x, gint y)
{
+ EvLink *link;
+ EvFormField *field;
+ if (view->cursor == EV_VIEW_CURSOR_HIDDEN)
+ return;
+
link = ev_view_get_link_at_location (view, x, y);
if (view->link_tooltip == NULL) {
link = ev_view_get_link_at_location (view, x, y);
if (view->link_tooltip == NULL) {
ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
} else if (location_in_text (view, x + view->scroll_x, y + view->scroll_y)) {
ev_view_set_cursor (view, EV_VIEW_CURSOR_IBEAM);
ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
} else if (location_in_text (view, x + view->scroll_x, y + view->scroll_y)) {
ev_view_set_cursor (view, EV_VIEW_CURSOR_IBEAM);
- } else if (ev_view_get_form_field_at_location (view, x, y)) {
- ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
+ } else if ((field = ev_view_get_form_field_at_location (view, x, y))) {
+ if (field->is_read_only) {
+ if (view->cursor == EV_VIEW_CURSOR_LINK ||
+ view->cursor == EV_VIEW_CURSOR_IBEAM)
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
+ } else if (EV_IS_FORM_FIELD_TEXT (field)) {
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_IBEAM);
+ } else {
+ ev_view_set_cursor (view, EV_VIEW_CURSOR_LINK);
+ }
- ev_view_set_status (view, NULL);
if (view->cursor == EV_VIEW_CURSOR_LINK ||
view->cursor == EV_VIEW_CURSOR_IBEAM)
ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
if (view->cursor == EV_VIEW_CURSOR_LINK ||
view->cursor == EV_VIEW_CURSOR_IBEAM)
ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
{
EvView *view = EV_VIEW (widget);
{
EvView *view = EV_VIEW (widget);
- ev_view_set_status (view, NULL);
-
if (view->cursor == EV_VIEW_CURSOR_LINK ||
view->cursor == EV_VIEW_CURSOR_IBEAM)
ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
if (view->cursor == EV_VIEW_CURSOR_LINK ||
view->cursor == EV_VIEW_CURSOR_IBEAM)
ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
{
EvView *view = EV_VIEW (object);
{
EvView *view = EV_VIEW (object);
g_free (view->find_status);
clear_selection (view);
g_free (view->find_status);
clear_selection (view);
EvView *view = EV_VIEW (object);
switch (prop_id) {
EvView *view = EV_VIEW (object);
switch (prop_id) {
- case PROP_STATUS:
- g_value_set_string (value, view->status);
- break;
- g_value_set_string (value, view->status);
+ g_value_set_string (value, view->find_status);
break;
case PROP_CONTINUOUS:
g_value_set_boolean (value, view->continuous);
break;
case PROP_CONTINUOUS:
g_value_set_boolean (value, view->continuous);
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
- g_object_class_install_property (object_class,
- PROP_STATUS,
- g_param_spec_string ("status",
- "Status Message",
- "The status message",
- NULL,
- G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_FIND_STATUS,
g_object_class_install_property (object_class,
PROP_FIND_STATUS,
ev_view_zoom_for_size_single_page (view, width, height, vsb_width, hsb_height);
}
ev_view_zoom_for_size_single_page (view, width, height, vsb_width, hsb_height);
}
-/*** Status text messages ***/
-
-const char *
-ev_view_get_status (EvView *view)
-{
- g_return_val_if_fail (EV_IS_VIEW (view), NULL);
-
- return view->status;
-}
-
-static void
-ev_view_set_status (EvView *view, const char *message)
-{
- g_return_if_fail (EV_IS_VIEW (view));
-
- if (message != view->status) {
- g_free (view->status);
- view->status = g_strdup (message);
- g_object_notify (G_OBJECT (view), "status");
- }
-}
-
static void
update_find_status_message (EvView *view, gboolean this_page)
{
static void
update_find_status_message (EvView *view, gboolean this_page)
{
g_object_notify (G_OBJECT (view), "find-status");
}
g_object_notify (G_OBJECT (view), "find-status");
}
static void
jump_to_find_result (EvView *view)
{
static void
jump_to_find_result (EvView *view)
{