svnno****@sourc*****
svnno****@sourc*****
Wed Jan 21 14:45:40 JST 2009
Revision: 3534 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3534 Author: ikezoe Date: 2009-01-21 14:45:40 +0900 (Wed, 21 Jan 2009) Log Message: ----------- * src/kz-tab-label.c: Invoke idle_create_thumnail only if the option is enabled. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/kz-tab-label.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-01-21 05:08:46 UTC (rev 3533) +++ kazehakase/trunk/ChangeLog 2009-01-21 05:45:40 UTC (rev 3534) @@ -1,6 +1,8 @@ 2009-01-21 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/kz-tab-label.c: Remove redundant gtk_icon_size_lookup. + * src/kz-tab-label.c: Invoke idle_create_thumnail only if the option + is enabled. 2009-01-20 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/kz-tab-label.c =================================================================== --- kazehakase/trunk/src/kz-tab-label.c 2009-01-21 05:08:46 UTC (rev 3533) +++ kazehakase/trunk/src/kz-tab-label.c 2009-01-21 05:45:40 UTC (rev 3534) @@ -481,17 +481,12 @@ KzTabLabel *kztab; KzEmbed *embed; EggPixbufThumbSize size = EGG_PIXBUF_THUMB_LARGE; - gboolean create_thumbnail = FALSE; const gchar *uri; guint last_modified; kztab = data; g_return_val_if_fail(KZ_IS_TAB_LABEL(kztab), FALSE); - KZ_CONF_GET("Global", "create_thumbnail", create_thumbnail, BOOL); - if (!create_thumbnail) - return FALSE; - embed = kztab->kzembed; uri = kz_embed_get_location(embed); if (!uri) @@ -519,21 +514,26 @@ KzTabLabelState state) { gchar *title; + gboolean create_thumbnail = FALSE; g_return_if_fail(KZ_IS_TAB_LABEL(kztab)); 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) + state == KZ_TAB_LABEL_STATE_NORMAL && + create_thumbnail) + { g_idle_add(idle_create_thumbnail, kztab); + } kztab->state = state; if (state == KZ_TAB_LABEL_STATE_NORMAL) { kz_tab_label_set_visited(kztab); } - + title = kz_embed_ensure_title(kztab->kzembed); kz_tab_label_set_text(kztab, title); g_free(title); @@ -1159,7 +1159,7 @@ allow_javacript = kz_bookmark_get_javascript(history); kz_embed_set_allow_javascript(KZ_EMBED(kztab->kzembed), allow_javacript); kz_tab_label_set_javascript(kztab, allow_javacript); - + kz_embed_set_history(kztab->kzembed, kztab->history); } static void