Re: [RFC] VPNC: port from GtkTable to GtkGrid



On Fri, 2012-02-10 at 16:16 -0500, Mathieu Trudel-Lapierre wrote:
> Hi,
> 
> For newer GTK3 versions, GtkTable is deprecated in favor of GtkGrid.
> Attached is a patch that does the change from GtkTable to GtkGrid
> (though I omitted handling the gtk2 cases...), but it does change the
> layout of the vpn password dialog somewhat.
> 
> The old version was working on the assumption that the the 2 extra
> columns in the priv->table object were giving the required spacing at
> the end of the entry boxes (or at least, that's what seems to be the
> case), but that's no longer true with GtkGrid. I'm curious what would
> be the best way (gtk_adjustment? gtk_dialog_set_size?), and the ideal
> size to give the table or pin the dialog to, if it's even worth doing.

I assume we also want to change the gtk_table_new() to gtk_grid_new()?

I may be completely wrong, but we may want to just let everything float
and set the # characters width of the entries instead.  We really only
care about having a good default number of characters visible for the
entries, but we dont' want the dialog to get too large or too small.
But we don't care about the *dialog* size at all, we care about how much
text shows in the entries.

It used to be with GtkTable we had to twiddle with various widget
properties to get the text wrapping in the info label to work too, which
I think is gone with GtkGrid.  But in the end there are two goals:

1) show a reasonable amount of text in the entries, say 30-ish
characters
2) make sure the dialog doesn't become too wide by default due to the
label text not wrapping correctly

> I've also attached a screenshot of how this looks with my patch.

Screenshot looks fine to me.

Dan

> Mathieu Trudel-Lapierre <mathieu tl gmail com>
> Freenode: cyphermox, Jabber: mathieu tl gmail com
> 4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




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