トップ «前の日記(2005-07-20(Wed)) 最新 次の日記(2005-07-22(Fri))» 編集

猿も叩けば日記


2005-07-21(Thu)

_ [風博士]理解できない

先週のリベンジをしようと頑張ったんだが,どうにもいかん.

src/mozilla/kz-mozeventlistener.cpp の103行目で NS_UTF16ToCString(name, NS_CSTRING_ENCODING_UTF8, cName); した直後に g_print("%s\n", cName.get()); してみたんだが,stylesheet の文字が出てこない.index だの,alternate なんかは出てくるんだが,stylesheet だけ出てこない.

ここは敢えて恥をかく事を承知で言おう.これは Mozilla のバグだ.

あー言っちゃった.

_ [風博士]RSSを取得してブックマークに登録するアクション

スタイルシートがうまくいかなかったので,ムシャクシャしてやった.

パッチが書ければなんでもよかった.

よく分かってないのにこんなものを書いて,今は後悔している.後悔ついでに公開する.

Index: src/actions/kz-actions.c

===================================================================

RCS file: /cvsroot/kazehakase/kazehakase/src/actions/kz-actions.c,v

retrieving revision 1.202

diff -u -r1.202 kz-actions.c

--- src/actions/kz-actions.c 14 Jul 2005 02:49:19 -0000 1.202

+++ src/actions/kz-actions.c 21 Jul 2005 06:53:54 -0000

@@ -1116,6 +1116,50 @@

g_object_unref(G_OBJECT(bookmark));

}

+static void

+act_add_rss_to_bookmark (GtkAction *action, KzWindow *kz)

+{

+ KzBookmark *folder, *bookmark, *sibling = NULL;

+ KzBookmark *file;

+ GtkWidget *widget;

+ const gchar *title, *uri;

+

+ g_return_if_fail(KZ_IS_WINDOW (kz));

+

+ folder = kz_actions_get_bookmark_for_action(kz);

+ g_return_if_fail(KZ_IS_BOOKMARK(folder));

+

+ if (!kz_bookmark_is_folder(folder))

+ {

+ sibling = folder;

+ folder = kz_bookmark_get_parent(folder);

+ g_return_if_fail(KZ_IS_BOOKMARK(folder));

+ }

+

+ widget = KZ_WINDOW_CURRENT_PAGE(kz);

+ if (!KZ_IS_EMBED(widget)) return;

+

+ title = kz_embed_ensure_title(KZ_EMBED(widget));

+ uri = kz_embed_get_nav_link(KZ_EMBED(widget), KZ_EMBED_LINK_RSS);

+

+ if (!uri) return;

+

+ bookmark = KZ_BOOKMARK(kz_bookmark_file_new(uri, title, NULL));

+

+ if (sibling)

+ kz_bookmark_insert_before(folder, bookmark, sibling);

+ else

+ kz_bookmark_append(folder, bookmark);

+

+ if (KZ_IS_BOOKMARK_FILE(folder))

+ file = folder;

+ else

+ file = kz_bookmark_get_parent_file(folder);

+

+ kz_bookmark_file_save(KZ_BOOKMARK_FILE(file));

+

+ g_object_unref(G_OBJECT(bookmark));

+}

static void

act_remove_bookmark (GtkAction *action, KzWindow *kz)

@@ -1954,6 +1998,7 @@

{"OpenAllBookmarks", NULL, N_("Open a_ll bookmarks"), NULL, NULL, G_CALLBACK(act_open_all_bookmarks)},

{"OpenAllBookmarksRecursive", NULL, N_("Open all bookmarks _recursively"), NULL, NULL, G_CALLBACK(act_open_all_bookmarks_recursive)},

{"AddBookmark", NULL, N_("_Add to bookmarks"), NULL, NULL, G_CALLBACK(act_add_bookmark)},

+ {"AddRSStoBookmark", NULL, N_("Add RSS to _bookmarks"), NULL, NULL, G_CALLBACK(act_add_rss_to_bookmark)},

{"RemoveBookmark", NULL, N_("_Remove the bookmark"), NULL, NULL, G_CALLBACK(act_remove_bookmark)},

{"EditBookmarks", NULL, N_("_Edit bookmarks..."), NULL, NULL, G_CALLBACK(act_edit_bookmark)},

{"EditBookmarkBars", NULL, N_("Edit bookmark _bars..."), NULL, NULL, G_CALLBACK(act_edit_bookmark_bars)},

本日のツッコミ(全10件) [ツッコミを入れる]
_ lupatiy (2006-06-22(Thu) 00:03)

Buy lortab - US Licensed Online Pharmacy - http://blog.azpoint.net/blog/mojettak buy lortab

_ altavista (2006-06-22(Thu) 10:55)

Tramadol online - US Licensed Online Pharmacy - http://blog.azpoint.net/blog/tramadol tramadol online

_ lamborgi (2006-06-22(Thu) 19:52)

Soma carisoprodol - MedlinePlus Drug Information: Carisoprodol http://blog.azpoint.net/blog/carispa soma carisoprodol

_ laja (2006-06-23(Fri) 12:41)

http://blog.azpoint.net/blog/paxa buy paxil

_ gaga (2006-06-24(Sat) 09:15)

Buy phentermine - MedlinePlus Drug Information! http://snipurl.com/nujnolave buy phentermine

_ globo (2006-06-24(Sat) 19:32)

Cheap tramadol Information! http://snipurl.com/s48b cheap tramadol

_ glasha (2006-06-25(Sun) 12:12)

Buy cialis, buy cialis online. http://snipurl.com/s48g buy cialis

_ Ylia (2006-07-04(Tue) 13:04)

Buy phentermine - Click here! http://snipurl.com/nujnolave buy phentermine

_ esvynubl dalqf (2006-08-17(Thu) 12:10)

igpm opvy eyqtx lksj myxlgfz orgu qshgfitkv

_ ezmwtvid hycmdxkb (2006-08-17(Thu) 12:10)

hgkwfb objuwhenx peqlzhxsn eunmsdg ypjmv lbsuokan deolgmrqp http://www.afzbxnuv.nifudp.com


2003|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|05|06|07|08|09|10|11|12|
2008|01|