Re: FileSelection



Le Mercredi 5 Mars 2003 16:42, muppet a Ãcrit :
On Wed, 2003-03-05 at 09:35, Jean-Marc Frigerio wrote:
Hi,
I use the wonderfull Gtk::FileSelection ; and I nearly succeed in doing
what I want but now I would like to connect the button of a CList
(Gtk::FileSelection->file_list)

from a quick perusal of the docs (i'm late for work):

       Gtk::Widget $clistâ>get_column_widget ($column)

looks like it gives you access to a particular GtkCListColumn.  one of
the members of the GtkCListColumn (according to the C docs) is
"button".  you should be able to connect any signal handler to "clicked"
on this widget.

OK, This is the theory but 
print $file_dialog->file_list->get_column_widget(0);
 returns a Gtk::Alignment

unfortunately, there is no mention of CListColumn or even Column in
Gtk::reference. so it looks like you either get to hack at the C source
for the perl bindings, 

I'am unable to do that

or try a little black magic (see if you can
decompose the widget returned by get_column_widget to find the button).

Done, but what to do with an Gtk::Alignment ???

that said, the only really useful thing to do with the button atop a
clist column is changing the sort order, which i thought GtkCList is
supposed to be able to do for you (i may be mistaken).
what did you have in mind?

My mind is to have a select_all connected to this button

also keep in mind that code you write around the CList for Gtk+ 1.2 will
be pretty much thrown away if/when you move to Gtk+ 2.x, whose file
selector uses GtkTreeView/GtkListModel.  (i spent a good three hours
last night hacking up a gimp-like image preview pane in a
GtkFileSelection for a C app...)

OOOPPSS, this is the good answer may thanks !!!!

Jean-Marc




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