Re: [gtk-list] Re: Icons and DnD?



On Tue, Jun 02, 1998 at 03:04:22AM +0000, Marsel Osipov wrote:
> Hmm....Check my code...it's c++ but really easy to understand
> 
> void VFileManager::ShowFileIcon(VFmStruct *file)
> {
>   cout << "called ShowFileIcon()" << endl;
>   Gtk_VBox pbox(false, 0); // pixmap box
>   Gtk_EventBox eventbox; // eventbox
> 
>   eventbox.add(file->icon); // add the file icon to the eventbox
>   pbox.pack_start(&eventbox, FALSE, FALSE, 0); // pack the eventbox into the VBox
>   Gtk_Label file_l(file->name); // new label
>   pbox.pack_start(&file_l, FALSE, FALSE, 3); // pack the name of the file into the VBox
> 
>   // add icon
> 
>   // show icon
>   eventbox.show();
>   pbox.show();
>   file_l.show();
>   file->icon->show();
> }

Hmm...  Code looks fine.  Where this file->icon comes from?  Are you sure that
it's OK?

Actually, I am clueless.  I would have a look on backtrace when you program
crashes.  Otherwise... :)

--
Mike



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