aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-location-entry.c25
-rw-r--r--lib/widgets/ephy-location-entry.h3
2 files changed, 25 insertions, 3 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 1a5247927..77f5d7514 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -75,6 +75,7 @@ struct _EphyLocationEntryPrivate
guint action_col;
guint keywords_col;
guint relevance_col;
+ guint extra_col;
guint hash;
@@ -997,17 +998,19 @@ ephy_location_entry_set_completion (EphyLocationEntry *le,
guint text_col,
guint action_col,
guint keywords_col,
- guint relevance_col)
+ guint relevance_col,
+ guint extra_col)
{
EphyLocationEntryPrivate *priv = le->priv;
GtkTreeModel *sort_model;
GtkEntryCompletion *completion;
- GtkCellRenderer *cell;
+ GtkCellRenderer *cell, *extracell;
le->priv->text_col = text_col;
le->priv->action_col = action_col;
le->priv->keywords_col = keywords_col;
le->priv->relevance_col = relevance_col;
+ le->priv->extra_col = extra_col;
sort_model = gtk_tree_model_sort_new_with_model (model);
g_object_unref (model);
@@ -1025,11 +1028,29 @@ ephy_location_entry_set_completion (EphyLocationEntry *le,
G_CALLBACK (action_activated_after_cb), le);
cell = gtk_cell_renderer_text_new ();
+ g_object_set (cell,
+ "ellipsize", PANGO_ELLIPSIZE_END,
+ "ellipsize-set", TRUE,
+ NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (completion),
cell, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (completion),
cell, "text", text_col);
+ extracell = gtk_cell_renderer_text_new ();
+ g_object_set (extracell,
+ "ellipsize", PANGO_ELLIPSIZE_END,
+ "ellipsize-set", TRUE,
+ "foreground", "Gray",
+ "foreground-set", TRUE,
+ "alignment", PANGO_ALIGN_RIGHT,
+ NULL);
+
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (completion),
+ extracell, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (completion),
+ extracell, "text", extra_col);
+
gtk_entry_set_completion (GTK_ENTRY (priv->icon_entry->entry), completion);
g_object_unref (completion);
}
diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h
index f1fba28ce..cdd02130f 100644
--- a/lib/widgets/ephy-location-entry.h
+++ b/lib/widgets/ephy-location-entry.h
@@ -71,7 +71,8 @@ void ephy_location_entry_set_completion (EphyLocationEntry *le,
guint text_col,
guint action_col,
guint keywords_col,
- guint relevance_col);
+ guint relevance_col,
+ guint extra_col);
void ephy_location_entry_set_location (EphyLocationEntry *le,
const char *address,