summaryrefslogtreecommitdiff
path: root/community/midori/fix-copying.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/midori/fix-copying.patch')
-rw-r--r--community/midori/fix-copying.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/community/midori/fix-copying.patch b/community/midori/fix-copying.patch
new file mode 100644
index 000000000..ab3581900
--- /dev/null
+++ b/community/midori/fix-copying.patch
@@ -0,0 +1,63 @@
+diff --git a/midori/midori-browser.c b/midori/midori-browser.c
+index 28aca95..b33e2e4 100644
+--- a/midori/midori-browser.c
++++ b/midori/midori-browser.c
+@@ -1041,7 +1041,7 @@ midori_browser_save_uri (MidoriBrowser* browser,
+ GtkWidget* dialog;
+ const gchar* title = midori_view_get_display_title (view);
+ gchar* filename;
+- GList* resources = midori_view_get_subresources (view);
++ GList* resources = midori_view_get_resources (view);
+ gboolean file_only = TRUE;
+ GtkWidget* checkbox = NULL;
+
+diff --git a/midori/midori-view.c b/midori/midori-view.c
+index 37cc78f..2c71f55 100644
+--- a/midori/midori-view.c
++++ b/midori/midori-view.c
+@@ -1993,21 +1993,22 @@ midori_web_view_menu_image_new_tab_activate_cb (GtkWidget* widget,
+ }
+
+ GList*
+-midori_view_get_subresources (MidoriView* view)
++midori_view_get_resources (MidoriView* view)
+ {
+ WebKitWebView* web_view = WEBKIT_WEB_VIEW (view->web_view);
+ WebKitWebFrame* frame = webkit_web_view_get_main_frame (web_view);
+ WebKitWebDataSource* data_source = webkit_web_frame_get_data_source (frame);
+- return webkit_web_data_source_get_subresources (data_source);
++ GList* resources = webkit_web_data_source_get_subresources (data_source);
++ return g_list_prepend (resources, webkit_web_data_source_get_main_resource (data_source));
+ }
+
+ static GString*
+ midori_view_get_data_for_uri (MidoriView* view,
+ const gchar* uri)
+ {
+- GList* resources = midori_view_get_subresources (view);
++ GList* resources = midori_view_get_resources (view);
+ GList* list;
+- GString* result;
++ GString* result = NULL;
+
+ for (list = resources; list; list = g_list_next (list))
+ {
+@@ -2032,7 +2033,8 @@ midori_view_clipboard_get_image_cb (GtkClipboard* clipboard,
+ MidoriView* view = MIDORI_VIEW (g_object_get_data (user_data, "view"));
+ WebKitHitTestResult* hit_test = user_data;
+ gchar* uri = katze_object_get_string (hit_test, "image-uri");
+- /* if (gtk_selection_data_targets_include_image (selection_data, TRUE)) */
++
++ if (gtk_targets_include_image(&selection_data->target, 1, TRUE))
+ {
+ GString* data = midori_view_get_data_for_uri (view, uri);
+ if (data != NULL)
+@@ -2052,7 +2054,7 @@ midori_view_clipboard_get_image_cb (GtkClipboard* clipboard,
+ else
+ g_warn_if_reached ();
+ }
+- /* if (gtk_selection_data_targets_include_text (selection_data)) */
++ if (gtk_targets_include_text(&selection_data->target, 1))
+ gtk_selection_data_set_text (selection_data, uri, -1);
+ g_free (uri);
+ }