[Xfce4-commits] <midori:master> Deprecate middle_click_opens_selection in favour of gtk-enable-primary-paste

Christian Dywan noreply at xfce.org
Fri Apr 5 01:22:02 CEST 2013


Updating branch refs/heads/master
         to 2673578d883029dbb13700df99d71b2167df1de6 (commit)
       from 9295eb8efd7870fcec255ff7ba6df684bd150fe2 (commit)

commit 2673578d883029dbb13700df99d71b2167df1de6
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Apr 5 00:46:03 2013 +0200

    Deprecate middle_click_opens_selection in favour of gtk-enable-primary-paste

 midori/midori-settings.vala |    1 +
 midori/midori-view.c        |   10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index 946b72c..75c68f3 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -111,6 +111,7 @@ namespace Midori {
         /* Since: 0.2.0 */
         // [Deprecated (since = "0.4.9")]
         public bool kinetic_scrolling { get; set; default = true; }
+        // [Deprecated (since = "0.5.0")]
         public bool middle_click_opens_selection { get; set; default = true; }
         public bool flash_window_on_new_bg_tabs { get; set; default = false; }
 
diff --git a/midori/midori-view.c b/midori/midori-view.c
index a3c497d..b4d2d30 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -104,7 +104,6 @@ struct _MidoriView
     GtkWidget* web_view;
     KatzeArray* news_feeds;
 
-    gboolean middle_click_opens_selection;
     gboolean open_tabs_in_the_background;
     gboolean close_buttons_on_tabs;
     MidoriNewPage open_new_pages_in;
@@ -1760,7 +1759,11 @@ midori_view_web_view_button_press_event_cb (WebKitWebView*  web_view,
             view->button_press_handled = TRUE;
             return TRUE;
         }
-        if (view->middle_click_opens_selection)
+        #if GTK_CHECK_VERSION (3, 4, 0)
+        if (katze_object_get_boolean (gtk_widget_get_settings (view->web_view), "gtk-enable-primary-paste"))
+        #else
+        if (midori_settings_get_middle_click_opens_selection (MIDORI_SETTINGS (view->settings)))
+        #endif
         {
             gboolean is_editable;
             WebKitHitTestResult* result;
@@ -3428,7 +3431,6 @@ _midori_view_set_settings (MidoriView*        view,
         "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,
-        "middle-click-opens-selection", &view->middle_click_opens_selection,
         "open-tabs-in-the-background", &view->open_tabs_in_the_background,
         NULL);
 
@@ -3525,8 +3527,6 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
                                    view->close_buttons_on_tabs);
         #endif
     }
-    else if (name == g_intern_string ("middle-click-opens-selection"))
-        view->middle_click_opens_selection = g_value_get_boolean (&value);
     else if (name == g_intern_string ("open-tabs-in-the-background"))
         view->open_tabs_in_the_background = g_value_get_boolean (&value);
     else if (name == g_intern_string ("enable-javascript"))


More information about the Xfce4-commits mailing list