Merge lp:~laney/unity-control-center/wk2 into lp:unity-control-center

Proposed by Iain Lane on 2016-01-13
Status: Merged
Approved by: Sebastien Bacher on 2016-01-14
Approved revision: no longer in the source branch.
Merged at revision: 12848
Proposed branch: lp:~laney/unity-control-center/wk2
Merge into: lp:unity-control-center
Diff against target: 114 lines (+40/-27)
3 files modified
configure.ac (+1/-1)
debian/control (+1/-1)
panels/info/cc-info-panel.c (+38/-25)
To merge this branch: bzr merge lp:~laney/unity-control-center/wk2
Reviewer Review Type Date Requested Status
Sebastien Bacher 2016-01-13 Approve on 2016-01-14
Unity Control Center development team 2016-01-13 Pending
Review via email: mp+282487@code.launchpad.net

Commit message

Port the info WebView to WebKit 2

Description of the change

Port the info WebView to WebKit 2

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thanks for the work!

There are some small issues though

* you deleted the gtk_scrolled_window_new () call but kept the sw variable and still use it as "user_data" in the callback which triggers a warning about user_data not being a valid GTK_WIDGET

* detail and was there before, but "gtk_widget_show_all(" lacks a space before the parenthesis, could you it while you are changing this line? ;-)

* the scrollbars have glitches/redraw issues here, do you see that as well? (it might be a webkit2 issue, doesn't do that with the current version though so it's an user experience regression and we should at least have a milestoned bug about it)

review: Needs Fixing
Iain Lane (laney) wrote :

Thanks for the review.

On Wed, Jan 13, 2016 at 06:21:07PM -0000, Sebastien Bacher wrote:
> Review: Needs Fixing
>
> Thanks for the work!
>
> There are some small issues though
>
> * you deleted the gtk_scrolled_window_new () call but kept the sw variable and still use it as "user_data" in the callback which triggers a warning about user_data not being a valid GTK_WIDGET

Ok, fixed, thanks.

>
> * detail and was there before, but "gtk_widget_show_all(" lacks a space before the parenthesis, could you it while you are changing this line? ;-)

Ok.

>
> * the scrollbars have glitches/redraw issues here, do you see that as well? (it might be a webkit2 issue, doesn't do that with the current version though so it's an user experience regression and we should at least have a milestoned bug about it)

It's a WebKit and theme problem. Trevinho was looking at it a while ago.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Sebastien Bacher (seb128) wrote :

thanks, that looks fine, we should open a bug about the webkit issue but that's rather an item blocking the webkitgtk2 transition landing than one for that specific changeset

review: Approve
lp:~laney/unity-control-center/wk2 updated on 2016-02-09
12844. By Iain Lane on 2016-01-19

Update the legal notice to fix a broken link and reflect dash search being off by default Fixes: #1534085
Approved by: Sebastien Bacher

12845. By CI Train Bot Account on 2016-01-19

Releasing 15.04.0+16.04.20160119-0ubuntu1

12846. By Iain Lane on 2016-02-09

Merge with trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2015-12-14 10:09:05 +0000
+++ configure.ac 2016-02-09 13:07:03 +0000
@@ -140,7 +140,7 @@
140 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)140 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
141PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES libunity-settings-daemon x11)141PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES libunity-settings-daemon x11)
142PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0 gl x11142PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0 gl x11
143 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION webkitgtk-3.0)143 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION webkit2gtk-4.0)
144PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES144PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES
145 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION145 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
146 x11)146 x11)
147147
=== modified file 'debian/control'
--- debian/control 2015-12-14 10:09:05 +0000
+++ debian/control 2016-02-09 13:07:03 +0000
@@ -57,7 +57,7 @@
57 network-manager-dev (>= 0.9.6.4) [linux-any],57 network-manager-dev (>= 0.9.6.4) [linux-any],
58 shared-mime-info,58 shared-mime-info,
59 ttf-ubuntu-font-family,59 ttf-ubuntu-font-family,
60 libwebkitgtk-3.0-dev,60 libwebkit2gtk-4.0-dev,
61 libgl1-mesa-dev,61 libgl1-mesa-dev,
62 valac (>= 0.20.0),62 valac (>= 0.20.0),
63Vcs-Bzr: https://code.launchpad.net/~unity-control-center-team/unity-control-center/trunk63Vcs-Bzr: https://code.launchpad.net/~unity-control-center-team/unity-control-center/trunk
6464
=== modified file 'panels/info/cc-info-panel.c'
--- panels/info/cc-info-panel.c 2015-02-02 09:28:42 +0000
+++ panels/info/cc-info-panel.c 2016-02-09 13:07:03 +0000
@@ -40,7 +40,7 @@
40#include <GL/gl.h>40#include <GL/gl.h>
41#include <GL/glx.h>41#include <GL/glx.h>
4242
43#include <webkit/webkit.h>43#include <webkit2/webkit2.h>
4444
45#include "hostname-helper.h"45#include "hostname-helper.h"
46#include "gsd-disk-space-helper.h"46#include "gsd-disk-space-helper.h"
@@ -733,38 +733,51 @@
733 gtk_tree_path_free (path);733 gtk_tree_path_free (path);
734}734}
735735
736static gboolean 736static gboolean
737url_nav_callback (WebKitWebView *web_view,737on_decide_policy (WebKitWebView *web_view,
738 WebKitWebFrame *frame,738 WebKitPolicyDecision *decision,
739 WebKitNetworkRequest *request,739 WebKitPolicyDecisionType decision_type,
740 WebKitWebNavigationAction *navigation_action,740 gpointer user_data)
741 WebKitWebPolicyDecision *decision,
742 gpointer user_data)
743{741{
744 gtk_show_uri (gtk_widget_get_screen (user_data),742 WebKitNavigationPolicyDecision *navigation_decision;
745 webkit_network_request_get_uri (request),743 WebKitNavigationAction *navigation_action;
746 GDK_CURRENT_TIME, NULL);744 WebKitNavigationType navigation_type;
747 return TRUE;745 WebKitURIRequest *request;
746 const gchar *uri;
747
748 switch (decision_type)
749 {
750 case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
751 navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION(decision);
752 navigation_action = webkit_navigation_policy_decision_get_navigation_action (navigation_decision);
753 request = webkit_navigation_action_get_request (navigation_action);
754 navigation_type = webkit_navigation_action_get_navigation_type (navigation_action);
755
756 if (navigation_type == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED)
757 {
758 uri = webkit_uri_request_get_uri (request);
759
760 webkit_policy_decision_ignore (decision);
761
762 gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (web_view)),
763 uri, GDK_CURRENT_TIME, NULL);
764 return TRUE;
765 }
766 default:
767 return FALSE;
768 }
748}769}
749770
750static void771static void
751info_panel_setup_notice (CcInfoPanel *self)772info_panel_setup_notice (CcInfoPanel *self)
752{773{
753 GtkWidget *sw;774 WebKitWebView *webView = WEBKIT_WEB_VIEW (webkit_web_view_new());
754
755 sw = gtk_scrolled_window_new (NULL, NULL);
756 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
757 GTK_POLICY_AUTOMATIC,
758 GTK_POLICY_AUTOMATIC);
759
760 WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
761 webkit_web_view_load_uri(webView, "file:///usr/share/unity-control-center/searchingthedashlegalnotice.html");775 webkit_web_view_load_uri(webView, "file:///usr/share/unity-control-center/searchingthedashlegalnotice.html");
762 g_signal_connect (G_OBJECT (webView), "navigation-policy-decision-requested",776 g_signal_connect (G_OBJECT (webView), "decide-policy",
763 G_CALLBACK (url_nav_callback), sw);777 G_CALLBACK (on_decide_policy), NULL);
764778
765 gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (webView));779 gtk_notebook_append_page (GTK_NOTEBOOK (WID ("notebook")), GTK_WIDGET (webView), NULL);
766 gtk_notebook_append_page (GTK_NOTEBOOK (WID ("notebook")), sw, NULL);780 gtk_widget_show_all (GTK_WIDGET (webView));
767 gtk_widget_show_all(sw);
768}781}
769782
770static void783static void

Subscribers

People subscribed via source and target branches