mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
(trunk, gtk) #4573 'fix crash when opening a torrent file on systems that don't define G_USER_DIRECTORY_DOWNLOAD'. Thanks to Felipe Contreras for the initial patch.
This commit is contained in:
parent
0f7337a6cd
commit
cf716904f9
2 changed files with 3 additions and 2 deletions
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@
|
||||||
* Raise the number formatter limits for configuration options
|
* Raise the number formatter limits for configuration options
|
||||||
* Fix regression that ignored user-specified TRANSMISSION_HOME environment
|
* Fix regression that ignored user-specified TRANSMISSION_HOME environment
|
||||||
==== GTK+ ====
|
==== GTK+ ====
|
||||||
|
* Fix crash when adding torrents on systems without G_USER_DIRECTORY_DOWNLOAD
|
||||||
* Honor the notification sound setting
|
* Honor the notification sound setting
|
||||||
* Add a tooltip to files in the torrents' file list
|
* Add a tooltip to files in the torrents' file list
|
||||||
* Fix broken handling of the Cancel button in the "Open URL" dialog
|
* Fix broken handling of the Cancel button in the "Open URL" dialog
|
||||||
|
|
|
@ -67,6 +67,7 @@ static void
|
||||||
tr_prefs_init_defaults( tr_benc * d )
|
tr_prefs_init_defaults( tr_benc * d )
|
||||||
{
|
{
|
||||||
const char * str;
|
const char * str;
|
||||||
|
const char * special_dl_dir = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD );
|
||||||
|
|
||||||
cf_check_older_configs( );
|
cf_check_older_configs( );
|
||||||
|
|
||||||
|
@ -106,8 +107,7 @@ tr_prefs_init_defaults( tr_benc * d )
|
||||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 );
|
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 );
|
||||||
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 50 );
|
tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 50 );
|
||||||
|
|
||||||
str = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD );
|
tr_bencDictAddStr( d, TR_PREFS_KEY_DOWNLOAD_DIR, special_dl_dir ? special_dl_dir : str );
|
||||||
tr_bencDictAddStr( d, TR_PREFS_KEY_DOWNLOAD_DIR, str );
|
|
||||||
|
|
||||||
tr_bencDictAddStr( d, PREF_KEY_SORT_MODE, "sort-by-name" );
|
tr_bencDictAddStr( d, PREF_KEY_SORT_MODE, "sort-by-name" );
|
||||||
tr_bencDictAddBool( d, PREF_KEY_SORT_REVERSED, FALSE );
|
tr_bencDictAddBool( d, PREF_KEY_SORT_REVERSED, FALSE );
|
||||||
|
|
Loading…
Reference in a new issue