NULL);
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (column), renderer,
midori_location_entry_render_text_cb,
- action->entry, NULL);
+ action, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
action->popup = popup;
if (G_LIKELY (location_action->popup))
{
gtk_widget_hide (location_action->popup);
+ katze_assign (location_action->key, NULL);
gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (
GTK_TREE_VIEW (location_action->treeview)));
}
GtkTreeIter* iter,
gpointer data)
{
+ MidoriLocationAction* action = data;
gchar* uri;
gchar* title;
GdkColor* background;
gchar* desc;
gchar* desc_uri;
gchar* desc_title;
- GtkWidget* entry;
const gchar* str;
gchar* key;
gchar* start;
gchar** parts;
size_t len;
- entry = data;
-
gtk_tree_model_get (model, iter, URI_COL, &uri, TITLE_COL, &title,
BACKGROUND_COL, &background, -1);
- desc = desc_uri = desc_title = key = NULL;
- str = gtk_entry_get_text (GTK_ENTRY (entry));
- if (!str)
- return;
-
if (background != NULL) /* A search engine action */
{
g_object_set (renderer, "text", title,
return;
}
+ desc = desc_uri = desc_title = key = NULL;
+ if (action->key)
+ str = action->key;
+ else
+ str = "";
+
key = g_utf8_strdown (str, -1);
len = strlen (key);
g_object_set_data (G_OBJECT (renderer), "location-action", action);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (entry), renderer, TRUE);
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (entry),
- renderer, midori_location_entry_render_text_cb, child, NULL);
+ renderer, midori_location_entry_render_text_cb, action, NULL);
gtk_combo_box_set_active (GTK_COMBO_BOX (entry), -1);
if (location_action->history)