diff --git a/data/GameHub.css b/data/GameHub.css index cd5180e1..b5960171 100644 --- a/data/GameHub.css +++ b/data/GameHub.css @@ -3,6 +3,7 @@ opacity: 0.75; border-radius: 4px; transition: 100ms; + background-color: #999; } .gamecard.installed diff --git a/data/com.github.tkashkin.gamehub.appdata.xml.in b/data/com.github.tkashkin.gamehub.appdata.xml.in index bfa37dbc..fae7c108 100644 --- a/data/com.github.tkashkin.gamehub.appdata.xml.in +++ b/data/com.github.tkashkin.gamehub.appdata.xml.in @@ -40,6 +40,12 @@ + + +

Humble Bundle authentication fix

+

Humble Bundle game icons fix

+
+

Humble Bundle support

diff --git a/debian/changelog b/debian/changelog index 78e98166..692d4d19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +com.github.tkashkin.gamehub (0.3.1) xenial; urgency=low + + * Humble Bundle authentication fix + * Humble Bundle game icons fix + + -- tkashkin Fri, 22 Jun 2018 18:03:16 +0300 + com.github.tkashkin.gamehub (0.3.0) xenial; urgency=low * Humble Bundle support diff --git a/meson.build b/meson.build index b3d2418f..1ca9f3e6 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.3.0') +project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.3.1') i18n = import('i18n') gnome = import('gnome') diff --git a/src/data/sources/humble/Humble.vala b/src/data/sources/humble/Humble.vala index c69c4e13..8544badc 100644 --- a/src/data/sources/humble/Humble.vala +++ b/src/data/sources/humble/Humble.vala @@ -59,7 +59,7 @@ namespace GameHub.Data.Sources.Humble return true; } - var wnd = new GameHub.UI.Windows.WebAuthWindow(this.name, @"https://www.humblebundle.com/login?goto=home", null, AUTH_COOKIE); + var wnd = new GameHub.UI.Windows.WebAuthWindow(this.name, "https://www.humblebundle.com/login?goto=home", "https://www.humblebundle.com/home/library", AUTH_COOKIE); wnd.finished.connect(token => { diff --git a/src/ui/widgets/AutoSizeImage.vala b/src/ui/widgets/AutoSizeImage.vala index c7b37783..6dbee713 100644 --- a/src/ui/widgets/AutoSizeImage.vala +++ b/src/ui/widgets/AutoSizeImage.vala @@ -59,10 +59,15 @@ namespace GameHub.UI.Widgets break; } - var pixbuf = src.scale_simple(new_width, new_height, InterpType.BILINEAR); + Pixbuf pixbuf = src; + + if(src.width != src.height) + { + pixbuf = src.scale_simple(new_width, new_height, InterpType.BILINEAR); + } Granite.Drawing.Utilities.cairo_rounded_rectangle(ctx, 0, 0, new_width, new_height, 4); - cairo_set_source_pixbuf(ctx, pixbuf, 0, 0); + cairo_set_source_pixbuf(ctx, pixbuf, (new_width - pixbuf.width) / 2, (new_height - pixbuf.height) / 2); ctx.clip(); ctx.paint(); diff --git a/src/ui/windows/WebAuthWindow.vala b/src/ui/windows/WebAuthWindow.vala index d8f7c53c..9d37f2e4 100644 --- a/src/ui/windows/WebAuthWindow.vala +++ b/src/ui/windows/WebAuthWindow.vala @@ -36,6 +36,8 @@ namespace GameHub.UI.Windows webview.get_settings().enable_mediasource = true; webview.get_settings().enable_smooth_scrolling = true; + + webview.user_content_manager.add_style_sheet(new UserStyleSheet(".account-bbm-wrapper{background:#333 !important}", UserContentInjectedFrames.TOP_FRAME, UserStyleLevel.USER, null, null)); webview.load_changed.connect(e => { var uri = webview.get_uri(); @@ -44,13 +46,13 @@ namespace GameHub.UI.Windows titlebar.tooltip_text = uri; if(!is_finished && success_cookie_name != null) - { + { webview.web_context.get_cookie_manager().get_cookies.begin(uri, null, (obj, res) => { var cookies = webview.web_context.get_cookie_manager().get_cookies.end(res); foreach(var cookie in cookies) { - if(!is_finished && cookie.name == success_cookie_name && !cookie.value.contains("\"")) - { + if(!is_finished && cookie.name == success_cookie_name && !cookie.value.contains("\"") && (success_url_prefix == null || uri.has_prefix(success_url_prefix))) + { is_finished = true; finished(cookie.value); destroy(); @@ -59,8 +61,7 @@ namespace GameHub.UI.Windows } }); } - - if(!is_finished && success_url_prefix != null && uri.has_prefix(success_url_prefix)) + else if(!is_finished && success_url_prefix != null && uri.has_prefix(success_url_prefix)) { is_finished = true; finished(uri.substring(success_url_prefix.length));