Hidetaka Iwai
tyuyu****@sings*****
2004年 12月 12日 (日) 15:52:39 JST
岩井@札幌です。 ブックマークエディタについて幾つか要望があります。 1. bookmark view 内のブックマークフォルダをダブルクリックすることで下 の階層に移動 現在中ボタンクリックで移動できるようになっていますが、これが左ボ タンのダブルクリックで可能になると嬉しいです。 2. 他のブックマークを編集 ブックマークエディタのメニューから他のブックマーク(ブックマークバー、 スマートブックマーク等)の編集に移れると便利だと思います。 3. folder view からも削除 bookmark view からではなく folder view からもフォルダが削除できると 便利です。 1,2 につきましては、パッチを作成しましたので添付します。 3 は変更点が 大きくなりそうだったので、先に御意見を頂けると幸いです。 regards, -- Hidetaka Iwai tyuyu****@sings***** -------------- next part -------------- Index: etc/kz-ui-bookmarks.xml =================================================================== RCS file: /cvsroot/kazehakase/kazehakase/etc/kz-ui-bookmarks.xml,v retrieving revision 1.13 diff -u -r1.13 kz-ui-bookmarks.xml --- etc/kz-ui-bookmarks.xml 11 Dec 2004 13:47:45 -0000 1.13 +++ etc/kz-ui-bookmarks.xml 12 Dec 2004 06:40:14 -0000 @@ -36,6 +36,12 @@ <menu name="GoMenu" action="StockGoMenu"> <menuitem name="GoUp" action="GoUp" /> + <separator name="go-sep0" /> + <menu name="OtherBookmarksMenu" action="StockOtherBookmarksMenu"> + <menuitem name="EditBookmarks" action="EditBookmarks" /> + <menuitem name="EditBookmarkBars" action="EditBookmarkBars" /> + <menuitem name="EditSmartBookmarks" action="EditSmartBookmarks" /> + </menu> </menu> </menubar> Index: src/bookmarks/kz-actions-bookmark.c =================================================================== RCS file: /cvsroot/kazehakase/kazehakase/src/bookmarks/kz-actions-bookmark.c,v retrieving revision 1.31 diff -u -r1.31 kz-actions-bookmark.c --- src/bookmarks/kz-actions-bookmark.c 11 Dec 2004 13:47:46 -0000 1.31 +++ src/bookmarks/kz-actions-bookmark.c 12 Dec 2004 06:40:15 -0000 @@ -411,6 +411,54 @@ kz_bookmark_editor_set_current(editor, parent); } +static void +act_edit_bookmarks (GtkAction *action, KzBookmarkEditor *editor) +{ +/* FIXME! Is this correct? */ + KzBookmark *bookmark; + GValue val = {0,}; + + g_value_init (&val, KZ_TYPE_BOOKMARK); + bookmark = kz_bookmarks->menu; + + g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); + g_return_if_fail(kz_bookmark_is_folder(bookmark)); + + g_value_set_object (&val, bookmark); + g_object_set_property (G_OBJECT (editor), "root-folder", &val); +} + +static void +act_edit_bookmark_bars (GtkAction *action, KzBookmarkEditor *editor) +{ + KzBookmark *bookmark; + GValue val = {0,}; + + g_value_init (&val, KZ_TYPE_BOOKMARK); + bookmark = kz_bookmarks->bookmark_bars; + + g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); + g_return_if_fail(kz_bookmark_is_folder(bookmark)); + + g_value_set_object (&val, bookmark); + g_object_set_property (G_OBJECT (editor), "root-folder", &val); +} + +static void +act_edit_smart_bookmarks (GtkAction *action, KzBookmarkEditor *editor) +{ + KzBookmark *bookmark; + GValue val = {0,}; + + g_value_init (&val, KZ_TYPE_BOOKMARK); + bookmark = kz_bookmarks->smarts; + + g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); + g_return_if_fail(kz_bookmark_is_folder(bookmark)); + + g_value_set_object (&val, bookmark); + g_object_set_property (G_OBJECT (editor), "root-folder", &val); +} static void cb_popup_menu_hide (void) @@ -426,6 +474,7 @@ {"StockViewMenu", NULL, N_("_View"), NULL, NULL, NULL}, {"StockGoMenu", NULL, N_("_Go"), NULL, NULL, NULL}, {"StockModeMenu", NULL, N_("_Mode"), NULL, NULL, NULL}, + {"StockOtherBookmarksMenu", NULL, N_("Other Bookmarks"), NULL, NULL, NULL}, {"NewWindow", KZ_STOCK_NEW_WINDOW, N_("_New Window"), "<control>N", N_("Open a new window"), G_CALLBACK(act_new_window)}, {"CloseWindow", KZ_STOCK_CLOSE_WINDOW, N_("_Close Window"), "<control>W", N_("Close the current window"), G_CALLBACK(act_close_window)}, @@ -434,7 +483,7 @@ {"InsertFolder", KZ_STOCK_FOLDER, N_("Insert _folder"), "<control>F", N_("Insert a new folder"), G_CALLBACK(act_insert_folder)}, {"InsertRemoteBookmark", KZ_STOCK_REMOTE_BOOKMARK, N_("Insert _remote bookmark"), "<control>R", N_("Insert a new remote bookmark"), G_CALLBACK(act_insert_remote_bookmark)}, {"InsertSmartBookmark", KZ_STOCK_SMART_BOOKMARK, N_("Insert _smart bookmark"), "<control>S", N_("Insert a new smart bookmark"), G_CALLBACK(act_insert_smart_bookmark)}, - {"InsertMozillaBookmark", NULL, N_("Insert _Mozilla bookmark"), NULL, N_("Insert a Mozilla bookmark"), G_CALLBACK(act_insert_mozilla_bookmark)}, + {"InsertMozillaBookmark", NULL, N_("Insert Mozilla bookmark"), NULL, N_("Insert a Mozilla bookmark"), G_CALLBACK(act_insert_mozilla_bookmark)}, {"InsertNetscapeBookmark", NULL, N_("Insert Netscape bookmark"), NULL, N_("Insert a Netscape bookmark"), G_CALLBACK(act_insert_netscape_bookmark)}, {"InsertFirefoxBookmark", NULL, N_("Insert Firefox bookmark"), NULL, N_("Insert a Firefox bookmark"), G_CALLBACK(act_insert_firefox_bookmark)}, {"InsertGaleonBookmark", NULL, N_("Insert Galeon bookmark"), NULL, N_("Insert a Galeon bookmark"), G_CALLBACK(act_insert_galeon_bookmark)}, @@ -443,6 +492,10 @@ {"InsertSeparator", KZ_STOCK_SEPARATOR, N_("Insert _separator"), "<control>P", N_("Insert a separator"), G_CALLBACK(act_insert_separator)}, {"RemoveBookmarkItem", GTK_STOCK_DELETE, N_("_Remove selected item"), "<control>Delete", N_("Remove the selected item"), G_CALLBACK(act_remove_selected_item)}, {"GoUp", GTK_STOCK_GO_UP, N_("_Up"), NULL, NULL, G_CALLBACK(act_go_up)}, + {"EditBookmarks", NULL, N_("Edit bookmarks..."), NULL, NULL, G_CALLBACK(act_edit_bookmarks)}, + {"EditBookmarkBars", NULL, N_("Edit bookmark bars..."), NULL, NULL, G_CALLBACK(act_edit_bookmark_bars)}, + {"EditSmartBookmarks", NULL, N_("Edit smart bookmarks..."), NULL, NULL, G_CALLBACK(act_edit_smart_bookmarks)}, + }; static const gint kz_actions_bookmark_len = G_N_ELEMENTS(kz_actions_bookmark); Index: src/bookmarks/kz-bookmark-editor.c =================================================================== RCS file: /cvsroot/kazehakase/kazehakase/src/bookmarks/kz-bookmark-editor.c,v retrieving revision 1.38 diff -u -r1.38 kz-bookmark-editor.c --- src/bookmarks/kz-bookmark-editor.c 30 Oct 2004 00:32:48 -0000 1.38 +++ src/bookmarks/kz-bookmark-editor.c 12 Dec 2004 06:40:15 -0000 @@ -591,7 +591,6 @@ gtk_tree_path_free(path); } - static void cb_bookmarks_view_cursor_changed (GtkTreeView *treeview, KzBookmarkEditor *editor) @@ -761,6 +760,12 @@ if (success && (event->type == GDK_2BUTTON_PRESS)) { + if (kz_bookmark_is_folder(bookmark)) + { + kz_bookmark_edit_clear(edit); + kz_bookmark_editor_set_bookmark_tree(editor, bookmark); + kz_bookmark_editor_folder_view_select(editor, bookmark); + } } else if (success && event->button == 2) {