gboolean show_statusbar;
gboolean progress_in_location;
gboolean remember_last_visited_pages;
+ gchar* news_aggregator;
};
#if HAVE_HILDON
katze_throbber_set_animated (KATZE_THROBBER (browser->throbber), loading);
action = _action_by_name (browser, "Location");
- if (g_object_get_data (G_OBJECT (view), "news-feeds"))
+ if (browser->news_aggregator && *browser->news_aggregator
+ && g_object_get_data (G_OBJECT (view), "news-feeds"))
midori_location_action_set_secondary_icon (
MIDORI_LOCATION_ACTION (action), STOCK_NEWS_FEED);
else
if ((view = midori_browser_get_current_tab (browser)))
{
const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
- /* FIXME: Support a user chosen feed reader */
- if (1)
- sokoke_spawn_program ("liferea-add-feed", uri);
+ if (browser->news_aggregator && *browser->news_aggregator)
+ sokoke_spawn_program (browser->news_aggregator, uri);
}
}
katze_object_assign (browser->net, NULL);
+ katze_assign (browser->news_aggregator, NULL);
+
G_OBJECT_CLASS (midori_browser_parent_class)->finalize (object);
}
gint default_width, default_height;
KatzeItem* item;
+ g_free (browser->news_aggregator);
+
g_object_get (browser->settings,
"remember-last-window-size", &remember_last_window_size,
"last-window-width", &last_window_width,
"close-buttons-on-tabs", &close_buttons_on_tabs,
"progress-in-location", &browser->progress_in_location,
"remember-last-visited-pages", &browser->remember_last_visited_pages,
+ "news-aggregator", &browser->news_aggregator,
NULL);
screen = gtk_window_get_screen (GTK_WINDOW (browser));
browser->progress_in_location = g_value_get_boolean (&value);
else if (name == g_intern_string ("remember-last-visited-pages"))
browser->remember_last_visited_pages = g_value_get_boolean (&value);
+ else if (name == g_intern_string ("news-aggregator"))
+ {
+ katze_assign (browser->news_aggregator, g_value_dup_string (&value));
+ }
else if (!g_object_class_find_property (G_OBJECT_GET_CLASS (web_settings),
name))
g_warning (_("Unexpected setting '%s'"), name);
button = katze_property_proxy (settings, "show-crash-dialog", NULL);
SPANNED_ADD (button, 0, 2, 2, 3);
FRAME_NEW (_("Transfers"));
- TABLE_NEW (3, 2);
+ TABLE_NEW (4, 2);
#if WEBKIT_CHECK_VERSION (1, 1, 3)
label = katze_property_label (settings, "download-folder");
INDENTED_ADD (label, 0, 1, 0, 1);
g_signal_connect (entry, "focus-out-event",
G_CALLBACK (proxy_download_manager_icon_cb), button);
FILLED_ADD (hbox, 1, 2, 2, 3);
+ label = katze_property_label (settings, "news-aggregator");
+ INDENTED_ADD (label, 0, 1, 3, 4);
+ hbox = gtk_hbox_new (FALSE, 4);
+ button = gtk_image_new ();
+ gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (button),
+ GTK_ICON_SIZE_MENU, &icon_width, &icon_height);
+ gtk_widget_set_size_request (button, icon_width, icon_height);
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 4);
+ entry = katze_property_proxy (settings, "news-aggregator", NULL);
+ gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
+ proxy_download_manager_icon_cb (entry, NULL, GTK_IMAGE (button));
+ g_signal_connect (entry, "focus-out-event",
+ G_CALLBACK (proxy_download_manager_icon_cb), button);
+ FILLED_ADD (hbox, 1, 2, 3, 4);
/* Page "Appearance" */
PAGE_NEW (GTK_STOCK_SELECT_FONT, _("Appearance"));
/* KatzeArray* news_feeds; */
gchar* download_manager;
+ gchar* news_aggregator;
gboolean middle_click_opens_selection;
gboolean open_tabs_in_the_background;
gboolean close_buttons_on_tabs;
g_object_notify (G_OBJECT (view), "progress");
midori_view_update_load_status (view, MIDORI_LOAD_FINISHED);
- /* FIXME: Do this conditional on whether there's a custom feed reader */
- if (1)
+ if (view->news_aggregator && *view->news_aggregator)
{
JSContextRef js_context = webkit_web_frame_get_global_context (web_frame);
gchar* value = sokoke_js_script_eval (js_context,
view->item = NULL;
view->download_manager = NULL;
+ view->news_aggregator = NULL;
view->web_view = NULL;
/* Adjustments are not created automatically */
katze_object_assign (view->item, NULL);
katze_assign (view->download_manager, NULL);
+ katze_assign (view->news_aggregator, NULL);
katze_object_assign (view->net, NULL);
g_object_get (view->settings,
"download-manager", &view->download_manager,
+ "news-aggregator", &view->news_aggregator,
"zoom-text-and-images", &zoom_text_and_images,
"close-buttons-on-tabs", &view->close_buttons_on_tabs,
"open-new-pages-in", &view->open_new_pages_in,
{
katze_assign (view->download_manager, g_value_dup_string (&value));
}
+ else if (name == g_intern_string ("news-aggregator"))
+ {
+ katze_assign (view->news_aggregator, g_value_dup_string (&value));
+ }
else if (name == g_intern_string ("zoom-text-and-images"))
{
if (view->web_view)
gchar* download_folder;
gchar* download_manager;
gchar* text_editor;
+ gchar* news_aggregator;
gchar* location_entry_search;
MidoriPreferredEncoding preferred_encoding;
PROP_DOWNLOAD_FOLDER,
PROP_DOWNLOAD_MANAGER,
PROP_TEXT_EDITOR,
+ PROP_NEWS_AGGREGATOR,
PROP_LOCATION_ENTRY_SEARCH,
PROP_PREFERRED_ENCODING,
NULL,
flags));
+ /**
+ * MidoriWebSettings:news-aggregator:
+ *
+ * An external news aggregator.
+ *
+ * Since: 0.1.6
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_NEWS_AGGREGATOR,
+ g_param_spec_string (
+ "news-aggregator",
+ _("News Aggregator"),
+ _("An external news aggregator"),
+ NULL,
+ flags));
+
g_object_class_install_property (gobject_class,
PROP_LOCATION_ENTRY_SEARCH,
g_param_spec_string (
case PROP_TEXT_EDITOR:
katze_assign (web_settings->text_editor, g_value_dup_string (value));
break;
+ case PROP_NEWS_AGGREGATOR:
+ katze_assign (web_settings->news_aggregator, g_value_dup_string (value));
+ break;
case PROP_LOCATION_ENTRY_SEARCH:
katze_assign (web_settings->location_entry_search, g_value_dup_string (value));
break;
case PROP_TEXT_EDITOR:
g_value_set_string (value, web_settings->text_editor);
break;
+ case PROP_NEWS_AGGREGATOR:
+ g_value_set_string (value, web_settings->news_aggregator);
+ break;
case PROP_LOCATION_ENTRY_SEARCH:
g_value_set_string (value, web_settings->location_entry_search);
break;