Add 'Import bookmarks' button into the bookmark panel
This commit is contained in:
parent
a35b548589
commit
718d832537
2 changed files with 18 additions and 1 deletions
|
@ -30,7 +30,7 @@
|
||||||
#define STOCK_STYLE "gnome-settings-theme"
|
#define STOCK_STYLE "gnome-settings-theme"
|
||||||
#define STOCK_TRANSFER "package"
|
#define STOCK_TRANSFER "package"
|
||||||
#define STOCK_TRANSFERS "package"
|
#define STOCK_TRANSFERS "package"
|
||||||
#define STOCK_PLUGINS GTK_STOCK_CONVERT
|
#define STOCK_PLUGINS "gnome-mime-application-x-shockwave-flash"
|
||||||
|
|
||||||
#define STOCK_BOOKMARK_ADD "stock_add-bookmark"
|
#define STOCK_BOOKMARK_ADD "stock_add-bookmark"
|
||||||
#define STOCK_HOMEPAGE GTK_STOCK_HOME
|
#define STOCK_HOMEPAGE GTK_STOCK_HOME
|
||||||
|
@ -48,6 +48,8 @@
|
||||||
#define STOCK_BOOKMARKS "general_mybookmarks_folder"
|
#define STOCK_BOOKMARKS "general_mybookmarks_folder"
|
||||||
#undef STOCK_NEWS_FEED
|
#undef STOCK_NEWS_FEED
|
||||||
#define STOCK_NEWS_FEED "general_rss"
|
#define STOCK_NEWS_FEED "general_rss"
|
||||||
|
#undef STOCK_WEB_BROWSER
|
||||||
|
#define STOCK_WEB_BROWSER "general_web"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !__MIDORI_STOCK_H__ */
|
#endif /* !__MIDORI_STOCK_H__ */
|
||||||
|
|
|
@ -186,6 +186,14 @@ midori_bookmarks_folder_clicked_cb (GtkWidget* toolitem)
|
||||||
NULL, TRUE, TRUE);
|
NULL, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
midori_bookmarks_import_clicked_cb (GtkWidget* toolitem)
|
||||||
|
{
|
||||||
|
MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (toolitem));
|
||||||
|
/* FIXME: Take selected folder into account */
|
||||||
|
midori_browser_activate_action (browser, "BookmarksImport");
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
midori_bookmarks_cursor_or_row_changed_cb (GtkTreeView* treeview,
|
midori_bookmarks_cursor_or_row_changed_cb (GtkTreeView* treeview,
|
||||||
MidoriBookmarks* bookmarks)
|
MidoriBookmarks* bookmarks)
|
||||||
|
@ -259,6 +267,13 @@ midori_bookmarks_get_toolbar (MidoriViewable* viewable)
|
||||||
gtk_tool_item_set_expand (toolitem, TRUE);
|
gtk_tool_item_set_expand (toolitem, TRUE);
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1);
|
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1);
|
||||||
gtk_widget_show (GTK_WIDGET (toolitem));
|
gtk_widget_show (GTK_WIDGET (toolitem));
|
||||||
|
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_CONVERT);
|
||||||
|
gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem),
|
||||||
|
_("Import bookmarks..."));
|
||||||
|
g_signal_connect (toolitem, "clicked",
|
||||||
|
G_CALLBACK (midori_bookmarks_import_clicked_cb), bookmarks);
|
||||||
|
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, -1);
|
||||||
|
gtk_widget_show (GTK_WIDGET (toolitem));
|
||||||
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_DIRECTORY);
|
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_DIRECTORY);
|
||||||
gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem),
|
gtk_widget_set_tooltip_text (GTK_WIDGET (toolitem),
|
||||||
_("Add a new folder"));
|
_("Add a new folder"));
|
||||||
|
|
Loading…
Reference in a new issue