[Patch] Add xfce_image_menu_item_new to libxfce4ui

André Miranda andre42m at gmail.com
Wed Feb 8 03:47:19 CET 2017

I proposed just another function to make things even easier, but as C 
doesn't support function overloading, it requires another specific 
function, e.g. xfce_image_menu_item_new_with_icon.
Regarding accelerators, I dealt with them while porting xfce4-dict, I'm 
not inclined to drop them. GMenu is an option, but they have the same 
problem about icons.
I think you misunderstood when Matthew said the icons are pushed a 
little to right, i.e. it causes the left pad which is a reserved space 
for checkboxes/radiobuttons.

André Miranda

On 02/06/2017 02:19 PM, Florian Weigelt wrote:
> Copying the files from gtk directly is possible, but overkill in my
> opinion. I shortly thought of it, but it adds a lot of maintenance work,
> too. I'd rather spend my time fixing the bugs in my provided function
> than maintaining a defacto fork of GtkImageMenuItem (which uses the
> deprecated stock items and gtkiconfactory). It makes nearly no
> difference effort-wise for the programmer to use this function (maybe
> changed to Andre's proposal) compared to the rebranded
> gtk_image_menu_item_new_* from the copy. We don't use glade for the
> (programatically created) menus I intended this function to be used for.
> For the menu bars: Yes, glade does NOT support the menu syntax. But it
> is still possible to manually write a .ui file with the menu syntax. As
> for GMenu displaying the icon on the right: I never saw this happen.
> Your points are all valid, but I think we can go with a less complex
> solution here.
> On 02/06/17 00:46, Matthew Brush wrote:
>> Hi,
>> Out of curiosity, have you considered just copying the code of
>> gtkimagemenuitem.[ch] into libxfce4ui and changing the symbol name
>> prefix? Assuming it's not too intertangled with other modules, it should
>> be pretty easy and the licenses (and even coding conventions) are
>> compatible.
>> The main advantage here is not requiring much changes to applications
>> using the gtk_ versions, and avoiding the bug shown by André and which
>> happens in GMenu where the icon is pushed to the right instead of going
>> where the checkbox/radiobutton goes for other item kinds. Additionally
>> it could be added to the Glade catalog to allow applications to use
>> Glade still, which is not supported by your function or GMenu (last time
>> I checked).
>> Regards,
>> Matthew Brush
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20170207/ef5a7879/attachment.html>

More information about the Xfce4-dev mailing list