From c921e29c4a710e910677ff4913c885aa3923db40 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Wed, 18 Sep 2013 10:09:32 +0200 Subject: [PATCH] Created a Save As... menu item --- src/ag-app.c | 7 ++++--- src/ag-window.c | 6 ++++++ src/astrognome.ui | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ag-app.c b/src/ag-app.c index e3c9fa1..1ab89eb 100644 --- a/src/ag-app.c +++ b/src/ag-app.c @@ -190,9 +190,10 @@ setup_actions(AgApp *app) static void setup_accelerators(AgApp *app) { - gtk_application_add_accelerator(GTK_APPLICATION(app), "w", "win.close", NULL); - gtk_application_add_accelerator(GTK_APPLICATION(app), "s", "win.save", NULL); - gtk_application_add_accelerator(GTK_APPLICATION(app), "F10", "win.gear-menu", NULL); + gtk_application_add_accelerator(GTK_APPLICATION(app), "w", "win.close", NULL); + gtk_application_add_accelerator(GTK_APPLICATION(app), "s", "win.save", NULL); + gtk_application_add_accelerator(GTK_APPLICATION(app), "s", "win.save-as", NULL); + gtk_application_add_accelerator(GTK_APPLICATION(app), "F10", "win.gear-menu", NULL); } static void diff --git a/src/ag-window.c b/src/ag-window.c index 6d585b8..672d6bc 100644 --- a/src/ag-window.c +++ b/src/ag-window.c @@ -166,6 +166,11 @@ save_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data) xmlFreeDoc(doc); } +static void +save_as_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data) +{ +} + void ag_window_redraw_chart(AgWindow *window) { @@ -265,6 +270,7 @@ tab_changed_cb(GdStack *stack, GParamSpec *pspec, AgWindow *window) static GActionEntry win_entries[] = { { "close", close_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 }, }; diff --git a/src/astrognome.ui b/src/astrognome.ui index 5546d5c..459c7c6 100644 --- a/src/astrognome.ui +++ b/src/astrognome.ui @@ -39,5 +39,10 @@ win.save <Primary>s + + Save as… + win.save-as + <Primary><Shift>s +