Re: gtk-list digest, Vol 1 #168 - 5 msgs



gtk-list-request gnome org wrote:

> Send gtk-list mailing list submissions to
>         gtk-list gnome org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mail.gnome.org/mailman/listinfo/gtk-list
> or, via email, send a message with subject or body 'help' to
>         gtk-list-request gnome org
>
> You can reach the person managing the list at
>         gtk-list-admin gnome org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gtk-list digest..."
>
> Today's Topics:
>
>   1. Re: Determining width of a clist entry (Vladimir Tsichevski)
>   2. Re: installing gtk+ (Chris Wareham)
>   3. Re: Determining width of a clist entry (Vlad Harchev)
>   4. Re: Determining width of a clist entry (Matt Goodall)
>   5. Re: Determining width of a clist entry (Chris Wareham)
>
> --__--__--
>
> Message: 1
> From: Vladimir Tsichevski <wowa jet msk su>
> To: chris wareham catchword com
> Cc: gtk-list gnome org
> Subject: Re: Determining width of a clist entry
> Date: Thu, 14 Sep 2000 16:23:50 +0400
>
> >Hi!
> >
> >I'm trying to set the width of the columns in a CList using:
> >
> >  gtk_clist_set_column_width(GTK_CLIST(clist), column, width);
> >
> >I think I need to do this using:
> >
> >  gdk_string_measure(GdkFont *font, const gchar *string);
> >
> >The column entries are in a glib linked list, so what I want
> >to do is keep an array of maximum widths which I update as I
> >insert into the CList.
> >
> >My problem is, how do I determine the GdkFont that my CList
> >is using?
> >
> >Chris
>
> May be
>
> GTK_WIDGET(clist)->style->font
>
> will do?
>
> Vladimir V. Tsichevski
> senior expert
>
> -----------------------------------------------------
>                   Jet Infosystems
> Krasnoproletarskaya 6,          Tel. (+7 095) 972-1182
> Moscow 103006, Russia           Fax  (+7 095) 972-0791
> -----------------------------------------------------
> Any opinions or recommendations herein are those of
> the author and not of his computer.
>
> --__--__--
>
> Message: 2
> Date: Thu, 14 Sep 2000 13:30:44 +0100
> From: Chris Wareham <chris wareham catchword com>
> To: gtk-list gnome org
> Subject: Re: installing gtk+
>
> Maarten Ottens wrote:
> >
> > all well so far.
> > next problem occured with gtk+ I tried to install it, but i now get the
> > following error:
> >
> > checking for glib-config... no
> > checking for GLIB - version >= 1.2.8... no
> > *** The glib-config script installed by GLIB could not be found
> > *** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
> > *** your path, or set the GLIB_CONFIG environment variable to the
> > *** full path to glib-config.
> > configure: error:
> > *** GLIB 1.2.8 or better is required. The latest version of GLIB
> > *** is always available from ftp://ftp.gtk.org/.
> >
> > I just installed glib 1.2.8, what is wrong?
> >
>
> Did you actually check that glib-config is in your path (as the
> error message suggests)? If SuSE is anything like RedHat, then
> the default install doesn't include /usr/local/bin in the path.
> The glib and GTK+ packages that come with RedHat install into
> /usr rather than /usr/local, so this isn't a problem.
>
> The tar.gz distribution of glib and GTK+ install into /usr/local
> by default. So check where your new version of glib installed
> to - if it's /usr/local, then update your path.
>
> Chris
> --
> oversized chuckle suppository for the chronically unamused
>
> --__--__--
>
> Message: 3
> Date: Thu, 14 Sep 2000 17:49:23 +0500 (SAMST)
> From: Vlad Harchev <hvv hippo ru>
> To: Chris Wareham <chris wareham catchword com>
> Cc: gtk-list gnome org
> Subject: Re: Determining width of a clist entry
>
> On Thu, 14 Sep 2000, Chris Wareham wrote:
>
>  You might also want to use gtk_clist_set_column_auto_resize instead of all
> this.
>
> > Chris Wareham wrote:
> > >
> > > I'm trying to set the width of the columns in a CList using:
> > >
> >
> > In answer to my own query:
> >
> >   GtkStyle *style;
> >   gchar *rec[3];
> >
> >   style = gtk_widget_get_style(GTK_WIDGET(clist));
> >
> >   gtk_clist_freeze(GTK_CLIST(clist));
> >
> >   for(li = list; li != NULL; li = g_list_next(li)) {
> >     Record *r = li->data;
> >
> >     rec[0] = status;
> >     rec[1] = jobno;
> >     rec[2] = r->title;
> >
> >     printf("%s : width(%d)\n", rec[2],
> >       gdk_string_width(style->font, rec[2]));
> >
> >     /* update array of maximum column widths ... */
> >
> >     gtk_clist_append(GTK_CLIST(clist), rec);
> >     g_free(r);
> >   }
> >   g_list_free(list);
> >
> > /* set column widths ... */
> >
> >   gtk_clist_thaw(GTK_CLIST(clist));
> >
> > --
> > turbo-powered tedium
> >
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> >
>
>  Best regards,
>   -Vlad
>
> --__--__--
>
> Message: 4
> Date: Thu, 14 Sep 2000 14:29:07 +0100
> From: Matt Goodall <mgg isotek co uk>
> To: gtk-list gnome org
> Subject: Re: Determining width of a clist entry
>
> Chris Wareham wrote:
> >
> > Hi!
> >
> > I'm trying to set the width of the columns in a CList using:
> >
> >   gtk_clist_set_column_width(GTK_CLIST(clist), column, width);
> >
> > I think I need to do this using:
> >
> >   gdk_string_measure(GdkFont *font, const gchar *string);
> >
> > The column entries are in a glib linked list, so what I want
> > to do is keep an array of maximum widths which I update as I
> > insert into the CList.
> >
> > My problem is, how do I determine the GdkFont that my CList
> > is using?
>
> The short answer is:
>
>     gtk_widget_get_sytle(clist)->font
>
>  ... BUT ...
>
> It sounds like gtk_clist_optimal_column_width() or even
> gtk_clist_set_column_auto_resize() will do what you want.
>
> Cheers, Matt
> --
> Matt Goodall, Software Engineer  |  Isotek Electronics Ltd
> mailto:mgg isotek co uk          |  Claro House, Servia Road
> http://www.isotek.co.uk          |  Leeds, LS7 1NL
> Tel: +44 113 234320              |  England
>
> --__--__--
>
> Message: 5
> Date: Thu, 14 Sep 2000 14:31:47 +0100
> From: Chris Wareham <chris wareham catchword com>
> To: gtk-list gnome org
> Subject: Re: Determining width of a clist entry
>
> Vlad Harchev wrote:
> >
> > On Thu, 14 Sep 2000, Chris Wareham wrote:
> >
> >  You might also want to use gtk_clist_set_column_auto_resize instead of all
> > this.
> >
>
> Maybe I should look more closely at the CList header file!!!
>
> I think I'll mail the maintainer of the GTK+ tutorial, because the
> section on CList's mentions gtk_clist_set_column_width(), and even
> uses it in the main example to hardcode the width of a column. It
> would be a better idea for the tutorial to mention
> gtk_clist_set_column_auto_resize() and gtk_clist_columns_autosize()
> as this behaviour is what most people probably want.
>
> Chris
> --
> bite marks on the naugahide
>
> --__--__--
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
> End of gtk-list Digest_______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list





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