By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1499
Collapse All | Expand All

(-)./tdecore/tdeglobalsettings.h.Ori (+27 lines)
Lines 253-258 Link Here
253
     */
253
     */
254
    static TQString documentPath() { initStatic(); return *s_documentPath; }
254
    static TQString documentPath() { initStatic(); return *s_documentPath; }
255
255
256
    /**
257
     * The path where documents are stored of the current user.
258
     * @return the path of the videos directory
259
     */
260
    static TQString videosPath() { initStatic(); return *s_videosPath; }
261
262
    /**
263
     * The path where documents are stored of the current user.
264
     * @return the path of the music directory
265
     */
266
    static TQString musicPath() { initStatic(); return *s_musicPath; }
267
268
    /**
269
     * The path where documents are stored of the current user.
270
     * @return the path of the downloads directory
271
     */
272
    static TQString downloadPath() { initStatic(); return *s_downloadPath; }
273
274
    /**
275
     * The path where documents are stored of the current user.
276
     * @return the path of the pictures directory
277
     */
278
    static TQString picturesPath() { initStatic(); return *s_picturesPath; }
256
279
257
    /**
280
    /**
258
     * The default color to use when highlighting toolbar buttons.
281
     * The default color to use when highlighting toolbar buttons.
Lines 560-565 Link Here
560
    static TQString* s_autostartPath;
583
    static TQString* s_autostartPath;
561
    static TQString* s_trashPath;
584
    static TQString* s_trashPath;
562
    static TQString* s_documentPath;
585
    static TQString* s_documentPath;
586
    static TQString* s_picturesPath;
587
    static TQString* s_downloadPath;
588
    static TQString* s_musicPath;
589
    static TQString* s_videosPath;
563
    static TQFont *_generalFont;
590
    static TQFont *_generalFont;
564
    static TQFont *_fixedFont;
591
    static TQFont *_fixedFont;
565
    static TQFont *_toolBarFont;
592
    static TQFont *_toolBarFont;
(-)./tdecore/tdeglobalsettings.cpp.xdg_path (-10 / +45 lines)
Lines 62-67 Link Here
62
TQString* TDEGlobalSettings::s_autostartPath = 0;
62
TQString* TDEGlobalSettings::s_autostartPath = 0;
63
TQString* TDEGlobalSettings::s_trashPath = 0;
63
TQString* TDEGlobalSettings::s_trashPath = 0;
64
TQString* TDEGlobalSettings::s_documentPath = 0;
64
TQString* TDEGlobalSettings::s_documentPath = 0;
65
TQString* TDEGlobalSettings::s_videosPath = 0;
66
TQString* TDEGlobalSettings::s_musicPath = 0;
67
TQString* TDEGlobalSettings::s_downloadPath = 0;
68
TQString* TDEGlobalSettings::s_picturesPath = 0;
65
TQFont *TDEGlobalSettings::_generalFont = 0;
69
TQFont *TDEGlobalSettings::_generalFont = 0;
66
TQFont *TDEGlobalSettings::_fixedFont = 0;
70
TQFont *TDEGlobalSettings::_fixedFont = 0;
67
TQFont *TDEGlobalSettings::_toolBarFont = 0;
71
TQFont *TDEGlobalSettings::_toolBarFont = 0;
Lines 83-89 Link Here
83
87
84
// helper function for reading xdg user dirs: it is required in order to take 
88
// helper function for reading xdg user dirs: it is required in order to take 
85
// care of locale stuff
89
// care of locale stuff
86
void readXdgUserDirs(TQString *desktop, TQString *documents)
90
void readXdgUserDirs(TQString *desktop, TQString *documents, TQString *videos, TQString *music, TQString *download, TQString *pictures)
87
{
91
{
88
	TQFile f( TQDir::homeDirPath() + "/.config/user-dirs.dirs" );
92
	TQFile f( TQDir::homeDirPath() + "/.config/user-dirs.dirs" );
89
93
Lines 101-106 Link Here
101
			*desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
105
			*desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
102
		else if (line.startsWith("XDG_DOCUMENTS_DIR="))
106
		else if (line.startsWith("XDG_DOCUMENTS_DIR="))
103
			*documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
107
			*documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
108
		else if (line.startsWith("XDG_MUSIC_DIR="))
109
			*videos = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
110
		else if (line.startsWith("XDG_DOWNLOAD_DIR="))
111
			*download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
112
		else if (line.startsWith("XDG_VIDEOS_DIR="))
113
			*music = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
114
		else if (line.startsWith("XDG_PICTURES_DIR="))
115
			*pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
104
116
105
		line = s.readLine();
117
		line = s.readLine();
106
	}
118
	}
Lines 515-544 Link Here
515
    s_autostartPath = new TQString();
527
    s_autostartPath = new TQString();
516
    s_trashPath = new TQString();
528
    s_trashPath = new TQString();
517
    s_documentPath = new TQString();
529
    s_documentPath = new TQString();
530
    s_videosPath = new TQString();
531
    s_musicPath = new TQString();
532
    s_downloadPath = new TQString();
533
    s_picturesPath = new TQString();
534
518
535
519
    TDEConfigGroup g( TDEGlobal::config(), "Paths" );
536
    TDEConfigGroup g( TDEGlobal::config(), "Paths" );
520
537
521
	// Read desktop and documents path using XDG_USER_DIRS
538
    // Read desktop and documents path using XDG_USER_DIRS
522
	readXdgUserDirs(s_desktopPath, s_documentPath);
539
    readXdgUserDirs(s_desktopPath, s_documentPath, s_musicPath, s_videosPath, s_downloadPath, s_picturesPath);
523
	
540
	
524
    if (s_desktopPath->isEmpty() == true) {
541
    if (s_desktopPath->isEmpty() == true) {
525
      *s_desktopPath = TQDir::homeDirPath() + "/Desktop/";
542
      *s_desktopPath = TQDir::homeDirPath() + "/Desktop/";
526
    }
543
    }
544
527
    *s_desktopPath = TQDir::cleanDirPath( *s_desktopPath );
545
    *s_desktopPath = TQDir::cleanDirPath( *s_desktopPath );
528
    if ( !s_desktopPath->endsWith("/") )
546
    if ( !s_desktopPath->endsWith("/") )
529
      s_desktopPath->append('/');
547
      s_desktopPath->append('/');
530
548
531
    if (s_documentPath->isEmpty() == true) {
532
#ifdef Q_WS_WIN
533
      *s_documentPath = getWin32ShellFoldersPath("Personal");
534
#else
535
      *s_documentPath = TQDir::homeDirPath() + "/Documents/";
536
#endif
537
    }
538
    *s_documentPath = TQDir::cleanDirPath( *s_documentPath );
549
    *s_documentPath = TQDir::cleanDirPath( *s_documentPath );
539
    if ( !s_documentPath->endsWith("/"))
550
    if ( !s_documentPath->endsWith("/"))
540
      s_documentPath->append('/');
551
      s_documentPath->append('/');
541
552
553
    *s_musicPath = TQDir::cleanDirPath( *s_musicPath );
554
    if ( !s_musicPath->endsWith("/"))
555
      s_musicPath->append('/');
556
557
    *s_videosPath = TQDir::cleanDirPath( *s_videosPath );
558
    if ( !s_videosPath->endsWith("/"))
559
      s_videosPath->append('/');
560
561
    *s_downloadPath = TQDir::cleanDirPath( *s_downloadPath );
562
    if ( !s_downloadPath->endsWith("/"))
563
      s_downloadPath->append('/');
564
565
    *s_picturesPath = TQDir::cleanDirPath( *s_picturesPath );
566
    if ( !s_picturesPath->endsWith("/"))
567
      s_picturesPath->append('/');
568
542
    // Trash Path - TODO remove in KDE4 (tdeio_trash can't use it for interoperability reasons)
569
    // Trash Path - TODO remove in KDE4 (tdeio_trash can't use it for interoperability reasons)
543
    *s_trashPath = *s_desktopPath + i18n("Trash") + "/";
570
    *s_trashPath = *s_desktopPath + i18n("Trash") + "/";
544
    *s_trashPath = g.readPathEntry( "Trash" , *s_trashPath);
571
    *s_trashPath = g.readPathEntry( "Trash" , *s_trashPath);
Lines 603-608 Link Here
603
    s_desktopPath = 0L;
630
    s_desktopPath = 0L;
604
    delete s_documentPath;
631
    delete s_documentPath;
605
    s_documentPath = 0L;
632
    s_documentPath = 0L;
633
    delete s_videosPath;
634
    s_videosPath = 0L;
635
    delete s_picturesPath;
636
    s_picturesPath = 0L;
637
    delete s_downloadPath;
638
    s_downloadPath = 0L;
639
    delete s_musicPath;
640
    s_musicPath = 0L;
606
}
641
}
607
642
608
TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()
643
TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings()

Return to bug 1499