Comment 35 for bug 52670

Revision history for this message
Tsvi Mostovicz (tsvi) wrote :

Ok, I did some analysis of what happens when you set defaults in kde default applications.
As I mentioned above this has nothing to do with kde systemsettings which is just a cute view of kcontrol meant for kubuntu.
When you select another default application for email/browsing etc. kcontrol (which is part of kdebase) runs the following function.

void CfgBrowser::save(KConfig *) {

 KConfig *config = new KConfig("kdeglobals");
 config->setGroup("General");
 QString exec;
 if (radioExec->isChecked())
 {
    exec = lineExec->text();
    if (m_browserService && (exec == m_browserExec))
       exec = m_browserService->storageId(); // Use service
    else
       exec = "!" + exec; // Litteral command
 }
 config->writePathEntry("BrowserApplication", exec, true, true);
 config->sync();
 delete config;

 KIPC::sendMessageAll(KIPC::SettingsChanged);

 emit changed(false);
}

If you check the headers, you'll find the function writePathEntry is part of the kconfigbase class.
This function will write a entry to the users home directory at ~/.kde/share/config/some_file (depending on the setting you're changing.)

So to detect changes you'd want something that can detect KIPC::sendMessageAll(KIPC::SettingsChanged);

The true problem here is as mentioned above, the fact that Thunderbird doesn't check the browser environment variable but goes directly by calling x-www-browser which is system wide defined by update-alternatives and therefore should not be changed on a multi-user platform.

So yes, there's where I stop the problem seems to be with thunderbird and not with kde for it not checking user specific variables (where are they set in gnome?) for the moment.