GdkScreen* screen;
GtkIconTheme* icon_theme;
GList* items;
+ gboolean has_selection;
/* We do not want to modify the Edit menu.
The only reliable indicator is inspecting the first item. */
return;
}
+ has_selection = midori_view_has_selection (view);
+
if (view->link_uri)
{
menuitem = gtk_image_menu_item_new_with_mnemonic (
gtk_widget_show (menuitem);
}
- if (!view->link_uri && midori_view_has_selection (view))
+ if (!view->link_uri && has_selection)
{
if (strchr (view->selected_text, '.')
&& !strchr (view->selected_text, ' '))
/* FIXME: view selection source */
}
- if (!view->link_uri && !midori_view_has_selection (view))
+ if (!view->link_uri && !has_selection)
{
/* FIXME: Make this sensitive only when there is a tab to undo */
menuitem = gtk_image_menu_item_new_with_mnemonic (_("Undo Close Tab"));