Skip to content

Commit 8dbbec2

Browse files
committed
Fixed config string handling causing problems with backslashes on windows.
1 parent d80228c commit 8dbbec2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/pomelo-settings.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ void PomeloSettings::set_double(const string& key, double value)
109109
void PomeloSettings::set_string(const string& key, const string& value)
110110
{
111111
print("Setting {} to {}\n", key, value);
112-
KeyFile::set_value(m_group_name, key, value);
112+
KeyFile::set_string(m_group_name, key, value);
113113
}
114114

src/settings-dialog.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
#include "settings-dialog.h"
44
#include "pomelo-widget-utils.h"
55
#include "dov-mm-macros.h"
6+
#include <fmt/core.h>
67

78
using namespace std;
9+
using namespace fmt;
810

911
SettingsDialog::SettingsDialog(Gtk::Window& parent,
1012
shared_ptr<PomeloSettings> pomelo_settings)
@@ -133,6 +135,8 @@ void SettingsDialog::save_to_settings()
133135
m_pomelo_settings->set_string("matcap_source_filename",
134136
matcap_source_filename);
135137
}
136-
catch(...) {}
138+
catch(std::exception& e) {
139+
print("Got error: {}\n", e.what());
140+
}
137141
}
138142
}

0 commit comments

Comments
 (0)