@@ -71,14 +71,14 @@ void SaveWindowState(GtkWindow* window) {
71
71
top = g_key_file_get_integer (key_file, " position" , " top" , &error);
72
72
width = g_key_file_get_integer (key_file, " size" , " width" , &error);
73
73
height = g_key_file_get_integer (key_file, " size" , " height" , &error);
74
- // If any value can not be readed, save defaults
74
+ // If any value can not be readed, restore defaults
75
75
if (left == 0 || top == 0 || width == 0 || height == 0 ) {
76
76
left = 1 ;
77
77
top = 1 ;
78
78
width = 800 ;
79
79
height = 600 ;
80
80
}
81
- // If we can not load the file, save defaults
81
+ // If we can not load the file, set defaults
82
82
} else {
83
83
left = 1 ;
84
84
top = 1 ;
@@ -100,6 +100,7 @@ void SaveWindowState(GtkWindow* window) {
100
100
}
101
101
102
102
void LoadWindowState (GtkWindow* window) {
103
+ // Default values if It is not possible to load the key file
103
104
gint left = 1 ;
104
105
gint top = 1 ;
105
106
gint width = 800 ;
@@ -117,7 +118,7 @@ void LoadWindowState(GtkWindow* window) {
117
118
width = g_key_file_get_integer (key_file, " size" , " width" , &error);
118
119
height = g_key_file_get_integer (key_file, " size" , " height" , &error);
119
120
maximized = g_key_file_get_boolean (key_file, " state" , " maximized" , &error);
120
- // If any value can not be readed, load defaults
121
+ // If any value can not be readed, set defaults again
121
122
if (left == 0 || top == 0 || width == 0 || height == 0 ) {
122
123
left = 1 ;
123
124
top = 1 ;
0 commit comments