Modified the CTRL+W shortcut to close the current tab instead of the window

This commit is contained in:
Pierre Pronchery 2010-04-20 18:04:49 +00:00
parent 85bbf47b42
commit 9cb637dd42
3 changed files with 12 additions and 1 deletions

View File

@ -57,6 +57,15 @@ void on_file_close(gpointer data)
}
/* on_file_close_tab */
void on_file_close_tab(gpointer data)
{
Surfer * surfer = data;
surfer_close_tab(surfer);
}
/* on_file_new_tab */
void on_file_new_tab(gpointer data)
{

View File

@ -27,6 +27,7 @@ gboolean on_closex(gpointer data);
#ifndef EMBEDDED
/* file menu */
void on_file_close(gpointer data);
void on_file_close_tab(gpointer data);
void on_file_new_window(gpointer data);
void on_file_new_tab(gpointer data);
void on_file_open(gpointer data);

View File

@ -67,8 +67,9 @@ static DesktopMenu _menu_file[] =
{ "", NULL, NULL, 0 },
{ N_("_Print..."), G_CALLBACK(on_file_print), GTK_STOCK_PRINT, 0 },
{ "", NULL, NULL, 0 },
{ N_("Close _tab"), G_CALLBACK(on_file_close_tab), NULL, GDK_W },
{ N_("_Close"), G_CALLBACK(on_file_close), GTK_STOCK_CLOSE,
GDK_W },
0 },
{ NULL, NULL, NULL, 0 }
};