Commit 9b623090 authored by Antenore Gatta's avatar Antenore Gatta

GTK3 migration - gtk_image_menu_item_set_image deprecated

parent ed95d5e7
......@@ -88,7 +88,7 @@ remmina_applet_menu_add_group(GtkWidget *menu, const gchar *group, gint position
GtkWidget *image;
GtkWidget *submenu;
widget = gtk_image_menu_item_new_with_label(group);
widget = gtk_menu_item_new_with_label(group);
gtk_widget_show(widget);
image =
......@@ -96,8 +96,6 @@ remmina_applet_menu_add_group(GtkWidget *menu, const gchar *group, gint position
(menuitem->item_type == REMMINA_APPLET_MENU_ITEM_DISCOVERED ?
"folder-remote" : "folder"), GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(widget), image);
gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(widget), TRUE);
g_object_set_data_full(G_OBJECT(widget), "group", g_strdup(group), g_free);
g_object_set_data(G_OBJECT(widget), "count", GINT_TO_POINTER(0));
......
......@@ -158,8 +158,6 @@ GtkWidget* remmina_applet_menu_item_new(RemminaAppletMenuItemType item_type, ...
}
gtk_widget_show(widget);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), widget);
gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(item), TRUE);
if (item->server)
{
......
......@@ -775,13 +775,12 @@ static void remmina_connection_holder_toolbar_switch_page(GtkWidget* widget, Rem
break;
cnnobj = (RemminaConnectionObject*) g_object_get_data(G_OBJECT(page), "cnnobj");
menuitem = gtk_image_menu_item_new_with_label(remmina_file_get_string(cnnobj->remmina_file, "name"));
menuitem = gtk_menu_item_new_with_label(remmina_file_get_string(cnnobj->remmina_file, "name"));
gtk_widget_show(menuitem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
image = gtk_image_new_from_icon_name(remmina_file_get_icon_name(cnnobj->remmina_file), GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_object_set_data(G_OBJECT(menuitem), "new-page-num", GINT_TO_POINTER(i));
g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(remmina_connection_holder_switch_page_activate),
......@@ -1177,12 +1176,11 @@ static void remmina_connection_holder_toolbar_tools(GtkWidget* widget, RemminaCo
if (feature->opt1)
{
menuitem = gtk_image_menu_item_new_with_label(g_dgettext(domain, (const gchar*) feature->opt1));
menuitem = gtk_menu_item_new_with_label(g_dgettext(domain, (const gchar*) feature->opt1));
if (feature->opt2)
{
image = gtk_image_new_from_icon_name((const gchar*) feature->opt2, GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
}
}
else
......
......@@ -665,19 +665,17 @@ static void remmina_ftp_client_popup_menu(RemminaFTPClient *client, GdkEventButt
menu = gtk_menu_new();
menuitem = gtk_image_menu_item_new_with_label(_("Download"));
menuitem = gtk_menu_item_new_with_label(_("Download"));
gtk_widget_show(menuitem);
image = gtk_image_new_from_icon_name("document-save", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(remmina_ftp_client_action_download), client);
menuitem = gtk_image_menu_item_new_with_label(_("Upload"));
menuitem = gtk_menu_item_new_with_label(_("Upload"));
gtk_widget_show(menuitem);
image = gtk_image_new_from_icon_name("document-send", GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(remmina_ftp_client_action_upload), client);
......
......@@ -124,10 +124,8 @@ static void remmina_icon_populate_additional_menu_item(GtkWidget *menu)
{
GtkWidget *menuitem;
menuitem = gtk_image_menu_item_new_with_label(_("Open Main Window"));
menuitem = gtk_menu_item_new_with_label(_("Open Main Window"));
gtk_widget_show(menuitem);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem),
gtk_image_new_from_icon_name("remmina", GTK_ICON_SIZE_MENU));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(remmina_icon_main), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment