Main index > About existing desklets > photo

By GoLDie (Desklet Author), on Tue Oct 25 03:20:00 2005: photo.

This is a picture viewer. Feel free to use and test it.

By MrGreen (User), on Sun Nov 27 09:56:27 2005.

Hi,

Great adesklet ;-)

I would like to display name of photo only

How do I remove the .jpg from filename ?

By GoLDie (Desklet Author), on Sun Nov 27 13:17:17 2005.

first, in the photo.py
add to the ninth line: , splitext

Code:

from os.path import join, dirname, split, splitext

next (class Events: display definition):
line 181 should look like this:

Code:

path, file = split(self.photo_desklet.actfile())
filename, ext = splitext(file)
adesklets.text_draw(0,self.config['height']+5,filename)


simply add the second line and in the third change "file" to "filename" on the end

By MrGreen (User), on Sun Nov 27 13:50:06 2005.

Thank you very much.....

I may try to make photo size smaller (frame size I can change in config!)

so I may display backgrounds, screenshots etc....

Great adesklet

MrGreen

By NET (User), on Mon Mar 6 02:55:43 2006.

Hi,

i installd adesklet photo-0.0.5, it works i can start it. But how do i load images in there?

i raead it the readme.txt file, it says:

Quote:


How to run:
First use this in the photo desklet directory:
find /path/to/images -name '*.jpg' | sort > files.list
The new file should be like this:
<filename_without_spaces><dot><extension_without_spaces>
After that simply run photo.py.
Of course you can create more than one filelist.
To add them to the desklet simply change the config.txt:
'filelists': ['files.list', 'other.list', 'my_new.list'].
'files' loads the first filelist, you don't have to add this
filelist to 'filelists'.


Al my images r in other directory /home/net/images . Do i have to create some file.list file?

if so how do i do that? :?

By GoLDie (Desklet Author), on Mon Mar 6 14:05:34 2006.

NET wrote:

Al my images r in other directory /home/net/images . Do i have to create some file.list file?

if so how do i do that? :?


Hi,
use this command:

Code:

find /home/net/images -name '*.jpg' > files.list

and copy files.list into the photo directory.
next, edit the config.txt, two lines should look like this:

Code:

'filelists': ['files.list'],
'files': 'files.list'

if you have more than one list, you can change the 'filelists', for example:

Code:

'filelists': ['files.list', 'other_list.list']

By NET (User), on Mon Mar 6 15:07:26 2006.

Thanks, it works.

By pascal.peter (User), on Mon May 1 03:01:27 2006: My changes to photo.

The changes which I made prevent having to enter the list of all the images in the file files.list, and especially of having to modify it each time that one wants to add an image.

This one contains nothing any more but the directory of the images than I want to use.

What it should be modified if you want to do it:

in the file photo.py

line 8

Code:

from os import getenv, spawnlp, P_NOWAIT

become

Code:

from os import getenv, spawnlp, P_NOWAIT, listdir


lines 42 and 43

Code:

        def __call__(self):
                self._file_list=self.loadfile(join(self.basedir,self.config['files']))


become

Code:

        def __call__(self):
                #self._file_list=self.loadfile(join(self.basedir,self.config['files']))
                # changes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                d = self.loadfile(join(self.basedir,self.config['files']))
                l = listdir(d[0])
                ll = []
                for f in l :
                    ff = join(d[0],f)
                    ll.append(ff)
                self._file_list = ll
                print self._file_list
                # end !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



files.list contains only the following line

Code:

/home/pascal/Images/fondecran


and I place my images there

Sorry for my bad english

By GoLDie (Desklet Author), on Mon May 1 05:20:32 2006.

Thanks for this post.
I'll include this, but i change this little.
The problem is, if someone want to add only one or more images from a dir (not a whole dir).
So, I write a 'if' statement to check the list for files and dirs.
I hope, there is an 'is_dir' in python ;)

By nandan (User), on Wed May 10 06:41:13 2006: Why photo desklet hides the normal desktop icons on desktop.

Hi All,

I am new to this fourm. I am a newbie for linux. I am using adesklets photo.py and it is working fine. But It hides the desktop icons. I want it to apper like a wallpaper which never hides any desktop icon.

Is anybody there to help me ????

Thanks in advance....!!!!

By syfou (Core Developer & Desklet Author), on Thu May 11 01:29:15 2006.

Hi nandan,

adesklets is not the best tool for this since, as you pointed out, it will potentially hides things such as icons, depending of the Windows Manager you chose (not talking about overlaps between desklets themselves, or the waste of system resources). There is very little to be done: desklets were only made to be little, unobtrusive things...

But don't worry -- It seems that what you want is a background changer, which is something fairly easy to shell script. to suit your exact needs. Just let me know what is your Windows Manager (or Desktop Environment, as a few projects liked to be called), and I will give you pointers. Yours,

By nandan (User), on Fri May 12 09:29:15 2006.

Hi Sylvain,

Thanks for your reply. It's a good idea to make a wallpaper changer. But right now I don't want to make a wallpaper changer. What I need is

1. photo.py desklet must be run in any size that is less than the full screen.
2. It must not hide the desktop icons.

I am using redhat9.0 and uses the command

python ./photo.py --nautilus

to run the desklet. My desktop environment is gnome.

It is a good utility and I think it must be enhanced. It would be nice if desktop icons can be shown at top of this in z order.

Thanks

By syfou (Core Developer & Desklet Author), on Fri May 12 13:51:05 2006.

Sorry nadan, but unfortunately what you ask is just impossible, because there is no such things as Z order here. In GNOME, nautilus draws everything in a single top-level window: background, icons, etc. This means that icons are not "separated" from the background from the external application point of view (well, that's technically not entirely true, but not in a way that can be exploited for ordering), and that you cannot "insert" another client window between the background and icons.

This doesn't mean that having some sort of photo montage as background is out of reach: it only means that the smaller photos cannot possibly originate from outside of nautilus: a background changer could very well dynamically compose such montages for you, then feed them to nautilus...

By nandan (User), on Mon May 15 00:41:03 2006.

Hello Sylvain,

It was nice to read you.
you worte :
This doesn't mean that having some sort of photo montage as background is out of reach: it only means that the smaller photos cannot possibly originate from outside of nautilus

I know only nautilus or any other desktop environment which one use is responsible for managing the window in Z order. But can you give me the pointers so that I can modify the code of desktop environment to fulfill my need I have the source code of xffm and xfce and I can experiment with them on my machine.

If you can help me in inserting the photo between wallpaper and desktop icons. Or you know where I can get help for his please let me know about it.

Thanks

By syfou (Core Developer & Desklet Author), on Mon May 15 03:29:04 2006.

Hi nandan,

at the risk of being pedantic, I will try to clear up what seems to be a slight misconception:

nadan wrote:


I know only nautilus or any other desktop environment which one use is responsible for managing the window in Z order.

nautilus is merely managing the desktop (background + icons), as a single window: it is a "desktop composer". In the most common GNOME setting, metacity is the windows manager, responsible for managing all the windows (Z ordering, decorations, etc), including the one from nautilus: the key point to keep in mind is that the background and icons are rendered as a single window composed by nautilus, thus are indistinguishable by the WM, hence the problem here.

nadan wrote:


But can you give me the pointers so that I can modify the code of desktop environment to fulfill my need I have the source code of xffm and xfce and I can experiment with them on my machine.

If you can help me in inserting the photo between wallpaper and desktop icons. Or you know where I can get help for his please let me know about it.

Well, the good news is that you don't have to go as far as modifying the source of any desktop composer such as xffm or nautilus to do something like that. The trick is simply to: The easiest way to perform the first step is to use a command-line oriented graphic editor -- my personal favorite is ImageMagick... Composing images is made extremely simple using the composite command from this package: here is a simple tutorial. As for the second step, it is usually easy to notify the desktop composer of a background change. For nautilus, use gconftool (or gconftool-2, depending of your system -- this is part of GNOME gconf package) by issuing a command such as:

Code:


gconftool-2 /apps/nautilus/preferences/background_filename -t string \
            -s /path/to/new/background_image


I hope this was enough to get you on the right track; just let me know if I were unclear or if you need more info. Yours,

By nandan (User), on Thu May 18 02:26:11 2006: How to change default desklet position.

Hi to all
Plz anybody suggest me the way to change the default location (0,0) of photo desklets to other location like (100,100)

Thanks in advance

By syfou (Core Developer & Desklet Author), on Thu May 18 02:59:04 2006.

Look here, nadan.

By nandan (User), on Thu May 18 05:30:22 2006: Thanks sylvain.

Thanks a lot sylvain for your quick response .but i am still unable to change location of
desklets.I have changed as per the instructions mentioned on the site.
But it doesnt effective with my photo desklets.
Please suggest me ....wht should i do next .....

By syfou (Core Developer & Desklet Author), on Thu May 18 15:00:38 2006.

What exacly goes wrong, nadan? You are not able to get the contextual (right click) menu? Please explain in greater lenghts.

By nandan (User), on Fri May 19 02:06:38 2006: Thanks sylvain.

Hi sylvain Good morning
Thanks for your advice.....
i successfully changed the default location of photo desklet but through src/cfgfile.c
i want to change the deafault location dynamically ...............means before starting of
any desklet it must ask default location then display on that entered location by user.

again thanks for ur good advices

By syfou (Core Developer & Desklet Author), on Fri May 19 02:27:00 2006.

Hi nadan, and good (canadian) late evening... We are bound to speak at weird hours like that. :-D

The $HOME/.adesklets configuration file contains the complete desklets layout: what desklet script to start, under what numeric id, on what screen, and on what position. It is perfectly safe to change it any way you want before invoking adesklets as a launcher.

By nandan (User), on Fri May 19 05:55:08 2006.

Hi sylvain
i am bit confused about ~/.adesklets file see ...
1) i removed ~/.adesklets files
2) change default location entry in src/cfgfile (200 , 200 )
3) Then i started my photo desklet
4) i found an entry as follows ....
[/home/nandan/photo.py ]
id=0 screen=0 x=0 y=0
why ?
and i am also making some simple window using adesklets but that window displayed
on the ( 0,0 ) and No entry made in ~/.adesklets file

By syfou (Core Developer & Desklet Author), on Fri May 19 15:50:31 2006.

Hi nandan,

nandan wrote:


Why?

I have no idea. Since I do not know what you exactly did with the source code, it is hard for me to guess what happens... In my opinion, you do not need to play with the source code for this, so don't.: just use a stock release for now.

nandan wrote:


3) Then i started my photo desklet

Since you have special needs, just skip the normal desklet registration mechanism altogether: all it does is generating new entries in $HOME/.adeslets: you can as well re-generate the file yourself with the entries you want, including the desklets positioning that you desire... Don't be shy, change it. ;-)

nandan wrote:


and i am also making some simple window using adesklets but that window displayed on the ( 0,0 ) and No entry made in ~/.adesklets file

I am not sure I understand what you are actually doing: to have an entry registered, you need a working script, and you need to make it executable... Does it solves this problem? If it doesn't, please re-explain me this part. Yours,

By vikas (User), on Mon May 22 01:59:19 2006: Hi to All.

Hi friends and Author Sylvain
I am having a problem with .gif file.It couldn't play with photo desklets
Why ? Even Photo desklets is having grate capability ..............

Thanks

By syfou (Core Developer & Desklet Author), on Mon May 22 02:26:01 2006.

Hi vikas,

the fact that you cannot load gif images just means that your installment of Imlib2 was not built with gif support: just rebuild Imlib2 against giflib, and these files will load as well. Yours,

_________________
Sylvain

P.-S. I wrote adesklets: Lukasz Holetzke (GoLDie) wrote photo.

By sberla54 (User), on Mon Sep 25 10:04:02 2006.

Hi dudes!

I write to say you all that i really enjoyed the "photo" desklets....now it's the most beautiful piece of my desktop :)

I'd just like to know if there's a way to display gif, bmp and png images too....is it possibile?

I've red your post too and i've seen that it's possible to use a folder instead of updating the file.list....what should i do?
I tried what pascal.peter wrote but it didn't work for me....

See ya.
I'll wait for your answers :)

By GoLDie (Desklet Author), on Mon Sep 25 13:37:09 2006.

I'm really sorry,
I don't have too much time now, but, in a week, mayby two, I'll spend some time on the desklet.

Too many months and I forgot how to write in python ;)

By GoLDie (Desklet Author), on Wed Oct 4 19:10:06 2006.

just a beta release:
http://www.drama.pl/~goldie/photo-0.0.6-beta.tar.bz2

Some changes:

By MoB (User), on Thu Oct 5 08:17:17 2006.

I have a problem with this script. I'm using it with to show the currently playing songs front and back covers on desktop (Amarok with 'nowplaying' -script). Only problem is that when the song (and pictures) changes the script won't notice that and keeps showing the same old pictures. It somehow buffers the pictures and that's not good.
How can I fix this?
I'm using the latest beta version.

By GoLDie (Desklet Author), on Thu Oct 5 08:32:17 2006.

MoB wrote:

I have a problem with this script. I'm using it with to show the currently playing songs front and back covers on desktop (Amarok with 'nowplaying' -script). Only problem is that when the song (and pictures) changes the script won't notice that and keeps showing the same old pictures. It somehow buffers the pictures and that's not good.
How can I fix this?
I'm using the latest beta version.


Normally when loading images from disk imlib tries to cache it.
You can change it of course. Look at line 51 (in 0.0.6-beta):

Code:

ret = adesklets.load_image(kw['file'])

Change it to

Code:

ret = adesklets.load_image_without_cache(kw['file'])

I haven't tried it yet but it should work.

I'll add an option to the config in nearly future.
The 0.0.6 version should have it when it comes out.

By MoB (User), on Thu Oct 5 08:46:46 2006.

GoLDie wrote:

Code:

ret = adesklets.load_image_without_cache(kw['file'])

I haven't tried it yet but it should work.


That did the trick. Thank you so much.

By nbabs (User), on Fri Jan 5 01:38:45 2007.

Hi everybody,


I would like to know about to set the background color totally transparent in order to see my wallpaper when pictures with landscape format are displayed?

Thanks in advance.

Nicolas

By sberla54 (User), on Wed Mar 7 20:39:46 2007.

Hi dude, i'm back!

Did you have some time to upgrade a little bit more your amazing adesklets?

I didn't saw the beta version since now...i'm gonna try it as soon as i can....but i really need another stable release :)


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.