Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/55260cc9a06e7d62c5d24...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/55260cc9a06e7d62c5d242c...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/55260cc9a06e7d62c5d242c44...
The branch, master has been updated
via 55260cc9a06e7d62c5d242c4420ab5e5474242b0 (commit)
from 65ef60d2b5ac0a39a14538b8abab5cdd9da6fad6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=55260cc9a06e7d62c5d...
commit 55260cc9a06e7d62c5d242c4420ab5e5474242b0
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Ensure gtk windows have a default favicon at creation.
This ensures newly created gtk gui windows have a default favicon
set. This is necessary because new tab creation displays the new
windows contents before an icon has been set and the icon will not be
changed from the previously viewed tabs icon.
diff --git a/gtk/window.c b/gtk/window.c
index 481ae3b..c50ed20 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -765,13 +765,14 @@ gui_window_create(struct browser_window *bw,
/* attach scaffold */
if (flags & GW_CREATE_TAB) {
+ /* open in new tab, attach to existing scaffold */
if (existing != NULL) {
g->scaffold = existing->scaffold;
} else {
g->scaffold = nsgtk_current_scaffolding();
}
} else {
- /* Now construct and attach a scaffold */
+ /* open in new window, create and attach to scaffold */
g->scaffold = nsgtk_new_scaffolding(g);
}
if (g->scaffold == NULL) {
@@ -788,6 +789,9 @@ gui_window_create(struct browser_window *bw,
g->paned = GTK_PANED(gtk_builder_get_object(tab_builder, "hpaned1"));
g->input_method = gtk_im_multicontext_new();
+ /* set a default favicon */
+ g_object_ref(favicon_pixbuf);
+ g->icon = favicon_pixbuf;
/* add new gui window to global list (push_top) */
if (window_list) {
@@ -850,13 +854,13 @@ gui_window_create(struct browser_window *bw,
nsgtk_paned_notify__position, g);
/* gtk container destructor */
- CONNECT(g->container, "destroy",
- window_destroy, g);
+ CONNECT(g->container, "destroy", window_destroy, g);
/* input method */
gtk_im_context_set_client_window(g->input_method,
nsgtk_layout_get_bin_window(g->layout));
gtk_im_context_set_use_preedit(g->input_method, FALSE);
+
/* input method signals */
CONNECT(g->input_method, "commit",
nsgtk_window_input_method_commit, g);
@@ -936,7 +940,10 @@ static void gui_window_destroy(struct gui_window *g)
}
/**
- * set favicon
+ * favicon setting for gtk gui window.
+ *
+ * \param gw gtk gui window to set favicon on.
+ * \param icon A handle to the new favicon content.
*/
static void gui_window_set_icon(struct gui_window *gw, hlcache_handle *icon)
{
-----------------------------------------------------------------------
Summary of changes:
gtk/window.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/gtk/window.c b/gtk/window.c
index 481ae3b..c50ed20 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -765,13 +765,14 @@ gui_window_create(struct browser_window *bw,
/* attach scaffold */
if (flags & GW_CREATE_TAB) {
+ /* open in new tab, attach to existing scaffold */
if (existing != NULL) {
g->scaffold = existing->scaffold;
} else {
g->scaffold = nsgtk_current_scaffolding();
}
} else {
- /* Now construct and attach a scaffold */
+ /* open in new window, create and attach to scaffold */
g->scaffold = nsgtk_new_scaffolding(g);
}
if (g->scaffold == NULL) {
@@ -788,6 +789,9 @@ gui_window_create(struct browser_window *bw,
g->paned = GTK_PANED(gtk_builder_get_object(tab_builder, "hpaned1"));
g->input_method = gtk_im_multicontext_new();
+ /* set a default favicon */
+ g_object_ref(favicon_pixbuf);
+ g->icon = favicon_pixbuf;
/* add new gui window to global list (push_top) */
if (window_list) {
@@ -850,13 +854,13 @@ gui_window_create(struct browser_window *bw,
nsgtk_paned_notify__position, g);
/* gtk container destructor */
- CONNECT(g->container, "destroy",
- window_destroy, g);
+ CONNECT(g->container, "destroy", window_destroy, g);
/* input method */
gtk_im_context_set_client_window(g->input_method,
nsgtk_layout_get_bin_window(g->layout));
gtk_im_context_set_use_preedit(g->input_method, FALSE);
+
/* input method signals */
CONNECT(g->input_method, "commit",
nsgtk_window_input_method_commit, g);
@@ -936,7 +940,10 @@ static void gui_window_destroy(struct gui_window *g)
}
/**
- * set favicon
+ * favicon setting for gtk gui window.
+ *
+ * \param gw gtk gui window to set favicon on.
+ * \param icon A handle to the new favicon content.
*/
static void gui_window_set_icon(struct gui_window *gw, hlcache_handle *icon)
{
--
NetSurf Browser