mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
Sort out clipboard-related menu items.
The gtkapp.c menu now has a Copy as well as Paste option; those menu items, as well as the corresponding ones on the context menu and Copy All, now address sets of clipboards parametrised between OS X and ordinary GTK in unix.h. Also I've tweaked the wording of the context-menu items to not use the X-specific terminology "CLIPBOARD" on OS X.
This commit is contained in:
@ -124,12 +124,20 @@ static void startup(GApplication *app, gpointer user_data)
|
||||
|
||||
section = g_menu_new();
|
||||
g_menu_append_section(menu, NULL, G_MENU_MODEL(section));
|
||||
g_menu_append(section, "Copy", "win.copy");
|
||||
g_menu_append(section, "Paste", "win.paste");
|
||||
|
||||
gtk_application_set_menubar(GTK_APPLICATION(app),
|
||||
G_MENU_MODEL(menubar));
|
||||
}
|
||||
|
||||
static void copy_cb(GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
copy_menu_action(user_data);
|
||||
}
|
||||
|
||||
static void paste_cb(GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
@ -138,6 +146,7 @@ static void paste_cb(GSimpleAction *action,
|
||||
}
|
||||
|
||||
static const GActionEntry win_actions[] = {
|
||||
{ "copy", copy_cb },
|
||||
{ "paste", paste_cb },
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user