[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: libglobalhotkeys-ruby (new upstream version)



Vincent Carmona escreveu isso aí:
> 2011/2/15 Antonio Terceiro <terceiro@softwarelivre.org>:
> > Hello Vincent,
> >
> Hello Antonio and thanks for your reply.
> >
> > I cannot upload your package, but I checked it and find some minor
> > issues that we could consider changing.
> >
> > You package installs a useless README file that only contains build
> > instructions (which the Debian package users don't need at all).
> 
> The README file is shipped with the upstream sources. Should I remove
> it from the debian package? How?

cdbs automatically installs some commonly-named files. You can override
it by setting DEB_INSTALL_DOCS_ALL in debian/rules before the point
where debhelper.mk is included. That's probably coverde by the CDBS
docs.

> > It seems to me that libglobalhotkeys-ruby is not usable without
> > libgtk2-ruby. The example you install at
> > /usr/share/doc/libglobalhotkeys-ruby explicitly requires it, and the
> > sample code snippet in the rdoc does not seem to work either.  Shouldn't
> > you upgrade the relationship between them to Depends instead of
> > Recommends?
> 
> The code was never tested without Gtk2 but it includes no gtk
> functions only gdk ones (on a C level). It does not depends on the
> ruby binding of gtk. I suppose it could be used with an other
> graphical toolkit (i.e. Qt) but tests (and debugging) are needed.
> Should I upgrade to Depends for now?

As far as I understood, the functionality in libglobalhotkeys-ruby will
only work if I have a Gtk application running (i.e. Gtk.init and
Gtk.main were called), right? Because that's was the only way I could
get the example in the rdoc to work:

  1 require 'gtk2'
  2 require 'globalhotkeys'
  3 Gtk.init
  4 
  5 kb = GlobalHotKeys::KeyBinder.new
  6 kb.bind(GlobalHotKeys::KeyVal.from_name('a'),  GlobalHotKeys::Modifier::CONTROL_MASK){puts 'Ctrl+A pressed'}
  7 
  8 kb2 = GlobalHotKeys::KeyBinder.new
  9 kb2.bind(GlobalHotKeys::KeyVal.from_name('q'),  GlobalHotKeys::Modifier::CONTROL_MASK){puts 'Bye'; Gtk.main_quit}
 10 
 11 Gtk.main
 12 
 13 kb.unbind
 14 kb2.unbind

When I comment out the Gtk-related lines (lines 1, 3 and 11 above), the
code does not crash, but I get a lot of Gtk-related warnings, and it
does not work at all.

But note that I do not know globalhotkeys' code in detail, so I might be
missing something.

But if it really only works witk Gtk, I would make libglobalhotkeys-ruby
_depend_ on libgtk2-ruby instead of recommending it. When you manage to
have the lib tested against QT, you can change the dependency to
`libgtk2-ruby1.8 | libqt4-ruby1.8` or something like that ...

> > Also, that code snippet in the documentation of the GlobalHotKeys module
> > has a typo: s/frome_name/from_name/ should fix it (note the extra "e").
> 
> This error is corrected (in a private git repository) but not yet
> included on a upstream release.
> Do you think I should shipped a new upstream release for a typo?

I don't think a new upstream release is needed only because of that
typo.

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro


Attachment: signature.asc
Description: Digital signature


Reply to: