GtkImageMenuItem replacement
Eric
eric.koegel at gmail.com
Fri Jun 5 18:12:30 CEST 2015
On Thu, Jun 4, 2015 at 4:11 AM Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 2015-06-03 11:00 AM, flo.xfce at gmx-topmail.de wrote:
> > Hey everyone,
> > another mail regarding the GTK3 port.
> > One really big issue is the deprecation of GtkImageMenuItem. There was a
> > discussion on this list in February on this topic, but as I see it,
> > without a final statement.
> > So now I ask: How do we replace it?
> > Just drop it?
> > Use GMenu which still has icon support (but with different semantics)?
> > Or write a wrapper in libxfceui4 which packs a GtkGrid with an icon and
> > a label into the GtkMenuItem (which is derived from GtkBin)?
> >
> > Hopefully, these are the only three options but I fear there are more.
> > For the sake of consistency I would greatly appreciate if a core
> > developer would make a final statement so that individual patches from
> > possibly a lot of different contributors follow the same "port rules".
> >
>
> When stuff is deprecated in GTK+, it will still be available until at
> least the next major version.
>
> IMO, it would be more useful to focus on porting the stuff that won't
> work at all on GTK+3 (ex. sealed members, dropped APIs, etc) first,
> rather than spending time porting all the loads of deprecated stuff,
> much of which has no suitable replacements yet, and will likely be still
> working fine and supported for the next decade or more.
>
> My 2 cents, as a pragmatic application developer.
>
> Cheers,
> Matthew Brush
>
Hey,
For most menu items you can just make a box, image, and label then pack
the image and label inside the box. That works with both Gtk 2 and 3. You
can see the Garcon patch as an example:
http://git.xfce.org/xfce/garcon/diff/garcon-gtk/garcon-gtk-menu.c?id=4f746d15a648984bfe7fffe81a988a4c834b59d8
If you have a more complex menu setup like xfpm, then yeah, just wait for
Gtk4 to become an issue.
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20150605/319c5d5e/attachment.html>
More information about the Xfce4-dev
mailing list