Skip to content

Commit

Permalink
Use menu_item_add_stock_sensitive() and menu_item_add_sensitive().
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Monin committed Apr 23, 2008
1 parent 5773ded commit 1d9e03e
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions src/view_file_icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,27 +328,24 @@ static GtkWidget *vficon_pop_menu(ViewFileIcon *vfi, gint active)
submenu_add_edit(menu, &item, G_CALLBACK(vficon_pop_menu_edit_cb), vfi);
gtk_widget_set_sensitive(item, active);

item = menu_item_add_stock(menu, _("_Properties"), GTK_STOCK_PROPERTIES, G_CALLBACK(vficon_pop_menu_info_cb), vfi);
gtk_widget_set_sensitive(item, active);

item = menu_item_add_stock(menu, _("View in _new window"), GTK_STOCK_NEW, G_CALLBACK(vficon_pop_menu_view_cb), vfi);
gtk_widget_set_sensitive(item, active);
menu_item_add_stock_sensitive(menu, _("_Properties"), GTK_STOCK_PROPERTIES, active,
G_CALLBACK(vficon_pop_menu_info_cb), vfi);

menu_item_add_stock_sensitive(menu, _("View in _new window"), GTK_STOCK_NEW, active,
G_CALLBACK(vficon_pop_menu_view_cb), vfi);
menu_item_add_divider(menu);
item = menu_item_add_stock(menu, _("_Copy..."), GTK_STOCK_COPY, G_CALLBACK(vficon_pop_menu_copy_cb), vfi);
gtk_widget_set_sensitive(item, active);
item = menu_item_add(menu, _("_Move..."), G_CALLBACK(vficon_pop_menu_move_cb), vfi);
gtk_widget_set_sensitive(item, active);
item = menu_item_add(menu, _("_Rename..."), G_CALLBACK(vficon_pop_menu_rename_cb), vfi);
gtk_widget_set_sensitive(item, active);
item = menu_item_add_stock(menu, _("_Delete..."), GTK_STOCK_DELETE, G_CALLBACK(vficon_pop_menu_delete_cb), vfi);
gtk_widget_set_sensitive(item, active);
if (options->show_copy_path)
{
item = menu_item_add(menu, _("_Copy path"), G_CALLBACK(vficon_pop_menu_copy_path_cb), vfi);
gtk_widget_set_sensitive(item, active);
}

menu_item_add_stock_sensitive(menu, _("_Copy..."), GTK_STOCK_COPY, active,
G_CALLBACK(vficon_pop_menu_copy_cb), vfi);
menu_item_add_sensitive(menu, _("_Move..."), active,
G_CALLBACK(vficon_pop_menu_move_cb), vfi);
menu_item_add_sensitive(menu, _("_Rename..."), active,
G_CALLBACK(vficon_pop_menu_rename_cb), vfi);
menu_item_add_stock_sensitive(menu, _("_Delete..."), GTK_STOCK_DELETE, active,
G_CALLBACK(vficon_pop_menu_delete_cb), vfi);
if (options->show_copy_path)
menu_item_add_sensitive(menu, _("_Copy path"), active,
G_CALLBACK(vficon_pop_menu_copy_path_cb), vfi);
menu_item_add_divider(menu);

submenu = submenu_add_sort(NULL, G_CALLBACK(vficon_pop_menu_sort_cb), vfi,
Expand Down

0 comments on commit 1d9e03e

Please sign in to comment.