diff options
author | Photon89 | 2017-08-16 21:32:31 +0200 |
---|---|---|
committer | Photon89 | 2017-08-16 21:32:31 +0200 |
commit | 51453e1ca13a7d3e0cb362d2c9502e5f9850ad0f (patch) | |
tree | e4273fa81f8100e1c0d2b605cc3e29dc8274f6ac | |
parent | 3dc1d48cd550271568bf5a4c0ef1e6939fc60451 (diff) | |
download | aur-51453e1ca13a7d3e0cb362d2c9502e5f9850ad0f.tar.gz |
Update to 0.94
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | CVE-2015-0854.patch | 41 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | fix-dropbox.patch | 11 | ||||
-rw-r--r-- | fix-imgur.patch | 342 | ||||
-rw-r--r-- | fix-mail-sendto.patch | 13 | ||||
-rw-r--r-- | fix-second-instance-crash.patch | 60 | ||||
-rw-r--r-- | fix-unicode.patch | 40 |
8 files changed, 8 insertions, 547 deletions
@@ -1,7 +1,7 @@ pkgbase = shutter pkgdesc = A featureful screenshot tool (formerly gscrot) - pkgver = 0.93.1 - pkgrel = 11 + pkgver = 0.94 + pkgrel = 1 url = http://shutter-project.org/ arch = any license = GPL3 @@ -38,20 +38,8 @@ pkgbase = shutter optdepends = perl-lwp-protocol-https: Imgur and Dropbox upload support optdepends = perl-net-oauth: Imgur and Dropbox upload support optdepends = bc: 3D Rotate and 3D Reflection plugins support - source = http://shutter-project.org/wp-content/uploads/releases/tars/shutter-0.93.1.tar.gz - source = CVE-2015-0854.patch - source = fix-dropbox.patch - source = fix-unicode.patch - source = fix-second-instance-crash.patch - source = fix-imgur.patch - source = fix-mail-sendto.patch - sha512sums = 50a635fdf73454b15351a7e2c4507bf0f9fd816273affbed412f42b1032087304ecf1fb4a4b655bc056820f267b98214ff5104f4fcd9e843f78e70ac4a7a4a04 - sha512sums = 4307cdfe9409e3ff66c74730caa99932e1b8a2698012e948b974157219f4fc572117dd1968b29f6ea08736c0fa44a62cdb11855456cff8c280f4cd60edbc1ed6 - sha512sums = 88fe92c33ba2e580328589d0f1f5639aa40580f96fbc92d05903167f87053d02f472d6afcc839ca18029df6fac065c108c440da551d86494c70b1219b0b032dc - sha512sums = 9fe445552ba530358a31c4ab1b03bf4e20f626f138b30e40a948340ce7de0a6549694b84e984dfd3a06b48eac94e9575fe6e6332b1af5cd92bf439bfa448b95d - sha512sums = 3b0fb654fb3338ea51cc9c1413b03186557eda54743333a36ff9ca2ffd40cdc6b3cfe58f8f7dd377351ec8e114d0ebf5c79ada8d1034375d4d5e1866114bcd4b - sha512sums = 7c7ff590237bb2bd5b54aeec7ad013542d6f64624fa16c0f129875cca908f6d8666328edd2ebf1fa80bdedc683785ba75516d8fdee9ca25b48aca117fb89baf6 - sha512sums = fe3906073b0fa0dcd5468a8ae16181d959edb691ae7c722aa4139e11baaa130fd79939162199cda09c43b5fb29d0690b602932dcaaebbea53730f5acbd89e9a1 + source = https://launchpad.net/shutter/0.9x/0.94/+download/shutter-0.94.tar.gz + sha512sums = 6e42a23e56d39b1a2de46a0faebc53ba7a2f3f8fa48750c9961d6d8f060177b1757ff22642eaf6bbdfc30f68825b2b8789fed00d9e19354cc40f7e27d4890984 pkgname = shutter diff --git a/CVE-2015-0854.patch b/CVE-2015-0854.patch deleted file mode 100644 index bf99c9a6a152..000000000000 --- a/CVE-2015-0854.patch +++ /dev/null @@ -1,41 +0,0 @@ -# Bazaar merge directive format 2 (Bazaar 0.90) -# revision_id: lfaraone@debian.org-20150913015632-omhhhksdbz1j2jno -# target_branch: bzr+ssh://bazaar.launchpad.net/+branch/shutter/ -# testament_sha1: 657f895d801b5ee567032599e2f961f4537a25db -# timestamp: 2015-09-13 01:59:36 +0000 -# base_revision_id: mario.kemper@googlemail.com-20141223230202-\ -# b58zlfo5qb5e2cxt -# -# Begin patch -=== modified file 'share/shutter/resources/modules/Shutter/App/HelperFunctions.pm' ---- share/shutter/resources/modules/Shutter/App/HelperFunctions.pm 2013-08-25 18:40:51 +0000 -+++ share/shutter/resources/modules/Shutter/App/HelperFunctions.pm 2015-09-13 01:56:32 +0000 -@@ -53,7 +53,8 @@ - - sub xdg_open { - my ( $self, $dialog, $link, $user_data ) = @_; -- system("xdg-open $link"); -+ my @args = ("xdg-open", "$link"); -+ system(@args); - if($?){ - my $response = $self->{_dialogs}->dlg_error_message( - sprintf( $self->{_d}->get("Error while executing %s."), "'xdg-open'"), - -# Begin bundle -IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZZuoZoAAW9fgAAwVGf//1tE -AwC///9wUAN1zXYu9esG49hKKaaU/Qyp+inpPSPSNGnk0htRkGTQBkiZNTyNDERMIAaDTQ0GgBJI -CIyamntFNpANAAAA0BtSmCk8psmU9NGo0Mag0BoB6g0Ekk0hPUzRtU09PVPaQ1DT1MmQNDQBBblC -nItOGKCVEFKr4EB+TV5NqXlTTXPaxEQcN441NfLGUe1jMvoUPf93Zo8lTOpwrtjxqi6rujPaNUTV -CagXS99rU4yR4fKPswKdWLkQ5VnuJbY6NKVyUAsM7nT6pQRQzXzlE23uIdEQUEMMZJKbdB5pRKIy -WL1scnBLBNC4at+6OQjGy1T/mLa0YWkVTkCusoYWDle1hRXrGz2YOUzUVdaddmut7OCLS7MSRXeg -caOMglpIqkaoqSvYLzbAsT+V20WStwoXb7rBRTYj4ycKqQLBHRkHWCVzJ0ibdSjXciltChrcqiQF -YgsAZ7MNOYQGgVgpP8OwBDLnM61xWspggxkwGN1KjeLWHDOYBhoHuD7V0EzQRjE9+BzPN6pDFd4W -5mbO1dxUQMJZ1WQhVIGoXzjJtObPAzQaMYhdAk5NBoj5hObdpkZjteVvW9dHtjvycid4PkVRV2w+ -2SStovOFXNFQht4TkHBfKUS0mWA3bXY7THAPIN9FWaZKdBn2cr0qUcSkLlR3l5pvSyxEs7LxNIXS -mvErI+rurPau4IOalJSpU81T54yIjOIoquDxU/BXqXpxb5/M6chvLB2a+xbMBmGrnRJp51kfOGzQ -ia23MH3Yy0rg15C2iZbPmQ5RKSoIhYUn8mUK8M6GYsayXUYgwJ0sqga7syWoa3c+w4lJ9679VCcY -iAGhmyI1BsB5lIhh41Vi0gp8qriUeKTQ3/yaeBAIqYzlwY6+Mel9IVBzLrDP5vovFKZXClW3DgEQ -kKjWFoUBM4OT1vC4uG0Ru71+XFsMip2uGNAODnDSsTsxOKTPeYAnGezwmNc05BJ4k2DYocSE5hjD -UtjJyTOMs0Ur+cMwmmFgFHLIK5cDrA4UrVR6tdSSvozJ5EYME6tTuwnxJy71DECoNbwLYORVloIE -0ojtLgetx9uCjjOYYObUq9UOcX9cZNobWDtirXS1ZsJhU0+MrslK3DBAEEBWNjaOeMS1wDwGIbJa -ma5f3PtQMadvqUGhLdV0lL1WmatWtdlWxD5LyMmc/xdyRThQkJZuoZo= @@ -7,8 +7,8 @@ # Contributor: TDY <tdy@gmx.com> pkgname=shutter -pkgver=0.93.1 -pkgrel=11 +pkgver=0.94 +pkgrel=1 pkgdesc="A featureful screenshot tool (formerly gscrot)" arch=('any') url="http://shutter-project.org/" @@ -27,20 +27,8 @@ optdepends=('gnome-web-photo: web screenshot support' 'perl-lwp-protocol-https: Imgur and Dropbox upload support' 'perl-net-oauth: Imgur and Dropbox upload support' 'bc: 3D Rotate and 3D Reflection plugins support') -source=("http://shutter-project.org/wp-content/uploads/releases/tars/$pkgname-$pkgver.tar.gz" - CVE-2015-0854.patch - fix-dropbox.patch - fix-unicode.patch - fix-second-instance-crash.patch - fix-imgur.patch - fix-mail-sendto.patch) -sha512sums=('50a635fdf73454b15351a7e2c4507bf0f9fd816273affbed412f42b1032087304ecf1fb4a4b655bc056820f267b98214ff5104f4fcd9e843f78e70ac4a7a4a04' - '4307cdfe9409e3ff66c74730caa99932e1b8a2698012e948b974157219f4fc572117dd1968b29f6ea08736c0fa44a62cdb11855456cff8c280f4cd60edbc1ed6' - '88fe92c33ba2e580328589d0f1f5639aa40580f96fbc92d05903167f87053d02f472d6afcc839ca18029df6fac065c108c440da551d86494c70b1219b0b032dc' - '9fe445552ba530358a31c4ab1b03bf4e20f626f138b30e40a948340ce7de0a6549694b84e984dfd3a06b48eac94e9575fe6e6332b1af5cd92bf439bfa448b95d' - '3b0fb654fb3338ea51cc9c1413b03186557eda54743333a36ff9ca2ffd40cdc6b3cfe58f8f7dd377351ec8e114d0ebf5c79ada8d1034375d4d5e1866114bcd4b' - '7c7ff590237bb2bd5b54aeec7ad013542d6f64624fa16c0f129875cca908f6d8666328edd2ebf1fa80bdedc683785ba75516d8fdee9ca25b48aca117fb89baf6' - 'fe3906073b0fa0dcd5468a8ae16181d959edb691ae7c722aa4139e11baaa130fd79939162199cda09c43b5fb29d0690b602932dcaaebbea53730f5acbd89e9a1') +source=("https://launchpad.net/shutter/0.9x/$pkgver/+download/shutter-$pkgver.tar.gz") +sha512sums=('6e42a23e56d39b1a2de46a0faebc53ba7a2f3f8fa48750c9961d6d8f060177b1757ff22642eaf6bbdfc30f68825b2b8789fed00d9e19354cc40f7e27d4890984') prepare() { cd "$srcdir/$pkgname-$pkgver" @@ -49,14 +37,6 @@ prepare() { sed -e "/\$tray->set_from_icon_name/s:set_from_icon_name:set_from_file:" \ -e "s:shutter-panel:/usr/share/icons/hicolor/scalable/apps/&.svg:" \ -i bin/shutter - patch -p0 < "${srcdir}/CVE-2015-0854.patch" - patch -p0 < "${srcdir}/fix-dropbox.patch" -# patch -p0 < "${srcdir}/fix-unicode.patch" - patch ${srcdir}/$pkgname-$pkgver/bin/shutter < "${srcdir}/fix-unicode.patch" -# patch -p0 < "${srcdir}/fix-second-instance-crash.patch" - patch ${srcdir}/$pkgname-$pkgver/bin/shutter < "${srcdir}/fix-second-instance-crash.patch" - patch -p0 < "${srcdir}/fix-imgur.patch" - patch ${srcdir}/$pkgname-$pkgver/bin/shutter < "${srcdir}/fix-mail-sendto.patch" } package() { diff --git a/fix-dropbox.patch b/fix-dropbox.patch deleted file mode 100644 index b9b6b471bef5..000000000000 --- a/fix-dropbox.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- share/shutter/resources/system/upload_plugins/upload/Dropbox.pm 2015-07-09 17:58:48.000000000 +0200 -+++ share/shutter/resources/system/upload_plugins/upload/Dropbox.pm 2016-09-11 08:21:17.113474014 +0200 -@@ -195,7 +195,7 @@ - $upload_file->close(); - - if(! $self->{_box}->error) { -- $res = $self->{_box}->media($self->{_config}->{upload_folder} . "/" . basename($upload_filename)); -+ $res = $self->{_box}->shares($self->{_config}->{upload_folder} . "/" . basename($upload_filename), {short_url => 0}); - } - - if(! $self->{_box}->error){ diff --git a/fix-imgur.patch b/fix-imgur.patch deleted file mode 100644 index 30777f688a29..000000000000 --- a/fix-imgur.patch +++ /dev/null @@ -1,342 +0,0 @@ -=== modified file 'bin/shutter' ---- bin/shutter 2014-12-23 23:02:02 +0000 -+++ bin/shutter 2017-01-28 09:57:21 +0000 -@@ -8353,7 +8353,10 @@ - #~ print $name, $folder, $type, "\n"; - - if ( !exists $accounts{$name} -- || !exists $accounts{$name}->{module} ) -+ || !exists $accounts{$name}->{module} -+ || $accounts{$name}->{supports_anonymous_upload} ne &fct_upload_plugin_get_info( $ukey, 'supports_anonymous_upload' ) || -+ $accounts{$name}->{supports_authorized_upload} ne &fct_upload_plugin_get_info( $ukey, 'supports_authorized_upload' ) || -+ $accounts{$name}->{supports_oauth_upload} ne &fct_upload_plugin_get_info( $ukey, 'supports_oauth_upload' ) ) - { - - #show dialog and progress bar -@@ -10632,7 +10635,7 @@ - my $uploader = $hosting_module->new( $hosting_host, $sc->get_debug, $shutter_root, $d, $window, SHUTTER_VERSION ); - - #init module -- if ( $uploader->init ) { -+ if ( $uploader->init($hosting_username) ) { - - my $counter = 1; - $hosting_progress->set_fraction(0); - -=== modified file 'share/shutter/resources/modules/Shutter/App/Common.pm' ---- share/shutter/resources/modules/Shutter/App/Common.pm 2013-08-25 18:40:51 +0000 -+++ share/shutter/resources/modules/Shutter/App/Common.pm 2017-01-28 09:57:21 +0000 -@@ -48,7 +48,7 @@ - my $self = { _shutter_root => shift, _mainwindow => shift, _appname => shift, _version => shift, _rev => shift, _pid => shift }; - - #vars -- $self->{_debug_cparam} = FALSE; -+ $self->{_debug_cparam} = TRUE; - $self->{_clear_cache} = FALSE; - $self->{_min_cparam} = FALSE; - $self->{_disable_systray_cparam} = FALSE; - -=== modified file 'share/shutter/resources/modules/Shutter/App/SimpleDialogs.pm' ---- share/shutter/resources/modules/Shutter/App/SimpleDialogs.pm 2013-08-25 18:40:51 +0000 -+++ share/shutter/resources/modules/Shutter/App/SimpleDialogs.pm 2017-01-28 09:57:21 +0000 -@@ -59,6 +59,7 @@ - my $detail_message = shift; - my $detail_checkbox = shift; - my $content_widget = shift; -+ my $content_widget2 = shift; - - my $info_dialog = Gtk2::MessageDialog->new( $self->{_window}, [qw/modal destroy-with-parent/], 'info', 'none', undef ); - -@@ -71,6 +72,9 @@ - if($content_widget){ - $info_dialog->get_content_area()->add($content_widget); - } -+ if($content_widget2){ -+ $info_dialog->get_content_area()->add($content_widget2); -+ } - - $info_dialog->add_button( $button_text_extra1, 10 ) if $button_text_extra1; - $info_dialog->add_button( $button_text_extra2, 20 ) if $button_text_extra2; - -=== modified file 'share/shutter/resources/system/upload_plugins/upload/Imgur.pm' ---- share/shutter/resources/system/upload_plugins/upload/Imgur.pm 2013-08-25 18:40:51 +0000 -+++ share/shutter/resources/system/upload_plugins/upload/Imgur.pm 2017-01-28 09:57:21 +0000 -@@ -29,7 +29,8 @@ - use strict; - use POSIX qw/setlocale/; - use Locale::gettext; --use Glib qw/TRUE FALSE/; -+use Glib qw/TRUE FALSE/; -+use MIME::Base64; - - use Shutter::Upload::Shared; - our @ISA = qw(Shutter::Upload::Shared); -@@ -38,12 +39,13 @@ - $d->dir( $ENV{'SHUTTER_INTL'} ); - - my %upload_plugin_info = ( -- 'module' => "Imgur", -+ 'module' => "Imgur", - 'url' => "http://imgur.com/", - 'registration' => "https://imgur.com/register", - 'description' => $d->get( "Imgur is used to share photos with social networks and online communities, and has the funniest pictures from all over the Internet" ), -- 'supports_anonymous_upload' => TRUE, -+ 'supports_anonymous_upload' => TRUE, - 'supports_authorized_upload' => FALSE, -+ 'supports_oauth_upload' => TRUE, - ); - - binmode( STDOUT, ":utf8" ); -@@ -66,13 +68,128 @@ - - sub init { - my $self = shift; -+ my $username = shift; - -- #do custom stuff here -+ #do custom stuff here - use JSON; - use LWP::UserAgent; - use HTTP::Request::Common; -- -- return TRUE; -+ use Path::Class; -+ -+ $self->{_config} = { }; -+ $self->{_config_file} = file( $ENV{'HOME'}, '.imgur-api-config' ); -+ -+ $self->load_config; -+ if ($username eq $d->get("OAuth")) -+ { -+ return $self->connect; -+ } -+ -+ return TRUE; -+} -+ -+sub load_config { -+ my $self = shift; -+ -+ if (-f $self->{_config_file}) { -+ eval { -+ $self->{_config} = decode_json($self->{_config_file}->slurp); -+ }; -+ if ($@) { -+ $self->{_config}->{client_id} = '9490811e0906b6e'; -+ $self->{_config}->{client_secret} = '158b57f13e9a51f064276bd9e31529fb065f741e'; -+ } -+ } -+ else { -+ $self->{_config}->{client_id} = '9490811e0906b6e'; -+ $self->{_config}->{client_secret} = '158b57f13e9a51f064276bd9e31529fb065f741e'; -+ } -+ -+ return TRUE; -+} -+ -+sub connect { -+ my $self = shift; -+ return $self->setup; -+} -+ -+sub setup { -+ my $self = shift; -+ -+ if ($self->{_debug_cparam}) { -+ print "Setting up Imgur...\n"; -+ } -+ -+ #some helpers -+ my $sd = Shutter::App::SimpleDialogs->new; -+ -+ #Authentication -+ my $login_link = 'https://api.imgur.com/oauth2/authorize?response_type=pin&client_id=' . $self->{_config}->{client_id}; -+ -+ my $pin_entry = Gtk2::Entry->new(); -+ my $pin = ''; -+ $pin_entry->signal_connect(changed => sub { -+ $pin = $pin_entry->get_text; -+ }); -+ -+ my $response = $sd->dlg_info_message( -+ $d->get("Please click on the button below to authorize with Imgur. Input the PIN you receive and press 'Apply' when you are done."), -+ $d->get("Authorize with Imgur"), -+ 'gtk-cancel','gtk-apply', undef, -+ undef, undef, undef, undef, undef, -+ Gtk2::LinkButton->new ($login_link, $d->get("Authorize")), -+ $pin_entry, -+ ); -+ if ($response == 20) { -+ -+ if ($self->{_debug_cparam}) { -+ print "Imgur: Authorizing...\n"; -+ } -+ -+ my %params = ( -+ 'client_id' => $self->{_config}->{client_id}, -+ 'client_secret' => $self->{_config}->{client_secret}, -+ 'grant_type' => 'pin', -+ 'pin' => $pin, -+ ); -+ -+ my @params = ( -+ "https://api.imgur.com/oauth2/token", -+ 'Content' => [%params] -+ ); -+ -+ my $req = HTTP::Request::Common::POST(@params, 'Authorization' => 'Client-ID ' . $self->{_config}->{client_id}); -+ -+ my $client = LWP::UserAgent->new( -+ 'timeout' => 20, -+ 'keep_alive' => 10, -+ 'env_proxy' => 1, -+ ); -+ my $rsp = $client->request($req); -+ -+ my $json = JSON->new(); -+ my $json_rsp = $json->decode($rsp->content); -+ -+ if ($self->{_debug_cparam}) { -+ print $pin . ' ' . $rsp->content; -+ } -+ if (exists $json_rsp->{status} && $json_rsp->{status} ne 200) { -+ return $self->setup; -+ } -+ -+ $self->{_config}->{access_token} = $json_rsp->{access_token}; -+ $self->{_config}->{refresh_token} = $json_rsp->{refresh_token}; -+ $self->{_config}->{account_id} = $json_rsp->{account_id}; -+ $self->{_config}->{account_username} = $json_rsp->{account_username}; -+ -+ $self->{_config_file}->openw->print(encode_json($self->{_config})); -+ chmod 0600, $self->{_config_file}; -+ -+ return TRUE; -+ } -+ else { -+ return FALSE; -+ } - } - - sub upload { -@@ -87,62 +204,66 @@ - utf8::encode $password; - utf8::encode $username; - -- #~ if ( $username ne "" && $password ne "" ) { -- -- my $client = LWP::UserAgent->new( -- 'timeout' => 20, -- 'keep_alive' => 10, -- 'env_proxy' => 1, -- ); -- -- eval{ -- -- my $json = JSON->new(); -- -- my %params = ( -- 'image' => [$upload_filename], -- 'key' => '12ea5e932124142c5ef3c8d5a02557de', -- ); -- -- my @params = ( -- "http://api.imgur.com/1/upload.json", -- 'Content_Type' => 'multipart/form-data', -- 'Content' => [%params] -- ); -- -- my $req = HTTP::Request::Common::POST(@params); -- my $rsp = $client->request($req); -- -- #~ print Dumper $json->decode( $rsp->content ); -- -- $self->{_links} = $json->decode( $rsp->content ); -- $self->{_links} = $self->{_links}->{'rsp'}; -- if(defined $self->{_links}->{'stat'} && $self->{_links}->{'stat'} eq 'ok'){ -- $self->{_links} = $self->{_links}->{'image'}; -- #clean hash -- foreach (keys %{$self->{_links}}){ -- if($_ eq 'delete_hash' || $_ eq 'image_hash'){ -- delete $self->{_links}->{$_}; -- next; -- } -- if( $self->{_debug_cparam}) { -- print $_.": ".$self->{_links}->{$_}, "\n"; -- } -- } -- #set status (success) -- $self->{_links}{'status'} = 200; -- }else{ -- $self->{_links}{'status'} = $self->{_links}->{'image'}->{'error_msg'}; -+ my $client = LWP::UserAgent->new( -+ 'timeout' => 20, -+ 'keep_alive' => 10, -+ 'env_proxy' => 1, -+ ); -+ -+ eval { -+ -+ my $json = JSON->new(); -+ -+ open( IMAGE, $upload_filename ) or die "$!"; -+ my $binary_data = do { local $/ = undef; <IMAGE>; }; -+ close IMAGE; -+ my $encoded_image = encode_base64($binary_data); -+ -+ my %params = ( -+ 'image' => $encoded_image, -+ ); -+ -+ my @params = ( -+ "https://api.imgur.com/3/image", -+ 'Content' => [%params] -+ ); -+ -+ my $req; -+ if ($username eq $d->get("OAuth") && $self->{_config}->{access_token}) { -+ $req = HTTP::Request::Common::POST(@params, 'Authorization' => 'Bearer ' . $self->{_config}->{access_token}); -+ } -+ else { -+ $req = HTTP::Request::Common::POST(@params, 'Authorization' => 'Client-ID ' . $self->{_config}->{client_id}); -+ } -+ my $rsp = $client->request($req); -+ -+ #~ print Dumper $json->decode( $rsp->content ); -+ -+ my $json_rsp = $json->decode( $rsp->content ); -+ -+ if ($json_rsp->{'status'} ne 200) { -+ unlink $self->{_config_file}; -+ $self->{_links}{'status'} = ''; -+ if (exists $json_rsp->{'data'}->{'error'}) { -+ $self->{_links}{'status'} .= $json_rsp->{'data'}->{'error'} . ': '; - } -- -- }; -- if($@){ -- $self->{_links}{'status'} = $@; -- #~ print "$@\n"; -+ $self->{_links}{'status'} .= $d->get("Maybe you or Imgur revoked or expired an access token. Please close this dialog and try again. Your account will be re-authenticated the next time you upload a file."); -+ return %{ $self->{_links} }; - } - -- #~ } -- -+ $self->{_links}{'status'} = $json_rsp->{'status'}; -+ $self->{_links}->{'direct_link'} = $json_rsp->{'data'}->{'link'}; -+ $self->{_links}->{'deletion_link'} = 'https://imgur.com/delete/' . $json_rsp->{'data'}->{'deletehash'}; -+ $self->{_links}->{'post_link'} = $json_rsp->{'data'}->{'link'}; -+ $self->{_links}->{'post_link'} =~ s/i\.imgur/imgur/; -+ $self->{_links}->{'post_link'} =~ s/\.[^.]+$//; -+ -+ }; -+ if ($@) { -+ $self->{_links}{'status'} = $@; -+ #~ print "$@\n"; -+ } -+ - #and return links - return %{ $self->{_links} }; - } - diff --git a/fix-mail-sendto.patch b/fix-mail-sendto.patch deleted file mode 100644 index cfd6415cc865..000000000000 --- a/fix-mail-sendto.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/shutter-0.93.1/bin/shutter b/shutter-0.93.1/bin/shutter -index a0495d4..656cbe7 100755 ---- a/shutter-0.93.1/bin/shutter -+++ b/shutter-0.93.1/bin/shutter -@@ -6964,7 +6964,7 @@ else { - ); - } - else { -- push( @files_to_email, $session_screens{$key}->{'uri'}->to_string ); -+ push( @files_to_email, $session_screens{$key}->{'long'} ); - } - - my $mail_string = undef; diff --git a/fix-second-instance-crash.patch b/fix-second-instance-crash.patch deleted file mode 100644 index ec84d448694c..000000000000 --- a/fix-second-instance-crash.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 380c313840dd223e5b6c35720a79c338780f42d6 Mon Sep 17 00:00:00 2001 -From: Lionel Miller <delonorm@gmail.com> -Date: Wed, 14 Dec 2016 02:31:52 +0300 -Subject: [PATCH] Fixed segfaults on Manjaro - -On Manjaro Linux, shutter would segfault whenever it would receive -a message from another running instance of itself. This was caused -by the fact that dbus did not handle correctly messages with empty -text. This patch adds an extra check to prevent that. ---- - bin/shutter | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/bin/shutter b/bin/shutter -index a0495d4..f70980c 100755 ---- a/bin/shutter -+++ b/bin/shutter -@@ -442,12 +442,14 @@ else { - #set export filename - } - elsif ( $cmd eq 'exfilename' ) { -- $sc->set_export_filename( $message->get_text ); -+ my $arg = defined $message->get ? $message->get_text : ""; -+ $sc->set_export_filename( $arg ); - - #set delay - } - elsif ( $cmd eq 'delay' ) { -- $sc->set_delay( $message->get_text ); -+ my $arg = defined $message->get ? $message->get_text : ""; -+ $sc->set_delay( $arg ); - - #set include_cursor flag - } -@@ -464,12 +466,13 @@ else { - #set nosession flag - } - elsif ( $cmd eq 'nosession' ) { -- $sc->set_no_session( $message->get_text ); -+ my $arg = defined $message->get ? $message->get_text : ""; -+ $sc->set_no_session( $arg ); - - #open new files - } - elsif ( $cmd eq 'fopen' ) { -- my @init_files = $message->get_uris; -+ my @init_files = defined $message->get ? $message->get_uris : (); - if ( scalar @init_files > 0 ) { - &fct_open_files(@init_files); - } -@@ -483,7 +486,8 @@ else { - #take screenshot - } - else { -- &evt_take_screenshot( 'global_keybinding', $cmd, undef, $message->get_text ); -+ my $arg = defined $message->get ? $message->get_text : ""; -+ &evt_take_screenshot( 'global_keybinding', $cmd, undef, $arg ); - } - } - diff --git a/fix-unicode.patch b/fix-unicode.patch deleted file mode 100644 index 6ed2e9595c23..000000000000 --- a/fix-unicode.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Boyuan Yang <073plan@gmail.com> -Date: Mon, 5 Dec 2016 16:21:51 +0800 -Subject: Force utf8 for retrieved window name from Gtk2. - -Transform the window name retrieved from Gtk2 to utf8 -to prevent messy encoding problem. Otherwise latin-1 -would be used and cause mess. - -This should work on most contemporary systems. - -Signed-off-by: Boyuan Yang <073plan@gmail.com> ---- - bin/shutter | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/bin/shutter b/bin/shutter -index a0495d4..38eeedd 100755 ---- a/bin/shutter -+++ b/bin/shutter -@@ -30,6 +30,9 @@ use utf8; - use strict; - use warnings; - -+#Deal with encoding problem -+use Encode; -+ - #Gnome2 libraries - use Gnome2; - use Gnome2::Wnck; -@@ -8624,7 +8627,9 @@ else { - #add all windows to menu to capture it directly - foreach my $win ( $wnck_screen->get_windows_stacked ) { - if ( $active_workspace && $win->is_on_workspace($active_workspace) ) { -- my $window_item = Gtk2::ImageMenuItem->new_with_label( $win->get_name ); -+ my $win_name = $win->get_name; -+ Encode::_utf8_on( $win_name ); -+ my $window_item = Gtk2::ImageMenuItem->new_with_label( $win_name ); - foreach my $child ( $window_item->get_children ) { - if ( $child =~ /Gtk2::AccelLabel/ ) { - $child->set_width_chars(50); |