Created a Save As... menu item
This commit is contained in:
parent
573f05ceb4
commit
c921e29c4a
@ -190,9 +190,10 @@ setup_actions(AgApp *app)
|
|||||||
static void
|
static void
|
||||||
setup_accelerators(AgApp *app)
|
setup_accelerators(AgApp *app)
|
||||||
{
|
{
|
||||||
gtk_application_add_accelerator(GTK_APPLICATION(app), "<Primary>w", "win.close", NULL);
|
gtk_application_add_accelerator(GTK_APPLICATION(app), "<Primary>w", "win.close", NULL);
|
||||||
gtk_application_add_accelerator(GTK_APPLICATION(app), "<Primary>s", "win.save", NULL);
|
gtk_application_add_accelerator(GTK_APPLICATION(app), "<Primary>s", "win.save", NULL);
|
||||||
gtk_application_add_accelerator(GTK_APPLICATION(app), "F10", "win.gear-menu", NULL);
|
gtk_application_add_accelerator(GTK_APPLICATION(app), "<Primary><Shift>s", "win.save-as", NULL);
|
||||||
|
gtk_application_add_accelerator(GTK_APPLICATION(app), "F10", "win.gear-menu", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -166,6 +166,11 @@ save_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
|||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_as_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ag_window_redraw_chart(AgWindow *window)
|
ag_window_redraw_chart(AgWindow *window)
|
||||||
{
|
{
|
||||||
@ -265,6 +270,7 @@ tab_changed_cb(GdStack *stack, GParamSpec *pspec, AgWindow *window)
|
|||||||
static GActionEntry win_entries[] = {
|
static GActionEntry win_entries[] = {
|
||||||
{ "close", close_cb, NULL, NULL, NULL },
|
{ "close", close_cb, NULL, NULL, NULL },
|
||||||
{ "save", save_cb, NULL, NULL, NULL },
|
{ "save", save_cb, NULL, NULL, NULL },
|
||||||
|
{ "save-as", save_as_cb, NULL, NULL, NULL },
|
||||||
{ "gear-menu", gear_menu_cb, NULL, "false", NULL },
|
{ "gear-menu", gear_menu_cb, NULL, "false", NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,5 +39,10 @@
|
|||||||
<attribute name="action">win.save</attribute>
|
<attribute name="action">win.save</attribute>
|
||||||
<attribute name="accel"><Primary>s</attribute>
|
<attribute name="accel"><Primary>s</attribute>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Save as…</attribute>
|
||||||
|
<attribute name="action">win.save-as</attribute>
|
||||||
|
<attribute name="accel"><Primary><Shift>s</attribute>
|
||||||
|
</item>
|
||||||
</menu>
|
</menu>
|
||||||
</interface>
|
</interface>
|
||||||
|
Loading…
Reference in New Issue
Block a user