summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-12-31 12:57:47 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-12-31 12:57:47 +0000
commit7124d96b1f974799e5b0ea140a7ebf67208a119f (patch)
tree902aa24ce4b2d9a76d701c5ed6aeae5056864907 /gtk
parente0596793e1a1c34786586cb18ee4fc8652ef7c50 (diff)
downloadnetsurf-7124d96b1f974799e5b0ea140a7ebf67208a119f.tar.gz
netsurf-7124d96b1f974799e5b0ea140a7ebf67208a119f.tar.bz2
ensure favicon is correctly set
svn path=/trunk/netsurf/; revision=13358
Diffstat (limited to 'gtk')
-rw-r--r--gtk/scaffolding.c6
-rw-r--r--gtk/tabs.c13
2 files changed, 6 insertions, 13 deletions
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index e8f28a17e..255b61f0d 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -1998,7 +1998,7 @@ void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon)
{
struct gtk_scaffolding *g = nsgtk_get_scaffold(_g);
struct bitmap *icon_bitmap = NULL;
- GdkPixbuf *icon_pixbuf;
+ GdkPixbuf *icon_pixbuf = NULL;
if (g->top_level != _g) {
return;
@@ -2007,11 +2007,13 @@ void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon)
if (icon != NULL) {
icon_bitmap = content_get_bitmap(icon);
if (icon_bitmap != NULL) {
+ LOG(("Using %p bitmap", icon_bitmap));
icon_pixbuf = nsgdk_pixbuf_get_from_surface(icon_bitmap->surface, 16, 16);
- }
+ }
}
if (icon_pixbuf == NULL) {
+ LOG(("Using default favicon"));
g_object_ref(favicon_pixbuf);
icon_pixbuf = favicon_pixbuf;
}
diff --git a/gtk/tabs.c b/gtk/tabs.c
index 89b97a282..dff1cb829 100644
--- a/gtk/tabs.c
+++ b/gtk/tabs.c
@@ -197,20 +197,11 @@ void nsgtk_tab_add(struct gui_window *window,
gtk_widget_show_all(tab_contents);
gtk_notebook_set_current_page(GTK_NOTEBOOK(tabs),
gtk_notebook_get_n_pages(GTK_NOTEBOOK(tabs)) - 1);
- if (option_new_blank) {
- /*char *blankpage = malloc(strlen(res_dir_location) +
- SLEN("file:///blankpage") + 1);
- blankpage = g_strconcat("file:///", res_dir_location,
- "blankpage", NULL); */
- /* segfaults
- struct browser_window *bw =
- nsgtk_get_browser_window(window);
- browser_window_go(bw, blankpage, 0, true); */
- /* free(blankpage); */
- }
+
if (background) {
gtk_notebook_set_current_page(GTK_NOTEBOOK(tabs), remember);
}
+
gtk_widget_grab_focus(GTK_WIDGET(nsgtk_scaffolding_urlbar(
nsgtk_get_scaffold(window))));
}