]> spindle.queued.net Git - midori/commitdiff
Remove the Download Manager preference
authorChristian Dywan <christian@twotoasts.de>
Thu, 14 Apr 2011 01:23:08 +0000 (03:23 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 14 Apr 2011 01:23:08 +0000 (03:23 +0200)
Many users are confused about the way the feature works and
nobody cares enough to improve it.

midori/midori-preferences.c
midori/midori-view.c
midori/midori-websettings.c

index 6bfba5d66b7c962caf750ac8c2900813a997ae45..df35561d5a2f91141a68f91e0f08eacd13610dca 100644 (file)
@@ -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");
index ea0e6b1f38b652c8988c4f12ff099408688c6acc..b120301d125d504e0607d192fa722932347c61fd 100644 (file)
@@ -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
@@ -2225,13 +2215,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"))
     {
index d9a7c8d77166dd464a34b6355ace3b9696b5e91c..69cf1c28916a1d57eda5ccd952741fee45da3a0d 100644 (file)
@@ -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 (