view: use "entry state" term, not "entry background"

This commit is contained in:
Monsta 2015-12-25 12:36:43 +03:00
parent fa1422db50
commit e40f250130
1 changed files with 12 additions and 12 deletions

View File

@ -173,7 +173,7 @@ typedef enum
{ {
PLUMA_SEARCH_ENTRY_NORMAL, PLUMA_SEARCH_ENTRY_NORMAL,
PLUMA_SEARCH_ENTRY_NOT_FOUND PLUMA_SEARCH_ENTRY_NOT_FOUND
} PlumaSearchEntryBgColor; } PlumaSearchEntryState;
static void static void
document_read_only_notify_handler (PlumaDocument *document, document_read_only_notify_handler (PlumaDocument *document,
@ -760,10 +760,10 @@ add_search_completion_entry (const gchar *str)
} }
static void static void
set_entry_background (GtkWidget *entry, set_entry_state (GtkWidget *entry,
PlumaSearchEntryBgColor col) PlumaSearchEntryState state)
{ {
if (col == PLUMA_SEARCH_ENTRY_NOT_FOUND) if (state == PLUMA_SEARCH_ENTRY_NOT_FOUND)
{ {
GdkColor red; GdkColor red;
GdkColor white; GdkColor white;
@ -896,13 +896,13 @@ run_search (PlumaView *view,
{ {
pluma_view_scroll_to_cursor (view); pluma_view_scroll_to_cursor (view);
set_entry_background (view->priv->search_entry, set_entry_state (view->priv->search_entry,
PLUMA_SEARCH_ENTRY_NORMAL); PLUMA_SEARCH_ENTRY_NORMAL);
} }
else else
{ {
set_entry_background (view->priv->search_entry, set_entry_state (view->priv->search_entry,
PLUMA_SEARCH_ENTRY_NOT_FOUND); PLUMA_SEARCH_ENTRY_NOT_FOUND);
} }
return found; return found;
@ -1764,11 +1764,11 @@ search_init (GtkWidget *entry,
pluma_view_scroll_to_cursor (view); pluma_view_scroll_to_cursor (view);
if (!moved || !moved_offset) if (!moved || !moved_offset)
set_entry_background (view->priv->search_entry, set_entry_state (view->priv->search_entry,
PLUMA_SEARCH_ENTRY_NOT_FOUND); PLUMA_SEARCH_ENTRY_NOT_FOUND);
else else
set_entry_background (view->priv->search_entry, set_entry_state (view->priv->search_entry,
PLUMA_SEARCH_ENTRY_NORMAL); PLUMA_SEARCH_ENTRY_NORMAL);
} }
} }
} }