[Xfce4-commits] <midori:master> Remove the Download Manager preference
Christian Dywan
noreply at xfce.org
Thu Apr 14 03:46:02 CEST 2011
Updating branch refs/heads/master
to 9ab1349c546b4a7257196e953ebfdc6468467e71 (commit)
from 5107d35fe74b69f9e5cdd665feb191bec9c95498 (commit)
commit 9ab1349c546b4a7257196e953ebfdc6468467e71
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Apr 14 03:23:08 2011 +0200
Remove the Download Manager preference
Many users are confused about the way the feature works and
nobody cares enough to improve it.
midori/midori-preferences.c | 4 ----
midori/midori-view.c | 37 +------------------------------------
midori/midori-websettings.c | 7 +++++++
3 files changed, 8 insertions(+), 40 deletions(-)
diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index 6bfba5d..df35561 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -471,10 +471,6 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "text-editor", "application-text/plain");
SPANNED_ADD (entry);
- label = katze_property_label (settings, "download-manager");
- INDENTED_ADD (label);
- entry = katze_property_proxy (settings, "download-manager", "application-FileTransfer");
- SPANNED_ADD (entry);
label = katze_property_label (settings, "news-aggregator");
INDENTED_ADD (label);
entry = katze_property_proxy (settings, "news-aggregator", "application-News");
diff --git a/midori/midori-view.c b/midori/midori-view.c
index ea0e6b1..b120301 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -89,7 +89,6 @@ struct _MidoriView
GtkWidget* thumb_view;
KatzeArray* news_feeds;
- gchar* download_manager;
gchar* news_aggregator;
gboolean middle_click_opens_selection;
gboolean open_tabs_in_the_background;
@@ -2136,15 +2135,6 @@ midori_web_view_menu_video_save_activate_cb (GtkWidget* widget,
g_signal_emit (view, signals[DOWNLOAD_REQUESTED], 0, download, &handled);
g_free (uri);
}
-
-static void
-midori_web_view_menu_video_download_activate_cb (GtkWidget* widget,
- MidoriView* view)
-{
- gchar* uri = katze_object_get_string (view->hit_test, "media-uri");
- sokoke_spawn_program (view->download_manager, uri);
- g_free (uri);
-}
#endif
static void
@@ -2226,13 +2216,6 @@ midori_web_view_menu_save_as_activate_cb (GtkWidget* widget,
#endif
static void
-midori_web_view_menu_download_activate_cb (GtkWidget* widget,
- MidoriView* view)
-{
- sokoke_spawn_program (view->download_manager, view->link_uri);
-}
-
-static void
midori_view_tab_label_menu_window_new_cb (GtkWidget* menuitem,
GtkWidget* view)
{
@@ -2501,10 +2484,6 @@ midori_view_populate_popup (MidoriView* view,
midori_view_insert_menu_item (menu_shell, -1,
NULL, GTK_STOCK_SAVE_AS,
G_CALLBACK (midori_web_view_menu_save_activate_cb), widget);
- if (view->download_manager && *view->download_manager)
- midori_view_insert_menu_item (menu_shell, -1,
- _("Download with Download _Manager"), STOCK_TRANSFER,
- G_CALLBACK (midori_web_view_menu_download_activate_cb), widget);
}
if (is_image)
@@ -2530,10 +2509,6 @@ midori_view_populate_popup (MidoriView* view,
midori_view_insert_menu_item (menu_shell, -1,
FALSE ? _("Save _Video") : _("Download _Video"), GTK_STOCK_SAVE,
G_CALLBACK (midori_web_view_menu_video_save_activate_cb), widget);
- if (view->download_manager && *view->download_manager)
- midori_view_insert_menu_item (menu_shell, -1,
- _("Download with Download _Manager"), STOCK_TRANSFER,
- G_CALLBACK (midori_web_view_menu_video_download_activate_cb), widget);
}
if (has_selection)
@@ -2574,10 +2549,6 @@ midori_view_populate_popup (MidoriView* view,
NULL, GTK_STOCK_SAVE_AS,
G_CALLBACK (midori_web_view_menu_save_as_activate_cb), widget);
#endif
- if (view->download_manager && *view->download_manager)
- midori_view_insert_menu_item (menu_shell, 4,
- _("Download with Download _Manager"), STOCK_TRANSFER,
- G_CALLBACK (midori_web_view_menu_download_activate_cb), widget);
}
#endif
@@ -3256,7 +3227,6 @@ midori_view_init (MidoriView* view)
view->scrollh = view->scrollv = -2;
view->back_forward_set = FALSE;
- view->download_manager = NULL;
view->news_aggregator = NULL;
view->web_view = NULL;
/* Adjustments are not created initially, but overwritten later */
@@ -3313,7 +3283,6 @@ midori_view_finalize (GObject* object)
katze_object_assign (view->settings, NULL);
katze_object_assign (view->item, NULL);
- katze_assign (view->download_manager, NULL);
katze_assign (view->news_aggregator, NULL);
G_OBJECT_CLASS (midori_view_parent_class)->finalize (object);
@@ -3457,11 +3426,9 @@ _midori_view_set_settings (MidoriView* view,
g_object_set (view->web_view, "settings", settings, NULL);
- g_free (view->download_manager);
g_free (view->news_aggregator);
g_object_get (view->settings,
- "download-manager", &view->download_manager,
"news-aggregator", &view->news_aggregator,
"zoom-text-and-images", &zoom_text_and_images,
"kinetic-scrolling", &kinetic_scrolling,
@@ -3517,9 +3484,7 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
g_value_init (&value, pspec->value_type);
g_object_get_property (G_OBJECT (view->settings), name, &value);
- if (name == g_intern_string ("download-manager"))
- katze_assign (view->download_manager, g_value_dup_string (&value));
- else if (name == g_intern_string ("news-aggregator"))
+ 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"))
{
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index d9a7c8d..69cf1c2 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -662,6 +662,13 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
#endif
+ /**
+ * MidoriWebSettings:download-manager:
+ *
+ * An external download manager that shows up in context menus.
+ *
+ * Deprecated: 0.3.4
+ */
g_object_class_install_property (gobject_class,
PROP_DOWNLOAD_MANAGER,
g_param_spec_string (
More information about the Xfce4-commits
mailing list