Verified Commit 769e23ba authored by M. Sandoval's avatar M. Sandoval 🥑
Browse files

Rename open & new actions to {open,new}_database

parent 869cd930
Pipeline #258174 passed with stages
in 8 minutes and 44 seconds
......@@ -15,14 +15,14 @@
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="Shortcut window description">Create safe</property>
<property name="action-name">app.new</property>
<property name="action-name">app.new_database</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="Shortcut window description">Open safe</property>
<property name="action-name">app.open</property>
<property name="action-name">app.open_database</property>
</object>
</child>
<child>
......
......@@ -23,7 +23,7 @@
<object class="GtkButton" id="new_file_button">
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">New…</property>
<property name="action_name">app.new</property>
<property name="action_name">app.new_database</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......@@ -36,7 +36,7 @@
<object class="GtkButton" id="open_file_button">
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Open…</property>
<property name="action_name">app.open</property>
<property name="action_name">app.open_database</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......
......@@ -4,11 +4,11 @@
<section>
<item>
<attribute name="label" translatable="yes" comments="Menubutton in headerbar for starting the safe creation process">_New Safe</attribute>
<attribute name="action">app.new</attribute>
<attribute name="action">app.new_database</attribute>
</item>
<item>
<attribute name="label" translatable="yes" comments="Menubutton in headerbar for starting the safe opening process (for existing safe)">_Open Safe</attribute>
<attribute name="action">app.open</attribute>
<attribute name="action">app.open_database</attribute>
</item>
</section>
<section>
......
......@@ -184,11 +184,11 @@
<section>
<item>
<attribute name='label' translatable='yes'>_New Safe</attribute>
<attribute name='action'>app.new</attribute>
<attribute name='action'>app.new_database</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Open Safe</attribute>
<attribute name='action'>app.open</attribute>
<attribute name='action'>app.open_database</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>Sa_fe Settings</attribute>
......
......@@ -95,8 +95,8 @@ class Application(Gtk.Application):
("settings", self.show_settings),
("about", self.show_about_dialog),
("quit", self.on_quit_action),
("new", self.window.on_create_file_action),
("open", self.window.on_open_file_action),
("new_database", self.window.on_create_file_action),
("open_database", self.window.on_open_file_action),
]
for name, callback in actions:
......@@ -225,8 +225,8 @@ class Application(Gtk.Application):
def add_global_accelerators(self):
self.set_accels_for_action("app.settings", ["<primary>comma"])
self.set_accels_for_action("app.open", ["<primary>o"])
self.set_accels_for_action("app.new", ["<primary><Shift>n"])
self.set_accels_for_action("app.open_database", ["<primary>o"])
self.set_accels_for_action("app.new_database", ["<primary><Shift>n"])
self.set_accels_for_action("app.db.save", ["<primary>s"])
self.set_accels_for_action("app.db.lock", ["<primary>l"])
self.set_accels_for_action("app.db.add_entry", ["<primary>n"])
......
......@@ -146,7 +146,7 @@ class MainWindow(Handy.ApplicationWindow):
if self.application.file_list:
# file_list is appended to when we invoke the app with
# files as cmd line parameters. (it is also appended to
# whenever we open a file via app.open action). If it is
# whenever we open a file via app.open_database action). If it is
# populated, simply load those files and don't show any
# screens.
for g_file in self.application.file_list:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment