svnno****@sourc*****
svnno****@sourc*****
Sat Jan 24 16:31:09 JST 2009
Revision: 3550 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3550 Author: ikezoe Date: 2009-01-24 16:31:09 +0900 (Sat, 24 Jan 2009) Log Message: ----------- * src/kz-tab-label.[ch]: Remove favicon_pixbuf from KzTab structure. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-tab-label.c kazehakase/trunk/src/kz-tab-label.h Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-01-24 05:57:06 UTC (rev 3549) +++ kazehakase/trunk/ChangeLog 2009-01-24 07:31:09 UTC (rev 3550) @@ -3,6 +3,7 @@ * test: added. * src/bookmarks/kz-bookmark.c: Use g_object_set_qdata instead of g_object_set. + * src/kz-tab-label.[ch]: Remove favicon_pixbuf from KzTab structure. 2009-01-23 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/kz-tab-label.c =================================================================== --- kazehakase/trunk/src/kz-tab-label.c 2009-01-24 05:57:06 UTC (rev 3549) +++ kazehakase/trunk/src/kz-tab-label.c 2009-01-24 07:31:09 UTC (rev 3550) @@ -208,7 +208,6 @@ priv->auto_refresh_id = 0; priv->favicon_signal = 0; - kztab->favicon_pixbuf = NULL; kztab->circle = NULL; kztab->mask = NULL; @@ -372,11 +371,6 @@ kztab->kz = NULL; } - if (kztab->favicon_pixbuf) - { - g_object_unref(kztab->favicon_pixbuf); - kztab->favicon_pixbuf = NULL; - } if (kztab->circle) { g_object_unref(kztab->circle); @@ -521,9 +515,9 @@ if (!GTK_WIDGET_REALIZED(kztab)) return; KZ_CONF_GET("Global", "create_thumbnail", create_thumbnail, BOOL); - if (kztab->state != KZ_TAB_LABEL_STATE_NORMAL && - state == KZ_TAB_LABEL_STATE_NORMAL && - create_thumbnail) + if (create_thumbnail && + kztab->state != KZ_TAB_LABEL_STATE_NORMAL && + state == KZ_TAB_LABEL_STATE_NORMAL) { g_idle_add(idle_create_thumbnail, kztab); } @@ -587,7 +581,21 @@ { g_return_if_fail(KZ_IS_TAB_LABEL(kztab)); - g_object_set(kztab->favicon, "visible", show && kztab->favicon_pixbuf, NULL); + if (show && kztab->kzembed) + { + const gchar *uri; + GdkPixbuf *favicon_pixbuf; + + uri = kz_embed_get_location(KZ_EMBED(kztab->kzembed)); + favicon_pixbuf = kz_favicon_get_pixbuf(KZ_GET_FAVICON, uri, + GTK_ICON_SIZE_MENU); + gtk_image_set_from_pixbuf(GTK_IMAGE(kztab->favicon), + favicon_pixbuf); + if (favicon_pixbuf) + g_object_unref(favicon_pixbuf); + } + + g_object_set(kztab->favicon, "visible", show, NULL); } @@ -890,12 +898,8 @@ kz_tab_label_set_state(kztab, KZ_TAB_LABEL_STATE_LOADING); - if (kztab->favicon_pixbuf) - { - gtk_image_set_from_pixbuf(GTK_IMAGE(kztab->favicon), NULL); - g_object_unref(kztab->favicon_pixbuf); - kztab->favicon_pixbuf = NULL; - } + gtk_image_set_from_pixbuf(GTK_IMAGE(kztab->favicon), NULL); + /* show favicon widget for progress maru. */ gtk_widget_show(kztab->favicon); } @@ -939,17 +943,6 @@ } KZ_CONF_GET("Tab", "show_favicon", show_favicon, BOOL); - - if (show_favicon) - { - const gchar *uri; - uri = kz_embed_get_location(KZ_EMBED(kztab->kzembed)); - kztab->favicon_pixbuf = kz_favicon_get_pixbuf(KZ_GET_FAVICON, uri, - GTK_ICON_SIZE_MENU); - gtk_image_set_from_pixbuf(GTK_IMAGE(kztab->favicon), - kztab->favicon_pixbuf); - } - kz_tab_label_set_show_favicon(kztab, show_favicon); } Modified: kazehakase/trunk/src/kz-tab-label.h =================================================================== --- kazehakase/trunk/src/kz-tab-label.h 2009-01-24 05:57:06 UTC (rev 3549) +++ kazehakase/trunk/src/kz-tab-label.h 2009-01-24 07:31:09 UTC (rev 3550) @@ -63,7 +63,6 @@ GtkWidget *close_button; GtkWidget *lock_button; GdkBitmap *mask; - GdkPixbuf *favicon_pixbuf; GdkPixmap *circle; KzBookmark *history;