Skip to content

Commit f6f1717

Browse files
committed
Config: Use project name constant instead of asking GLib
1 parent 5e7eb73 commit f6f1717

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initialize(app, builder)
3636
self.show_all
3737
end
3838
def restore
39-
path = File.expand_path(GLib.application_name, GLib.user_cache_dir)
39+
path = File.expand_path($PROJECT_NAME, GLib.user_cache_dir)
4040
file = GLib::KeyFile.new
4141
file.load_from_file(File.expand_path("state.ini", path))
4242

src/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class Configuration
2121
def initialize
22-
path = File.expand_path(GLib.application_name, GLib.user_config_dir)
22+
path = File.expand_path($PROJECT_NAME, GLib.user_config_dir)
2323
filepath = File.expand_path("config", path)
2424
file = ExtraKeyFile.new(filepath)
2525
@background_color = file.get_integer_list("UI", "BackgroundColor", [255, 255, 255])
@@ -36,7 +36,7 @@ def initialize
3636
end
3737
end
3838
def save
39-
dir = File.expand_path(GLib.application_name, GLib.user_config_dir)
39+
dir = File.expand_path($PROJECT_NAME, GLib.user_config_dir)
4040
file = ExtraKeyFile.new
4141
file.set_integer_list("UI", "BackgroundColor", @background_color)
4242
file.set_integer_list("UI", "NoneColor", @none_color)

0 commit comments

Comments
 (0)