[pkg-cinnamon] Bug#761310: Bug#761310: cinnamon-common: The digital photo frame desklet does not recurse into subdirectories

Fabio Fantoni fantonifabio at tiscali.it
Sun Jun 21 11:45:53 UTC 2015


Il 12/09/2014 21:38, Martín Ferrari ha scritto:
> Package: cinnamon-common
> Version: 2.2.16-3
> Severity: wishlist
> Tags: patch
>
> Hi, much to my surprise, the photoframe desklet will not show pictures in
> subdirectories, which is a useful feature if you want to have all your pictures
> shown.
>
> I made a simple patch, but it is probably not the best way, as it takes quite a while to preload all images, but it is a suggestion.

Hi, probably is good post it as PR in upstream git, so will be
considered for 2.8:
https://github.com/linuxmint/Cinnamon/pulls

>
> --- /tmp/desklet.js.orig2	2014-09-12 20:32:48.453444788 +0100
> +++ /usr/share/cinnamon/desklets/photoframe at cinnamon.org/desklet.js	2014-09-12 20:27:21.077437008 +0100
> @@ -113,7 +113,22 @@
>              this.dir_monitor_id = null
>          }
>      },
> -
> +    _scan_dir: function(dir) {
> +        let dir_file =  Gio.file_new_for_path(dir);
> +        let fileEnum = dir_file.enumerate_children('standard::*',
> +                Gio.FileQueryInfoFlags.NONE, null);
> +        let info;
> +        while ((info = fileEnum.next_file(null)) != null) {
> +            let fileType = info.get_file_type();
> +            let fileName = dir + "/" + info.get_name();
> +            if (fileType == Gio.FileType.DIRECTORY) {
> +                this._scan_dir(fileName);
> +            } else {
> +                this._loadImage(fileName);
> +            }
> +        }
> +        fileEnum.close(null);
> +    },
>      setup_display: function() {
>          this._photoFrame = new St.Bin({style_class: 'photoframe-box', x_align: St.Align.START});
>  
> @@ -142,17 +157,7 @@
>          }
>  
>          if (this.dir_file.query_exists(null)) {
> -            let fileEnum = this.dir_file.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
> -            let info;
> -            while ((info = fileEnum.next_file(null)) != null) {
> -                let fileType = info.get_file_type();
> -                if (fileType != Gio.FileType.DIRECTORY) {
> -                    this._loadImage(this.dir + "/" + info.get_name());
> -                }
> -            }
> -
> -            fileEnum.close(null);
> -            
> +            this._scan_dir(this.dir);
>              this.updateInProgress = false;
>              this.currentPicture = null;
>              this._update_loop();
>
>
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers testing
>   APT policy: (500, 'testing'), (100, 'unstable'), (50, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages cinnamon-common depends on:
> ii  dconf-gsettings-backend [gsettings-backend]  0.20.0-2
> ii  gir1.2-meta-muffin-0.0                       2.2.6-3
> ii  python                                       2.7.8-1
> ii  python-pil                                   2.5.3-1
>
> cinnamon-common recommends no packages.
>
> cinnamon-common suggests no packages.
>
> -- no debconf information
>
> https://lists.alioth.debian.org/mailman/listinfo/pkg-cinnamon-team
> to unsubscribe: mailto:pkg-cinnamon-team-request at lists.alioth.debian.org?subject=unsubscribe
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4297 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.alioth.debian.org/pipermail/pkg-cinnamon-team/attachments/20150621/4f66b1d5/attachment.bin>


More information about the pkg-cinnamon-team mailing list