Re: [pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-28 Thread Nigel Tao
How do I get rid of the border?

menubar.set_property(shadow-type, gtk.SHADOW_NONE)

I tried this, and got:

Traceback (most recent call last):
  File ./browser-bookmarks-menu.py, line 212, in ?
applet_factory(applet, None)
  File ./browser-bookmarks-menu.py, line 94, in applet_factory
menubar.set_property(shadow-type, gtk.SHADOW_NONE)
TypeError: the object does not support the given parameter


I poked around for a bit, and tried:
print menubar.get_property(shadow-type)
and again got an error:
TypeError: the object does not support the given parameter


tried a different method with style_ in it:
print menubar.style_get_property(shadow-type)
and now got:
enum GTK_SHADOW_OUT of type GtkShadowType


but there is no corresponding style_set_property method.


Any ideas?  I have gnome-python 2.6.0.

tia,
Nigel.

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-28 Thread Gustavo J. A. M. Carneiro
Qui, 2004-10-28 às 22:46 +1000, Nigel Tao escreveu:
 How do I get rid of the border?
 
 menubar.set_property(shadow-type, gtk.SHADOW_NONE)
 
 I tried this, and got:
 
 Traceback (most recent call last):
   File ./browser-bookmarks-menu.py, line 212, in ?
 applet_factory(applet, None)
   File ./browser-bookmarks-menu.py, line 94, in applet_factory
 menubar.set_property(shadow-type, gtk.SHADOW_NONE)
 TypeError: the object does not support the given parameter
 
 
 I poked around for a bit, and tried:
 print menubar.get_property(shadow-type)
 and again got an error:
 TypeError: the object does not support the given parameter
 
 
 tried a different method with style_ in it:
 print menubar.style_get_property(shadow-type)
 and now got:
 enum GTK_SHADOW_OUT of type GtkShadowType
 
 
 but there is no corresponding style_set_property method.
 
 
 Any ideas?  I have gnome-python 2.6.0.

  I'm sorry.  I hadn't noticed it is a style property.  I don't know if
there's any better way, but at least you can use gtk.rc_add_default_file
(/foo/bar/gtkrc.myapplication), and put the style properties there.
You have to read about rc file syntax in gtk+ documentation.

 
 tia,
 Nigel.
 
 ___
 pygtk mailing list   [EMAIL PROTECTED]
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
[EMAIL PROTECTED] [EMAIL PROTECTED]
The universe is always one step beyond logic.


smime.p7s
Description: S/MIME cryptographic signature
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-28 Thread Johan Dahlin
tor 2004-10-28 klockan 22:46 +1000 skrev Nigel Tao:
 How do I get rid of the border?
[..]
 tried a different method with style_ in it:
 print menubar.style_get_property(shadow-type)
 and now got:
 enum GTK_SHADOW_OUT of type GtkShadowType
 
 
 but there is no corresponding style_set_property method.

style properties are read only.

You can change it using something like this:

style menubar-style { 
GtkMenuBar::shadow_type = etched-in 
}
 
class GtkMenuBar style menubar-style

Pass it on to gtk.rc_parse_string().

-- 
Johan Dahlin [EMAIL PROTECTED]

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-28 Thread Johan Dahlin
 You can change it using something like this:
 
 style menubar-style { 
 GtkMenuBar::shadow_type = etched-in 
 }
  
 class GtkMenuBar style menubar-style
 
 Pass it on to gtk.rc_parse_string().

Added as FAQ 4.18:
http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq04.018.htp

-- 
Johan Dahlin [EMAIL PROTECTED]



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-27 Thread Nigel Tao
This is mostly an announcement, but it's also 1) my first foray into GNOME hacking and 
2) only my second foray into Python, and I am hoping for a little help, or some 
general feedback.



Gnome has an Applications menu, and an Actions menu.  I wrote a Bookmarks menu, to get 
to my browser's bookmarks.  This idea seems to have been tried before (see RELATED 
WORK section below), but various similar projects appear out-of-date or incomplete.

A screenshot is worth a thousand words, and is at 
http://browserbookapp.sourceforge.net/screenshot-0.1.png



Source code (GPL) is at 
http://sourceforge.net/project/showfiles.php?group_id=122136package_id=133931release_id=278276





CAVEATS
---
Right now it only reads Firefox bookmarks.  Support for Epiphany and Mozilla is 
planned.


HELP!  (AKA GNOME API AND OTHER QUESTIONS)

--

The menu (or applet?) has a border around it, but the gnome main menu applet 
Applications Actions menu does not.  The screenshot shows this (see the vertical 
bars to the left and right of the blue Bookmarks menu).  How do I get rid of the 
border?

I'm not fluent in [auto]make or RPM .spec files, and would appreciate some help.  I 
found the pygnome-hello example and am looking at that, but it isn't a panel applet, 
so I am not entirely sure how to adapt it to:
1) install my .server file into the right place (/usr/lib/bonobo/server in general, 
but .../lib64/... on x86_64).
2) restart whatever needs to be restarted (gnome-panel?? bonobo-activation-server??) 
on installation for it to show up in the Add to Applet option in the panel context 
menu.

Also, any leads on writing a .spec file or packaging a python gnome-applet as an RPM?  
I am completely lost in figuring out what the dependencies are - I presume 
gnome-panel, gnome-python2 and gnome-python2-applet - but how do I find out what else 
(and what versions) my software depends on?  And is the gnome-python / 
gnome-python-applet distinction a distribution-specific thing?





RELATED WORK



An old (1999) mailing list post talks about creating a Netscape Bookmarks sub-menu of 
the foot menu 
(http://mail.gnome.org/archives/gnome-devel-list/1999-September/msg00024.html) - 
Miguel de Icaza replied that it seems a very good idea, but I don't know where it 
went from there.  PyGnome 1.4 had a Netscape bookmarks applet 
(pygnome/examples/bookmarks-applet.py), but this seems to have been dropped in more 
recent versions of gnome-python.



Gnome Bookmarks Organizer (gnobog) at http://www.nongnu.org/gnobog/ is slightly 
different (it has its own frame rather than being a panel applet) and looks like it's 
been superseded by Firefox's Bookmarks sidebar.



The Nautilus-Menu applet (http://bitpoetry.com/programs/nautilusmenu/) and 
bookmark-applet (http://gnomefiles.org/app.php?soft_id=278) look pretty similar, but 
they provide access to GTK file-chooser bookmarks (local files), not provide access to 
the browser bookmarks (URLs).





cheers,

Nigel.

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Browser Bookmarks Menu (Gnome Applet) 0.1

2004-10-27 Thread Gustavo J. A. M. Carneiro
On Wed, 2004-10-27 at 23:51 +1000, Nigel Tao wrote:
 This is mostly an announcement, but it's also 1) my first foray into
 GNOME hacking and 2) only my second foray into Python, and I am hoping
 for a little help, or some general feedback.
 
 
 
 Gnome has an Applications menu, and an Actions menu.  I wrote a
 Bookmarks menu, to get to my browser's bookmarks.  This idea seems to
 have been tried before (see RELATED WORK section below), but various
 similar projects appear out-of-date or incomplete.
 
 A screenshot is worth a thousand words, and is at
 http://browserbookapp.sourceforge.net/screenshot-0.1.png

  Cool!

 
 
 
 Source code (GPL) is at
 http://sourceforge.net/project/showfiles.php?group_id=122136package_id=133931release_id=278276
 
 
 
 
 
 CAVEATS
 ---
 Right now it only reads Firefox bookmarks.  Support for Epiphany and
 Mozilla is planned.

  What about Galeon?! :)
Galeon uses XBEL, and official bookmarks XML standard.

 
 
 HELP!  (AKA GNOME API AND OTHER QUESTIONS)
 
 --
 
 The menu (or applet?) has a border around it, but the gnome main menu
 applet Applications Actions menu does not.  The screenshot shows
 this (see the vertical bars to the left and right of the blue
 Bookmarks menu).  How do I get rid of the border?

  menubar.set_property(shadow-type, gtk.SHADOW_NONE)

 
 I'm not fluent in [auto]make or RPM .spec files, and would appreciate
 some help.  I found the pygnome-hello example and am looking at that,
 but it isn't a panel applet, so I am not entirely sure how to adapt it
 to:
 1) install my .server file into the right place

  An potential example for installing .server files 

  (/usr/lib/bonobo/server in general, but .../lib64/... on x86_64).

  Hm.. I doubt that .server files need to be installed in a lib64 dir.
And I doubt even more that bonobo picks them up if you do.  Anyway, you
should simply let autoconf figure it out by using the expression
$libdir/bonobo/servers in the Makefile.am.

 2) restart whatever needs to be restarted (gnome-panel??
 bonobo-activation-server??) on installation for it to show up in the
 Add to Applet option in the panel context menu.

  I think it shows up in the menu immediately, at least with latest
libbonobo.  Nothing needs to be restarted.

 
 Also, any leads on writing a .spec file or packaging a python
 gnome-applet as an RPM?  I am completely lost in figuring out what the
 dependencies are - I presume gnome-panel, gnome-python2 and
 gnome-python2-applet - but how do I find out what else (and what
 versions) my software depends on?

   And is the gnome-python / gnome-python-applet distinction a
 distribution-specific thing?

  Yes, it's a distribution-specific thing.  The official packages are
pygtk and gnome-python.

 
 
 
 
 
 RELATED WORK
 
 
 
 An old (1999) mailing list post talks about creating a Netscape
 Bookmarks sub-menu of the foot menu
 (http://mail.gnome.org/archives/gnome-devel-list/1999-September/msg00024.html) - 
 Miguel de Icaza replied that it seems a very good idea, but I don't know where it 
 went from there.  PyGnome 1.4 had a Netscape bookmarks applet 
 (pygnome/examples/bookmarks-applet.py), but this seems to have been dropped in more 
 recent versions of gnome-python.
 
 
 
 Gnome Bookmarks Organizer (gnobog) at http://www.nongnu.org/gnobog/ is
 slightly different (it has its own frame rather than being a panel
 applet) and looks like it's been superseded by Firefox's Bookmarks
 sidebar.
 
 
 
 The Nautilus-Menu applet (http://bitpoetry.com/programs/nautilusmenu/)
 and bookmark-applet (http://gnomefiles.org/app.php?soft_id=278) look
 pretty similar, but they provide access to GTK file-chooser bookmarks
 (local files), not provide access to the browser bookmarks (URLs).
 
 
 
 
 
 cheers,
 
 Nigel.
 
 ___
 pygtk mailing list   [EMAIL PROTECTED]
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
[EMAIL PROTECTED] [EMAIL PROTECTED]
The universe is always one step beyond logic

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/