mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Fill in some more of the OS X menu bar.
This still isn't complete: I also need to add the variable collections of things like mid-session special commands and saved session names, and also I need to try to grey out menu items when they're not applicable. But it's a start.
This commit is contained in:
@ -3252,22 +3252,6 @@ void init_clipboard(struct gui_data *inst)
|
||||
|
||||
#endif /* JUST_USE_GTK_CLIPBOARD_UTF8 */
|
||||
|
||||
void app_menu_action(void *frontend, enum MenuAction action)
|
||||
{
|
||||
struct gui_data *inst = (struct gui_data *)frontend;
|
||||
switch (action) {
|
||||
case MA_COPY:
|
||||
{
|
||||
static const int clips[] = { MENU_CLIPBOARD };
|
||||
term_request_copy(inst->term, clips, lenof(clips));
|
||||
}
|
||||
break;
|
||||
case MA_PASTE:
|
||||
term_request_paste(inst->term, MENU_CLIPBOARD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_window_titles(struct gui_data *inst)
|
||||
{
|
||||
/*
|
||||
@ -4725,6 +4709,40 @@ void saved_session_freedata(GtkMenuItem *item, gpointer data)
|
||||
sfree(str);
|
||||
}
|
||||
|
||||
void app_menu_action(void *frontend, enum MenuAction action)
|
||||
{
|
||||
struct gui_data *inst = (struct gui_data *)frontend;
|
||||
switch (action) {
|
||||
case MA_COPY:
|
||||
copy_clipboard_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_PASTE:
|
||||
paste_clipboard_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_COPY_ALL:
|
||||
copy_all_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_DUPLICATE_SESSION:
|
||||
dup_session_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_RESTART_SESSION:
|
||||
restart_session_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_CHANGE_SETTINGS:
|
||||
change_settings_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_CLEAR_SCROLLBACK:
|
||||
clear_scrollback_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_RESET_TERMINAL:
|
||||
reset_terminal_menuitem(NULL, inst);
|
||||
break;
|
||||
case MA_EVENT_LOG:
|
||||
event_log_menuitem(NULL, inst);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void update_savedsess_menu(GtkMenuItem *menuitem, gpointer data)
|
||||
{
|
||||
struct gui_data *inst = (struct gui_data *)data;
|
||||
|
Reference in New Issue
Block a user