Changeset 94 for trunk/src/Config.cxx
- Timestamp:
- 04/20/06 06:29:18 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/Config.cxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Config.cxx
r93 r94 197 197 198 198 /// 199 /// @brief Save the current configuration to a file. 200 /// 201 void 202 Config::save () 203 { 204 gchar *contents = g_key_file_to_data (m_Values, NULL, NULL); 205 gchar *configFile = getConfigFileName (); 206 GError *error = NULL; 207 if ( !g_file_set_contents (configFile, contents, -1, &error) ) 208 { 209 g_warning ("Couldn't write configuration file: %s\n", error->message); 210 g_error_free (error); 211 } 212 g_free (contents); 213 g_free (configFile); 214 } 215 216 /// 199 217 /// @brief Saves the current window's size. 200 218 /// … … 255 273 GList *dirs = NULL; 256 274 gchar *dirName = g_strdup (path); 257 while ( !g_file_test (dirName, G_FILE_TEST_EXISTS) ) ;275 while ( !g_file_test (dirName, G_FILE_TEST_EXISTS) ) 258 276 { 259 277 dirs = g_list_prepend (dirs, dirName); … … 263 281 // Now create all of them. 264 282 GList *dir = g_list_first (dirs); 265 while ( NULL != dir ) ;283 while ( NULL != dir ) 266 284 { 267 285 if ( -1 == g_mkdir ((gchar *)dir->data, 0700) )
