Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 74eef5f..517604f 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -76,49 +76,48 @@ bool WLANImp::writeConfig() | |||
76 | if( networkInfrastructure->isChecked() ){ | 76 | if( networkInfrastructure->isChecked() ){ |
77 | config.writeEntry( "Mode", "Managed" ); | 77 | config.writeEntry( "Mode", "Managed" ); |
78 | } else if( network802->isChecked() ){ | 78 | } else if( network802->isChecked() ){ |
79 | config.writeEntry( "Mode", "adhoc" ); | 79 | config.writeEntry( "Mode", "adhoc" ); |
80 | } | 80 | } |
81 | config.writeEntry( "CHANNEL", networkChannel->value() ); | 81 | config.writeEntry( "CHANNEL", networkChannel->value() ); |
82 | // config.readEntry( "RATE", "auto" ); | 82 | // config.readEntry( "RATE", "auto" ); |
83 | wepEnabled->isChecked() ? config.writeEntry( "dot11PrivacyInvoked", "true" ) : config.writeEntry( "dot11PrivacyInvoked", "false" ); | 83 | wepEnabled->isChecked() ? config.writeEntry( "dot11PrivacyInvoked", "true" ) : config.writeEntry( "dot11PrivacyInvoked", "false" ); |
84 | authOpen->isChecked() ? config.writeEntry( "AuthType", "opensystem" ) : config.writeEntry( "AuthType", "sharedkey" ); | 84 | authOpen->isChecked() ? config.writeEntry( "AuthType", "opensystem" ) : config.writeEntry( "AuthType", "sharedkey" ); |
85 | key40->isChecked() ? config.writeEntry( "PRIV_KEY128", "false" ) : config.writeEntry( "PRIV_KEY128", "true" ); | 85 | key40->isChecked() ? config.writeEntry( "PRIV_KEY128", "false" ) : config.writeEntry( "PRIV_KEY128", "true" ); |
86 | if( keyRadio0->isChecked() ){ | 86 | if( keyRadio0->isChecked() ){ |
87 | config.writeEntry( "dot11WEPDefaultKeyID", 0 ); | 87 | config.writeEntry( "dot11WEPDefaultKeyID", 0 ); |
88 | } else if( keyRadio1->isChecked() ){ | 88 | } else if( keyRadio1->isChecked() ){ |
89 | config.writeEntry( "dot11WEPDefaultKeyID", 1 ); | 89 | config.writeEntry( "dot11WEPDefaultKeyID", 1 ); |
90 | } else if( keyRadio2->isChecked() ){ | 90 | } else if( keyRadio2->isChecked() ){ |
91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); | 91 | config.writeEntry( "dot11WEPDefaultKeyID", 2 ); |
92 | } else if( keyRadio3->isChecked() ){ | 92 | } else if( keyRadio3->isChecked() ){ |
93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); | 93 | config.writeEntry( "dot11WEPDefaultKeyID", 3 ); |
94 | } | 94 | } |
95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); | 95 | config.writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); |
96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); | 96 | config.writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); |
97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); | 97 | config.writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); |
98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); | 98 | config.writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); |
99 | return writeWirelessOpts( config ); | 99 | return writeWirelessOpts( config ); |
100 | // return true; | ||
101 | } | 100 | } |
102 | 101 | ||
103 | /** | 102 | /** |
104 | */ | 103 | */ |
105 | void WLANImp::accept() | 104 | void WLANImp::accept() |
106 | { | 105 | { |
107 | if ( writeConfig() ) | 106 | if ( writeConfig() ) |
108 | QDialog::accept(); | 107 | QDialog::accept(); |
109 | } | 108 | } |
110 | 109 | ||
111 | void WLANImp::done ( int r ) | 110 | void WLANImp::done ( int r ) |
112 | { | 111 | { |
113 | QDialog::done ( r ); | 112 | QDialog::done ( r ); |
114 | close ( ); | 113 | close ( ); |
115 | } | 114 | } |
116 | 115 | ||
117 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) | 116 | bool WLANImp::writeWirelessOpts( Config &config, QString scheme ) |
118 | { | 117 | { |
119 | qWarning( "WLANImp::writeWirelessOpts entered." ); | 118 | qWarning( "WLANImp::writeWirelessOpts entered." ); |
120 | QString prev = "/etc/pcmcia/wireless.opts"; | 119 | QString prev = "/etc/pcmcia/wireless.opts"; |
121 | QFile prevFile(prev); | 120 | QFile prevFile(prev); |
122 | if ( !prevFile.open( IO_ReadOnly ) ) | 121 | if ( !prevFile.open( IO_ReadOnly ) ) |
123 | return false; | 122 | return false; |
124 | 123 | ||
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 9d34d75..53b5857 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -11,49 +11,49 @@ WLANModule::WLANModule() : Module() { | |||
11 | 11 | ||
12 | /** | 12 | /** |
13 | * Change the current profile | 13 | * Change the current profile |
14 | */ | 14 | */ |
15 | void WLANModule::setProfile(QString newProfile){ | 15 | void WLANModule::setProfile(QString newProfile){ |
16 | profile = newProfile; | 16 | profile = newProfile; |
17 | } | 17 | } |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * get the icon name for this device. | 20 | * get the icon name for this device. |
21 | * @param Interface* can be used in determining the icon. | 21 | * @param Interface* can be used in determining the icon. |
22 | * @return QString the icon name (minus .png, .gif etc) | 22 | * @return QString the icon name (minus .png, .gif etc) |
23 | */ | 23 | */ |
24 | QString WLANModule::getPixmapName(Interface* ){ | 24 | QString WLANModule::getPixmapName(Interface* ){ |
25 | return "wlan"; | 25 | return "wlan"; |
26 | } | 26 | } |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Check to see if the interface i is owned by this module. | 29 | * Check to see if the interface i is owned by this module. |
30 | * @param Interface* interface to check against | 30 | * @param Interface* interface to check against |
31 | * @return bool true if i is owned by this module, false otherwise. | 31 | * @return bool true if i is owned by this module, false otherwise. |
32 | */ | 32 | */ |
33 | bool WLANModule::isOwner(Interface *i){ | 33 | bool WLANModule::isOwner(Interface *i){ |
34 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){ | 34 | if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){ |
35 | i->setHardwareName(QString("802.11b (%1)").arg(i->getInterfaceName())); | 35 | i->setHardwareName("802.11b"); |
36 | return true; | 36 | return true; |
37 | } | 37 | } |
38 | return false; | 38 | return false; |
39 | } | 39 | } |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Create, set tabWiget and return the WLANConfigure Module | 42 | * Create, set tabWiget and return the WLANConfigure Module |
43 | * @param tabWidget a pointer to the tab widget that this configure has. | 43 | * @param tabWidget a pointer to the tab widget that this configure has. |
44 | * @return QWidget* pointer to the tab widget in this modules configure. | 44 | * @return QWidget* pointer to the tab widget in this modules configure. |
45 | */ | 45 | */ |
46 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ | 46 | QWidget *WLANModule::configure(QTabWidget **tabWidget){ |
47 | Config *cfg = new Config("wireless"); | 47 | Config *cfg = new Config("wireless"); |
48 | WLANImp *wlanconfig = new WLANImp(*cfg); | 48 | WLANImp *wlanconfig = new WLANImp(*cfg); |
49 | (*tabWidget) = wlanconfig->tabWidget; | 49 | (*tabWidget) = wlanconfig->tabWidget; |
50 | return wlanconfig; | 50 | return wlanconfig; |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Create, set tabWiget and return the Information Module | 54 | * Create, set tabWiget and return the Information Module |
55 | * @param tabWidget a pointer to the tab widget that this information has. | 55 | * @param tabWidget a pointer to the tab widget that this information has. |
56 | * @return QWidget* pointer to the tab widget in this modules info. | 56 | * @return QWidget* pointer to the tab widget in this modules info. |
57 | */ | 57 | */ |
58 | QWidget *WLANModule::information(QTabWidget **tabWidget){ | 58 | QWidget *WLANModule::information(QTabWidget **tabWidget){ |
59 | return NULL; | 59 | return NULL; |