~ubuntu-branches/ubuntu/precise/networkmanagement/precise-updates

« back to all changes in this revision

Viewing changes to libs/ui/connectioneditor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl, Modestas Vainius, Michael Biebl
  • Date: 2011-05-27 12:18:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110527121825-vfufwquq3vy0k3zn
Tags: 0.1+git20110526.911025d-1
[ Modestas Vainius ]
* Use official KDE branding in the package descriptions.

[ Michael Biebl ]
* New upstream Git snapshot 911025d81fdfbe09b64705e94e5411f521c38e3e.
* debian/control
  - Bump Build-Depends on kdelibs5-dev and kdebase-workspace-dev to
    (>= 4:4.6.0).
  - Bump Build-Depends on network-manager-dev and libnm-util-dev to
    (>= 0.8.1).
  - Bump Depends on network-manager to (>= 0.8.1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <KStandardDirs>
40
40
#include <KSharedConfig>
41
41
#include <KLocale>
 
42
#include <KPushButton>
42
43
 
43
44
#include "connectionprefs.h"
44
45
#include "wiredpreferences.h"
45
46
#include "wirelesspreferences.h"
46
47
#include "gsmconnectioneditor.h"
47
48
#include "cdmaconnectioneditor.h"
 
49
#include "bluetoothconnectioneditor.h"
48
50
#include "pppoepreferences.h"
49
51
#include "vpnpreferences.h"
50
52
 
75
77
    cprefs->load();
76
78
    cprefs->validate();
77
79
 
 
80
    // For KAuth (KDE's Polkit wrapper): this seems to have no effect in the Ok button though.
 
81
    configDialog.button(KDialog::Ok)->setAuthAction(QLatin1String("org.freedesktop.network-manager-settings.system.modify"));
 
82
 
78
83
    if ( cprefs && configDialog.exec() == QDialog::Accepted ) {
79
84
        QStringList changedConnections;
80
85
        changedConnections << cprefs->connection()->uuid();
193
198
    QString name = connection->name();
194
199
    QString type = Knm::Connection::typeAsString(connection->type());
195
200
    KNetworkManagerServicePrefs * prefs = KNetworkManagerServicePrefs::self();
196
 
    KConfigGroup config(prefs->config(), QLatin1String("Connection_") + connection->uuid());
 
201
    KConfigGroup config(prefs->config(), QLatin1String("Connection_") + QString(connection->uuid()));
197
202
    QStringList connectionIds = prefs->connections();
198
203
    // check if already present, we may be editing an existing Connection
199
204
    if (!connectionIds.contains(connection->uuid()))
225
230
        case Knm::Connection::Gsm:
226
231
            wid = new GsmConnectionEditor(args, parent);
227
232
            break;
 
233
        case Knm::Connection::Bluetooth:
 
234
            wid = new BluetoothConnectionEditor(args, parent);
 
235
            break;
228
236
        case Knm::Connection::Vpn:
229
237
            wid = new VpnPreferences(args, parent);
230
238
            break;
253
261
        case Knm::Connection::Gsm:
254
262
            wid = new GsmConnectionEditor(con, parent);
255
263
            break;
 
264
        case Knm::Connection::Bluetooth:
 
265
            wid = new BluetoothConnectionEditor(con, parent);
 
266
            break;
256
267
        case Knm::Connection::Vpn:
257
268
            wid = new VpnPreferences(con, parent);
258
269
            break;