Skip to content

Commit 7c26956

Browse files
committed
Autodetect version
1 parent 52f02cd commit 7c26956

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
class AlpacaApplication(Adw.Application):
3535
"""The main application singleton class."""
3636

37-
def __init__(self):
37+
def __init__(self, version):
3838
super().__init__(application_id='com.jeffser.Alpaca',
3939
flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
4040
self.create_action('quit', lambda *_: self.quit(), ['<primary>q'])
4141
self.create_action('preferences', lambda *_: AlpacaWindow.show_preferences_dialog(self.props.active_window), ['<primary>p'])
4242
self.create_action('about', self.on_about_action)
43-
self.version = '1.0.1'
43+
self.version = version
4444

4545
def do_activate(self):
4646
win = self.props.active_window
@@ -77,6 +77,6 @@ def main(version):
7777
format="%(levelname)s\t[%(filename)s | %(funcName)s] %(message)s",
7878
level=logging.INFO
7979
)
80-
app = AlpacaApplication()
80+
app = AlpacaApplication(version)
8181
logger.info(f"Alpaca version: {app.version}")
8282
return app.run(sys.argv)

0 commit comments

Comments
 (0)