code style

This commit is contained in:
Artem Anufrij 2018-10-26 21:59:01 +02:00
parent f49db24518
commit 5fbf3556cf

View file

@ -1,6 +1,6 @@
/*- /*-
* Copyright (c) 2015 Erasmo Marín <erasmo.marin@gmail.com> * Copyright (c) 2015 Erasmo Marín <erasmo.marin@gmail.com>
* Copyright (c) 2017-2017 Artem Anufrij <artem.anufrij@live.de> * Copyright (c) 2017-2018 Artem Anufrij <artem.anufrij@live.de>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
@ -108,8 +108,7 @@ namespace Webpin.Widgets {
} }
container.pack_start (icon, true, true, 0); container.pack_start (icon, true, true, 0);
web_view.create.connect ( web_view.create.connect ((action) => {
(action) => {
app_notification.title = _ ("Open request in an external application…"); app_notification.title = _ ("Open request in an external application…");
app_notification.send_notification (); app_notification.send_notification ();
@ -117,8 +116,7 @@ namespace Webpin.Widgets {
return new WebKit.WebView (); return new WebKit.WebView ();
}); });
web_view.load_changed.connect ( web_view.load_changed.connect ((load_event) => {
(load_event) => {
request_begin (); request_begin ();
if (load_event == WebKit.LoadEvent.FINISHED) { if (load_event == WebKit.LoadEvent.FINISHED) {
visible_child_name = "app"; visible_child_name = "app";
@ -129,14 +127,12 @@ namespace Webpin.Widgets {
} }
}); });
web_view.show_notification.connect ( web_view.show_notification.connect ((notification) => {
(notification) => {
desktop_notification (notification.title, notification.body, icon_for_notification); desktop_notification (notification.title, notification.body, icon_for_notification);
return true; return true;
}); });
web_view.permission_request.connect ( web_view.permission_request.connect ((permission) => {
(permission) => {
var permission_type = permission as WebKit.NotificationPermissionRequest; var permission_type = permission as WebKit.NotificationPermissionRequest;
if (permission_type != null) { if (permission_type != null) {
permission_type.allow (); permission_type.allow ();
@ -144,8 +140,7 @@ namespace Webpin.Widgets {
return false; return false;
}); });
web_view.button_press_event.connect ( web_view.button_press_event.connect ((event) => {
(event) => {
if (event.button == 8) { if (event.button == 8) {
web_view.go_back (); web_view.go_back ();
return true; return true;
@ -156,8 +151,7 @@ namespace Webpin.Widgets {
return base.button_press_event (event); return base.button_press_event (event);
}); });
web_view.key_press_event.connect ( web_view.key_press_event.connect ((event) => {
(event) => {
if (event.keyval == Gdk.Key.Back) { if (event.keyval == Gdk.Key.Back) {
web_view.go_back (); web_view.go_back ();
return true; return true;