How to replace gtk_image_menu_item_new_from_stock() in GTK3
- From: Osmo Antero <osmoma gmail com>
- To: gtk-app-devel-list gnome org
- Subject: How to replace gtk_image_menu_item_new_from_stock() in GTK3
- Date: Sat, 8 Mar 2014 10:57:22 +0000
Hello,
My application has used gtk_image_menu_item_new_from_stock(GTK_STOCK_XXX, )
to create menu items, but this function is now deprecated in the newest
GTK3.
The new method gtk_menu_item_new_with_mnemonic() requires me to translate
the menu label to many languages.
Why should I translate common menu labels like "E_xit", "_Quit" and
"_About"?
// This is deprecated in GTK 3.
// menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,
NULL);
// New method
menu_item = gtk_menu_item_new_with_mnemonic (_("_About"));
[[
warning: 'gtk_image_menu_item_new_from_stock' is deprecated (declared at
/usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:78): Use
'gtk_menu_item_new' instead [-Wdeprecated-declarations]
menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL);
warning: 'GtkStock' is deprecated [-Wdeprecated-declarations]
]]
My app:
https://launchpad.net/audio-recorder
Please enlighten me,
Osmo Antero
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]