aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-08-06 02:26:55 +0800
committerChris Toshok <toshok@src.gnome.org>2004-08-06 02:26:55 +0800
commit04de0045116774d86de4eb3b93c731b43a133b77 (patch)
treefc256e991256b620eaef0c350f516281de1c4615
parent796231864882de932677fb1adb5296143d9a3f38 (diff)
downloadgsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar.gz
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar.bz2
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar.lz
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar.xz
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.tar.zst
gsoc2013-evolution-04de0045116774d86de4eb3b93c731b43a133b77.zip
nuke, unnecessary. (e_entry_start_completion): set item_chosen to FALSE.
2004-08-04 Chris Toshok <toshok@ximian.com> * gal/e-text/e-entry.c (e_entry_refresh_popup): nuke, unnecessary. (e_entry_start_completion): set item_chosen to FALSE. (added_cb): nuke, unnecessary. (full_cb): only show the popup if the user hasn't chosen an entry. (activate_cb): set item_chosen to TRUE. svn path=/trunk/; revision=26832
-rw-r--r--widgets/text/e-entry.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c
index 132de14ee6..fca872d55c 100644
--- a/widgets/text/e-entry.c
+++ b/widgets/text/e-entry.c
@@ -122,6 +122,7 @@ struct _EEntryPrivate {
guint draw_borders : 1;
guint emulate_label_resize : 1;
guint have_set_transient : 1;
+ guint item_chosen : 1;
gint last_width;
};
@@ -561,13 +562,6 @@ e_entry_show_popup (EEntry *entry, gboolean visible)
}
static void
-e_entry_refresh_popup (EEntry *entry)
-{
- if (entry->priv->popup_is_visible)
- e_entry_show_popup (entry, TRUE);
-}
-
-static void
e_entry_start_completion (EEntry *entry)
{
if (entry->priv->completion == NULL)
@@ -576,6 +570,8 @@ e_entry_start_completion (EEntry *entry)
if (e_entry_is_empty (entry))
return;
+ entry->priv->item_chosen = FALSE;
+
e_completion_begin_search (entry->priv->completion,
e_entry_get_text (entry),
entry->priv->last_completion_pos = e_entry_get_position (entry),
@@ -622,19 +618,12 @@ nonempty_cb (ECompletionView *view, gpointer user_data)
}
static void
-added_cb (ECompletionView *view, gpointer user_data)
-{
- EEntry *entry = E_ENTRY (user_data);
- e_entry_refresh_popup (entry);
-}
-
-static void
full_cb (ECompletionView *view, gpointer user_data)
{
EEntry *entry = E_ENTRY (user_data);
gboolean show;
- show = GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (entry->canvas)) && view->choices->len > 0;
+ show = GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (entry->canvas)) && view->choices->len > 0 && !entry->priv->item_chosen;
e_entry_show_popup (entry, show);
}
@@ -691,6 +680,8 @@ activate_cb (ECompletionView *view, ECompletionMatch *match, gpointer user_data)
else
e_entry_set_text (entry, match->match_text);
+ entry->priv->item_chosen = TRUE;
+
e_entry_cancel_delayed_completion (entry);
}
@@ -803,11 +794,6 @@ e_entry_enable_completion_full (EEntry *entry, ECompletion *completion, gint del
G_CALLBACK (nonempty_cb),
entry);
- entry->priv->added_signal_id = g_signal_connect (entry->priv->completion_view,
- "added",
- G_CALLBACK (added_cb),
- entry);
-
entry->priv->full_signal_id = g_signal_connect (entry->priv->completion_view,
"full",
G_CALLBACK (full_cb),