Skip to content

Commit

Permalink
Merge pull request #952 from b4n/commander
Browse files Browse the repository at this point in the history
commander: Silence expected deprecation warnings
  • Loading branch information
b4n committed Oct 17, 2023
2 parents 3e1670f + 38a138f commit 54e9319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commander/src/commander-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ store_populate_menu_items (GtkListStore *store,
gboolean use_underline;
GtkStockItem item;

/* GtkStock is deprectaed since GTK 3.10, but we have to use it in order
* to get the actual label of the menu item */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (GTK_IS_IMAGE_MENU_ITEM (node->data) &&
gtk_image_menu_item_get_use_stock (node->data) &&
gtk_stock_lookup (gtk_menu_item_get_label (node->data), &item)) {
Expand All @@ -315,6 +318,7 @@ store_populate_menu_items (GtkListStore *store,
item_label = g_strdup (gtk_menu_item_get_label (node->data));
use_underline = gtk_menu_item_get_use_underline (node->data);
}
G_GNUC_END_IGNORE_DEPRECATIONS

/* remove underlines */
if (use_underline) {
Expand Down

0 comments on commit 54e9319

Please sign in to comment.