~ci-train-bot/ubuntu-system-settings/ubuntu-system-settings-ubuntu-yakkety-1966

« back to all changes in this revision

Viewing changes to plugins/background/background.cpp

  • Committer: Iain Lane
  • Date: 2013-07-21 19:17:45 UTC
  • mto: This revision was merged to the branch mainline in revision 173.
  • Revision ID: iain.lane@canonical.com-20130721191745-38224w1lus9rkopx
Add a shared GSettings schema for settings-internal settings & make background use it

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        m_objectPath = qObjectPath.value().path();
43
43
    }
44
44
 
45
 
    m_systemBusConnection.connect("org.freedesktop.Accounts",
 
45
     m_systemBusConnection.connect("org.freedesktop.Accounts",
46
46
                                  m_objectPath,
47
47
                                  "org.freedesktop.Accounts.User",
48
48
                                  "Changed",
66
66
    return QString();
67
67
}
68
68
 
 
69
void Background::setBackgroundFile(QUrl backgroundFile)
 
70
{
 
71
    if (!backgroundFile.isLocalFile())
 
72
        return;
 
73
 
 
74
    QDBusInterface userInterface (
 
75
                "org.freedesktop.Accounts",
 
76
                m_objectPath,
 
77
                "org.freedesktop.Accounts.User",
 
78
                m_systemBusConnection,
 
79
                this);
 
80
 
 
81
    QString backgroundFileSave = backgroundFile.path();
 
82
    m_backgroundFile = backgroundFileSave;
 
83
    userInterface.call("SetBackgroundFile", backgroundFileSave);
 
84
}
 
85
 
69
86
void Background::slotChanged()
70
87
{
71
88
    QString new_background = getBackgroundFile();