[Xfc-dev] xfc questions

Jeff Franks jcfranks at tpg.com.au
Wed Aug 17 05:32:20 CEST 2005


Xavier Otazu wrote:

>	Hi Jeff,
>
>	These days I was developing a simple graphical client for the
>new xmms2 server. I realized that Xfc are a really great and a
>tremendous amount of work to be developed by just one person.
>Congratualtions !!!
>
>While using Xfc, some questions about xfc 4.3.1 (stable release) arose:
>
>
>- When defining a button image it is mandatory to define its label.
>  
>
No. There are two image constructors:

Button(Widget& image);
Button(Widget& image, const String& label, bool use_underline = false);

The first sets a user defined image with no label. The second sets a 
user defined image with a label. The label can optionally have a 
mnemonic character in it, such as '_Close', if use_underline is set to true.

>When rendering the new button image, button size changes because of the
>label even when it is defined as a "" string.
>
>  
>
This is a GTK+ issue. If your never set any button label text GTK does 
not create a label widget. Once you set the button text a label widget 
is created for the text. Thereafter, even if you reset the label to "", 
the  label widget is still there, taking up space, and wont be destroyed 
until the button is destroyed.

>- In treeview how-to, example code of TreePath is a CellRenderer
>example code.
>  
>
Fixed.

>- When user reorders treeview rows, liststore model emits row_changed
>instead of rows_reordered signal.
>  
>
This is a GTK+ issue. Maybe this will help: 
http://mail.gnome.org/archives/gtk-perl-list/2003-September/msg00197.html. 
Let me know.

>- It is not possible to compile a static executable because libXFCglade
>only exists as shared library. I receive:
>
>/usr/local/bin/ld: cannot find -lXFCglade-4.3
>  
>
By default XFC static builds are disabled. If you want to build a static 
executable you have to run ./configure with the --enable-static option.

>- How to resize frame window when inner widgets are resized? I have a
>treeview inside a scrollendwindow which is inside an expander. When
>changing model text, columns are resized, but nor scrollwindow
>nor expander neither main window are resized. User has to resize main
>window manually. I've tried RESIZE_PARENT on all these widgets, but it
>doesn't work.
>
>  
>
This is programming issue. You have to set the scrollbar policy for the 
scrolled window. The default is GTK_POLICY_ALWAYS which means that both 
the horizontal and vertical scrollbars will always appear and be used. 
Call Gtk::ScrolledWindow::set_policy(Gtk::POLICY_NEVER, 
Gtk::POLICY_AUTOMATIC).  Gtk::POLICY_NEVER means that the horizontal 
scrollbar will never appear and the parent widgets will be resized 
whenever the text is longer than the treeview's width. 
Gtk::POLICY_AUTOMATIC means that the vertical scroll will only appear 
whenever the list is longer than the window's height.

>- How to create systray icon?
>  
>
This is a desktop environment issue so if your using Xfce try asking on 
Xfce4-dev. I really don't know... but I can tell you how to do on Windows.

>- I 'sense' a connection between uimanager and glade Xml parser object.
>  
>
No you don't... there isn't one.

>Since only one uimanager should exist in the application, what
>uimanager should we use to work with actions? Does a xml object contain
>an instance of a uimanager?
>  
>
No, GladeXml doesn't contain an instance of GtkUIManager. You create 
your own Gtk::UIManager instance for your application only if you are 
using GtkAction based menus and toolbars. If you are using glade to 
build your menus you have to retreive a C++ pointer to each menu item by 
'name' and connect a function to its signal_activate() signal. There are 
examples of doing this in glade examples and the Glade::Xml header file.

>
>- In tutorial/html/chapter08.html, first paragraph in 'configure.ac':
>"A configure.ac file must in the..." -> "A configure.ac file must 'be'
>in the..."
>  
>
Aah, to be or not to be... fixed.

Jeff.




More information about the Xfc-dev mailing list