aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-completion-model.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-05-06 22:47:19 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-06-21 19:54:16 +0800
commit97c91b2fc2059b1e358bb19896203afaa44bfd33 (patch)
tree6aa01250a99fa884d177ce3202d8ff41e8e96d74 /src/ephy-completion-model.c
parenta8767266443074689200fff9ca43531d88d65aed (diff)
downloadgsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.gz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.bz2
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.lz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.xz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.zst
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.zip
Initial WebKit2 port
It builds and basic functionality works.
Diffstat (limited to 'src/ephy-completion-model.c')
-rw-r--r--src/ephy-completion-model.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index aa68bf7ea..373fd0c42 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -166,6 +166,9 @@ typedef struct {
gboolean is_bookmark;
} PotentialRow;
+#ifdef HAVE_WEBKIT2
+/* TODO: Favicons */
+#else
typedef struct {
GtkListStore *model;
GtkTreeRowReference *row_reference;
@@ -195,6 +198,7 @@ icon_loaded_cb (GObject *source, GAsyncResult *result, gpointer user_data)
gtk_tree_row_reference_free (data->row_reference);
g_slice_free (IconLoadData, data);
}
+#endif
static void
set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row)
@@ -202,8 +206,12 @@ set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row)
GtkTreeIter iter;
GdkPixbuf *favicon;
GtkTreePath *path;
+#ifdef HAVE_WEBKIT2
+ /* TODO: Favicons */
+#else
IconLoadData *data;
WebKitFaviconDatabase* database = webkit_get_favicon_database ();
+#endif
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter, position,
EPHY_COMPLETION_TEXT_COL, row->title ? row->title : "",
@@ -214,6 +222,9 @@ set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row)
EPHY_COMPLETION_RELEVANCE_COL, row->relevance,
-1);
+#ifdef HAVE_WEBKIT2
+ /* TODO: Favicons */
+#else
/* We try first with the try_get_favicon_pixbuf() because if the icon
is in the DB it's faster than the async version. */
favicon = webkit_favicon_database_try_get_favicon_pixbuf (database, row->location,
@@ -233,6 +244,7 @@ set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row)
webkit_favicon_database_get_favicon_pixbuf (database, row->location,
FAVICON_SIZE, FAVICON_SIZE, NULL,
icon_loaded_cb, data);
+#endif
}
static void