[gthumb] added automatic completion to the category entry
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] added automatic completion to the category entry
- Date: Thu, 2 Aug 2012 12:34:24 +0000 (UTC)
commit 0f91f7e666138f557b6271b93e46c2bf526a23a8
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed May 9 18:44:36 2012 +0200
added automatic completion to the category entry
[new feature]
gthumb/gth-test-category.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-test-category.c b/gthumb/gth-test-category.c
index 6941d37..8c50904 100644
--- a/gthumb/gth-test-category.c
+++ b/gthumb/gth-test-category.c
@@ -184,9 +184,10 @@ monitor_tags_changed_cb (GthMonitor *monitor,
static GtkWidget *
gth_test_category_real_create_control (GthTest *base)
{
- GthTestCategory *test;
- GtkWidget *control;
- int i, op_idx;
+ GthTestCategory *test;
+ GtkWidget *control;
+ int i, op_idx;
+ GtkEntryCompletion *completion;
test = (GthTestCategory *) base;
@@ -229,6 +230,15 @@ gth_test_category_real_create_control (GthTest *base)
gtk_entry_set_text (GTK_ENTRY (test->priv->text_entry), test->priv->category);
gtk_widget_show (test->priv->combo_entry);
+ completion = gtk_entry_completion_new ();
+ gtk_entry_completion_set_popup_completion (completion, TRUE);
+ gtk_entry_completion_set_popup_single_match (completion, FALSE);
+ gtk_entry_completion_set_inline_completion (completion, TRUE);
+ gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (test->priv->tag_store));
+ gtk_entry_completion_set_text_column (completion, 0);
+ gtk_entry_set_completion (GTK_ENTRY (test->priv->text_entry), completion);
+ g_object_unref (completion);
+
g_signal_connect (G_OBJECT (test->priv->text_entry),
"activate",
G_CALLBACK (text_entry_activate_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]