Re: 2 little politically charged characters



On Tue, 2003-08-12 at 13:30, Sergey V. Oudaltsov wrote:
> >  - When there are no duplicates in the current set of layouts, use
> >    language codes.
> >  - For any layouts where there is duplication in the current set, use
> >    layout names and let the applet get big if necessary.
> Well, this would be bit difficult to manage. Tomorrow someone can add more
> layouts - so the uniqueness is not a constant thing. I have to have something
> "solid" to put into "shortDescription" tag. Also, aestetically I would not like
> this solution. Labels American/British/RU is not what I'd like to see, sorry. Is
> this what you mean?

Repeating my earlier comment about not trying trying gswitchit
recently, I assume that the user has selected some set of currently
active layouts. It's uniqueness within *that* set I'm talking about.

The normal case is that the short tag for all these layouts are
unique. If they aren't then you display longer strings that come
from someplace else. (Maybe just the layout name)

You could either take the strategy of

 American
 British
 RU

or probably better, if you are making any of the strings long, make
them all long:

 Americam
 British
 Russian

But the normally case is "EN, RU". 
 
> > (I'm strongly in favor of taking the union of all strings as the 
> > size; I think having the panel applet grow and shrink is a pretty
> > bad thing.)
> Actually, I could think of it. I am just newbie with Pango. What would be the
> right way to do it? A little snippet would be gratefully accepted. Suppose, I have 
> 
> char** names;
> GtkWidget* label;
> 
> How would I set the width of the label to be the text width of the maximum for
> these strings (sure, keeping the height)?

Well, an easy thing to do is to simply create a label for each string.
Add them into a GtkVBox, group them into a GtkSizeGroup
with the mode GTK_SIZE_GROUP_BOTH and use gtk_widget_hide/show to
only show the one that you want to display.

An even simpler approch is to use a GtkNotebook with 
set_show_tabs (notebook, FALSE); and set_show_border (notebook, FALSE);

Regards,
					Owen





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