vhermecz / key-mon

Automatically exported from code.google.com/p/key-mon
Apache License 2.0
0 stars 0 forks source link

"keymon --theme=foo" is very intolerant #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. keymon --theme=foo

Please provide any additional information below.
Result:
--snip--
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/keymon/key_mon.py", line 744, in main
    keymon = KeyMon(opts)
  File "/usr/lib/python2.5/site-packages/keymon/key_mon.py", line 118, in __init__
    self.create_window()
  File "/usr/lib/python2.5/site-packages/keymon/key_mon.py", line 239, in create_window
    self.mouse_indicator_win = shaped_window.ShapedWindow(self.svg_name('mouse-indicator'))
  File "/usr/lib/python2.5/site-packages/keymon/shaped_window.py", line 39, in __init__
    self.pixbuf = self.pixbufs.get('mouse')
  File "/usr/lib/python2.5/site-packages/keymon/lazy_pixbuf_creator.py", line 63, in get
    name = self.create_pixbuf(name)
  File "/usr/lib/python2.5/site-packages/keymon/lazy_pixbuf_creator.py", line 80, in create_pixbuf
    img = self._composite(img, self._read_from_file(operation))
  File "/usr/lib/python2.5/site-packages/keymon/lazy_pixbuf_creator.py", line 109, in _read_from_file
    return gtk.gdk.pixbuf_new_from_file(fname)
glib.GError: Failed to open file 
'/usr/lib/python2.5/site-packages/keymon/themes/foo/mouse-indicator.svg': No 
such file or directory
--snip--

AND what's even worse: I can't Ctrl+C out of this scenario! (I did Ctrl+Z and 
then "kill %1".)

I believe there should be a simple try/catch around that. Something like in 
list_themes, but something that actually works (see other ticket). ;-)

Original issue reported on code.google.com by mbst...@googlemail.com on 20 Sep 2010 at 1:56

GoogleCodeExporter commented 8 years ago
I've noticed this as well, some crashed I have to kill the process, something 
to do with pygtk loop.

I'll just fix the simple bug, if I can fix the Ctrl-C problem in passing I'll 
do that too.

Original comment by scottaki...@gmail.com on 20 Sep 2010 at 2:30

GoogleCodeExporter commented 8 years ago
Added check.

Original comment by scottaki...@gmail.com on 21 Sep 2010 at 2:10

GoogleCodeExporter commented 8 years ago
This is much better in key-mon 1.4.1. Your fix works for me.

> key-mon --theme=foo
Theme 'foo' does not exist

Thanks for the quick fix!

Original comment by mbst...@googlemail.com on 22 Sep 2010 at 11:55