Changeset 267

Show
Ignore:
Timestamp:
03/14/07 07:18:39 (1 year ago)
Author:
jordi
Message:

Added two patches that fixed some memory leaks, thanks to Tilman Sauerbeck for them.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/THANKS

    r261 r267  
    88    - Mr_Moustache <mr.moustache@laposte.net>, for his French translation. 
    99    - Stavros Giannouris <stavrosg2002@freemail.gr>, for his Greek translation. 
     10    - Tilman Sauerbeck <tilman@code-monkey.de>, for his patches. 
    1011    - tbm <tbm@home.nl>, for his patches. 
    1112    - VnPenguin <vnpenguin@gmail.com>, for his Vietnamese translation. 
  • trunk/configure.ac

    r245 r267  
    2828dnl Check for libraries 
    2929POPPLER_REQUIRED=0.5.0 
    30 GLIB_REQUIRED=2.6.0 
     30GLIB_REQUIRED=2.8.0 
    3131GTK2_REQUIRED=2.6.0 
    3232 
  • trunk/src/Config.cxx

    r224 r267  
    4141// Forward declarations. 
    4242gchar *getConfigFileName (void); 
    43 void makeDirWithParents (const gchar *); 
    4443 
    4544/// 
     
    503502    gchar *configDir =  
    504503        g_build_filename (g_get_user_config_dir (), PACKAGE, NULL); 
    505     makeDirWithParents (configDir); 
     504    g_mkdir_with_parents (configDir, 0700); 
    506505    gchar *configFile = g_build_filename (configDir, "main.conf", NULL); 
    507506    g_free (configDir); 
     
    509508    return configFile; 
    510509} 
    511  
    512 /// 
    513 /// @brief Creates the directory and all its parent directories. 
    514 /// 
    515 /// If the directory already exists it does nothing. 
    516 /// 
    517 /// @param path The directory to create. 
    518 /// 
    519 void 
    520 makeDirWithParents (const gchar *path) 
    521 { 
    522     // Get the list of directories to create. 
    523     GList *dirs = NULL; 
    524     gchar *dirName = g_strdup (path); 
    525     while ( !g_file_test (dirName, G_FILE_TEST_EXISTS) ) 
    526     { 
    527         dirs = g_list_prepend (dirs, dirName); 
    528         dirName = g_path_get_dirname (dirName); 
    529     } 
    530  
    531     // Now create all of them. 
    532     GList *dir = g_list_first (dirs); 
    533     while ( NULL != dir ) 
    534     { 
    535         if ( -1 == g_mkdir ((gchar *)dir->data, 0700) ) 
    536         { 
    537             g_warning ("Couldn't make directory '%s'\n", (gchar *)dir->data); 
    538         } 
    539         g_free (dir->data); 
    540         dir = g_list_next (dir); 
    541     } 
    542     g_list_free (dirs); 
    543 } 
  • trunk/src/main.cxx

    r256 r267  
    7575    Config::getConfig().save (); 
    7676 
     77    g_option_context_free (optionContext); 
     78 
    7779    // All done!. 
    7880    return EXIT_SUCCESS;