author | mickeyl <mickeyl> | 2005-05-10 10:32:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-10 10:32:46 (UTC) |
commit | 9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e (patch) (unidiff) | |
tree | a1f50132c3acea6e593fcdc1484798ed237cb157 | |
parent | 2272a0d2ae787ad50768910ac1c7be59a073031a (diff) | |
download | opie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.zip opie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.tar.gz opie-9bcf6a5112d31ffdc196ebcd22a584c68f9f7b1e.tar.bz2 |
ignore hostap control interfaces
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindow/mainwindowimp.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
@@ -1,117 +1,118 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
9 | 9 | ||
10 | Fixed Bugs | 10 | Fixed Bugs |
11 | ---------- | 11 | ---------- |
12 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 12 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
13 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 13 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
14 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 14 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
15 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 15 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
16 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 16 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) |
17 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 17 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
18 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 18 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
19 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) | 19 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) |
20 | * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) | 20 | * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) |
21 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 21 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
22 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | ||
22 | 23 | ||
23 | Internal | 24 | Internal |
24 | -------- | 25 | -------- |
25 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 26 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
26 | * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) | 27 | * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) |
27 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 28 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
28 | 29 | ||
29 | 2005-03-25Opie 1.2.0 | 30 | 2005-03-25Opie 1.2.0 |
30 | 31 | ||
31 | Fixed Bugs | 32 | Fixed Bugs |
32 | ---------- | 33 | ---------- |
33 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 34 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
34 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 35 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
35 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 36 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
36 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 37 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
37 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 38 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
38 | 39 | ||
39 | 2005-03-20Opie 1.2.0-rc1 | 40 | 2005-03-20Opie 1.2.0-rc1 |
40 | 41 | ||
41 | 42 | ||
42 | New Features | 43 | New Features |
43 | ------------ | 44 | ------------ |
44 | * Launcher: Support a static background pixmap (mickeyl) | 45 | * Launcher: Support a static background pixmap (mickeyl) |
45 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 46 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
46 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 47 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
47 | * Added hi-res inline images for large resolution devices (drw) | 48 | * Added hi-res inline images for large resolution devices (drw) |
48 | * Improved launcher icons for consistency (ar) | 49 | * Improved launcher icons for consistency (ar) |
49 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 50 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
50 | 51 | ||
51 | Fixed Bugs | 52 | Fixed Bugs |
52 | ---------- | 53 | ---------- |
53 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 54 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
54 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 55 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
55 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 56 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
56 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 57 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
57 | * #1482 - Fix double '/' in paths (zecke) | 58 | * #1482 - Fix double '/' in paths (zecke) |
58 | * #1536 - Autosave of custom locations in opie backup (ar) | 59 | * #1536 - Autosave of custom locations in opie backup (ar) |
59 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 60 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
60 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 61 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
61 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 62 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
62 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 63 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
63 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 64 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
64 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 65 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
65 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 66 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
66 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 67 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
67 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 68 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
68 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 69 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
69 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 70 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
70 | * #1604 - Checkbook crashed on startup (drw) | 71 | * #1604 - Checkbook crashed on startup (drw) |
71 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 72 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
72 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 73 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
73 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 74 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
74 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 75 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
75 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 76 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
76 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 77 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
77 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 78 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
78 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 79 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
79 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 80 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
80 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 81 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
81 | 82 | ||
82 | Internal | 83 | Internal |
83 | -------- | 84 | -------- |
84 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 85 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
85 | * Killed the need for weak symbols in QtE (zecke) | 86 | * Killed the need for weak symbols in QtE (zecke) |
86 | * Added optional building libqpe without inline images (mickeyl) | 87 | * Added optional building libqpe without inline images (mickeyl) |
87 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 88 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
88 | 89 | ||
89 | 2005-02-03Opie 1.1.9 | 90 | 2005-02-03Opie 1.1.9 |
90 | 91 | ||
91 | New Features | 92 | New Features |
92 | ------------ | 93 | ------------ |
93 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 94 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
94 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 95 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
95 | * Usability enhancements in OpieIRC (skyhusker) | 96 | * Usability enhancements in OpieIRC (skyhusker) |
96 | 97 | ||
97 | Fixed Bugs | 98 | Fixed Bugs |
98 | ---------- | 99 | ---------- |
99 | * #1501 - Fixed bug in todo sql backend (eilers) | 100 | * #1501 - Fixed bug in todo sql backend (eilers) |
100 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 101 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
101 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 102 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
102 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 103 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
103 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 104 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
104 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 105 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
105 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 106 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
106 | 107 | ||
107 | Internal | 108 | Internal |
108 | -------- | 109 | -------- |
109 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 110 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
110 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 111 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
111 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 112 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
112 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 113 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
113 | * Build tree cleanups (mickeyl) | 114 | * Build tree cleanups (mickeyl) |
114 | 115 | ||
115 | 2004-11-26Opie 1.1.8 | 116 | 2004-11-26Opie 1.1.8 |
116 | 117 | ||
117 | New Features | 118 | New Features |
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp index 3222e50..a7b0bdc 100644 --- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp | |||
@@ -96,210 +96,212 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi | |||
96 | i->setAttached(false); | 96 | i->setAttached(false); |
97 | i->setHardwareName(tr("Disconnected")); | 97 | i->setHardwareName(tr("Disconnected")); |
98 | interfaceNames.insert(i->getInterfaceName(), i); | 98 | interfaceNames.insert(i->getInterfaceName(), i); |
99 | updateInterface(i); | 99 | updateInterface(i); |
100 | connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*))); | 100 | connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*))); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | //getInterfaceList(); | 105 | //getInterfaceList(); |
106 | connectionList->header()->hide(); | 106 | connectionList->header()->hide(); |
107 | 107 | ||
108 | Config cfg("NetworkSetup"); | 108 | Config cfg("NetworkSetup"); |
109 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | 109 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); |
110 | for ( QStringList::Iterator it = profiles.begin(); | 110 | for ( QStringList::Iterator it = profiles.begin(); |
111 | it != profiles.end(); ++it) | 111 | it != profiles.end(); ++it) |
112 | profilesList->insertItem((*it)); | 112 | profilesList->insertItem((*it)); |
113 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); | 113 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); |
114 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); | 114 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); |
115 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); | 115 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); |
116 | 116 | ||
117 | QFile file(scheme); | 117 | QFile file(scheme); |
118 | if ( file.open(IO_ReadOnly) ) | 118 | if ( file.open(IO_ReadOnly) ) |
119 | { // file opened successfully | 119 | { // file opened successfully |
120 | QTextStream stream( &file ); // use a text stream | 120 | QTextStream stream( &file ); // use a text stream |
121 | while ( !stream.eof() ) | 121 | while ( !stream.eof() ) |
122 | { // until end of file... | 122 | { // until end of file... |
123 | QString line = stream.readLine(); // line of text excluding '\n' | 123 | QString line = stream.readLine(); // line of text excluding '\n' |
124 | if(line.contains("SCHEME")) | 124 | if(line.contains("SCHEME")) |
125 | { | 125 | { |
126 | line = line.mid(7, line.length()); | 126 | line = line.mid(7, line.length()); |
127 | currentProfileLabel->setText(line); | 127 | currentProfileLabel->setText(line); |
128 | break; | 128 | break; |
129 | } | 129 | } |
130 | } | 130 | } |
131 | file.close(); | 131 | file.close(); |
132 | } | 132 | } |
133 | makeChannel(); | 133 | makeChannel(); |
134 | initHostname(); | 134 | initHostname(); |
135 | } | 135 | } |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * Deconstructor. Save profiles. Delete loaded libraries. | 138 | * Deconstructor. Save profiles. Delete loaded libraries. |
139 | */ | 139 | */ |
140 | MainWindowImp::~MainWindowImp() | 140 | MainWindowImp::~MainWindowImp() |
141 | { | 141 | { |
142 | // Save profiles. | 142 | // Save profiles. |
143 | Config cfg("NetworkSetup"); | 143 | Config cfg("NetworkSetup"); |
144 | cfg.setGroup("General"); | 144 | cfg.setGroup("General"); |
145 | cfg.writeEntry("Profiles", profiles.join(" ")); | 145 | cfg.writeEntry("Profiles", profiles.join(" ")); |
146 | 146 | ||
147 | // Delete all interfaces that don't have owners. | 147 | // Delete all interfaces that don't have owners. |
148 | QMap<Interface*, QListViewItem*>::Iterator iIt; | 148 | QMap<Interface*, QListViewItem*>::Iterator iIt; |
149 | for( iIt = items.begin(); iIt != items.end(); ++iIt ) | 149 | for( iIt = items.begin(); iIt != items.end(); ++iIt ) |
150 | { | 150 | { |
151 | if(iIt.key()->getModuleOwner() == NULL) | 151 | if(iIt.key()->getModuleOwner() == NULL) |
152 | delete iIt.key(); | 152 | delete iIt.key(); |
153 | } | 153 | } |
154 | 154 | ||
155 | // Delete Modules and Libraries | 155 | // Delete Modules and Libraries |
156 | QMap<Module*, QLibrary*>::Iterator it; | 156 | QMap<Module*, QLibrary*>::Iterator it; |
157 | for( it = libraries.begin(); it != libraries.end(); ++it ) | 157 | for( it = libraries.begin(); it != libraries.end(); ++it ) |
158 | { | 158 | { |
159 | delete it.key(); | 159 | delete it.key(); |
160 | // I wonder why I can't delete the libraries | 160 | // I wonder why I can't delete the libraries |
161 | // What fucking shit this is. | 161 | // What fucking shit this is. |
162 | //delete it.data(); | 162 | //delete it.data(); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * Query the kernel for all of the interfaces. | 167 | * Query the kernel for all of the interfaces. |
168 | */ | 168 | */ |
169 | void MainWindowImp::getAllInterfaces() | 169 | void MainWindowImp::getAllInterfaces() |
170 | { | 170 | { |
171 | int sockfd = socket(PF_INET, SOCK_DGRAM, 0); | 171 | int sockfd = socket(PF_INET, SOCK_DGRAM, 0); |
172 | if(sockfd == -1) | 172 | if(sockfd == -1) |
173 | return; | 173 | return; |
174 | 174 | ||
175 | struct ifreq ifr; | 175 | struct ifreq ifr; |
176 | QStringList ifaces; | 176 | QStringList ifaces; |
177 | QFile procFile(QString(_PROCNETDEV)); | 177 | QFile procFile(QString(_PROCNETDEV)); |
178 | int result; | 178 | int result; |
179 | Interface *i; | 179 | Interface *i; |
180 | 180 | ||
181 | if (! procFile.exists()) | 181 | if (! procFile.exists()) |
182 | { | 182 | { |
183 | struct ifreq ifrs[100]; | 183 | struct ifreq ifrs[100]; |
184 | struct ifconf ifc; | 184 | struct ifconf ifc; |
185 | ifc.ifc_len = sizeof(ifrs); | 185 | ifc.ifc_len = sizeof(ifrs); |
186 | ifc.ifc_req = ifrs; | 186 | ifc.ifc_req = ifrs; |
187 | result = ioctl(sockfd, SIOCGIFCONF, &ifc); | 187 | result = ioctl(sockfd, SIOCGIFCONF, &ifc); |
188 | 188 | ||
189 | for (unsigned int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); i++) | 189 | for (unsigned int i = 0; i < ifc.ifc_len / sizeof(struct ifreq); i++) |
190 | { | 190 | { |
191 | struct ifreq *pifr = &ifrs[i]; | 191 | struct ifreq *pifr = &ifrs[i]; |
192 | 192 | if ( !QString( pifr->ifr_name ).startsWith( "wifi" ) ) ifaces += pifr->ifr_name; | |
193 | ifaces += pifr->ifr_name; | 193 | else odebug << "ignoring hostap control interface " << pifr->ifr_name << oendl; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | else | 196 | else |
197 | { | 197 | { |
198 | procFile.open(IO_ReadOnly); | 198 | procFile.open(IO_ReadOnly); |
199 | QString line; | 199 | QString line; |
200 | QTextStream procTs(&procFile); | 200 | QTextStream procTs(&procFile); |
201 | int loc = -1; | 201 | int loc = -1; |
202 | 202 | ||
203 | procTs.readLine(); // eat a line | 203 | procTs.readLine(); // eat a line |
204 | procTs.readLine(); // eat a line | 204 | procTs.readLine(); // eat a line |
205 | while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) | 205 | while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) |
206 | { | 206 | { |
207 | if((loc = line.find(":")) != -1) | 207 | if((loc = line.find(":")) != -1) |
208 | { | 208 | { |
209 | ifaces += line.left(loc); | 209 | // ignore wifi* (hostap control interfaces) |
210 | if ( !line.left(loc).startsWith( "wifi" ) ) ifaces += line.left(loc); | ||
211 | else odebug << "ignoring hostap control interface " << line.left(loc) << oendl; | ||
210 | } | 212 | } |
211 | } | 213 | } |
212 | } | 214 | } |
213 | 215 | ||
214 | for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) | 216 | for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) |
215 | { | 217 | { |
216 | int flags = 0; | 218 | int flags = 0; |
217 | if ( m_handledIfaces.contains( (*it) ) ) | 219 | if ( m_handledIfaces.contains( (*it) ) ) |
218 | { | 220 | { |
219 | odebug << " " << (*it).latin1() << " is handled by a module" << oendl; | 221 | odebug << " " << (*it).latin1() << " is handled by a module" << oendl; |
220 | continue; | 222 | continue; |
221 | } | 223 | } |
222 | // int family; | 224 | // int family; |
223 | i = NULL; | 225 | i = NULL; |
224 | 226 | ||
225 | strcpy(ifr.ifr_name, (*it).latin1()); | 227 | strcpy(ifr.ifr_name, (*it).latin1()); |
226 | 228 | ||
227 | struct ifreq ifcopy; | 229 | struct ifreq ifcopy; |
228 | ifcopy = ifr; | 230 | ifcopy = ifr; |
229 | result = ioctl(sockfd, SIOCGIFFLAGS, &ifcopy); | 231 | result = ioctl(sockfd, SIOCGIFFLAGS, &ifcopy); |
230 | flags = ifcopy.ifr_flags; | 232 | flags = ifcopy.ifr_flags; |
231 | i = new Interface(this, ifr.ifr_name, false); | 233 | i = new Interface(this, ifr.ifr_name, false); |
232 | i->setAttached(true); | 234 | i->setAttached(true); |
233 | if ((flags & IFF_UP) == IFF_UP) | 235 | if ((flags & IFF_UP) == IFF_UP) |
234 | i->setStatus(true); | 236 | i->setStatus(true); |
235 | else | 237 | else |
236 | i->setStatus(false); | 238 | i->setStatus(false); |
237 | 239 | ||
238 | if ((flags & IFF_BROADCAST) == IFF_BROADCAST) | 240 | if ((flags & IFF_BROADCAST) == IFF_BROADCAST) |
239 | i->setHardwareName("Ethernet"); | 241 | i->setHardwareName("Ethernet"); |
240 | else if ((flags & IFF_POINTOPOINT) == IFF_POINTOPOINT) | 242 | else if ((flags & IFF_POINTOPOINT) == IFF_POINTOPOINT) |
241 | i->setHardwareName("Point to Point"); | 243 | i->setHardwareName("Point to Point"); |
242 | else if ((flags & IFF_MULTICAST) == IFF_MULTICAST) | 244 | else if ((flags & IFF_MULTICAST) == IFF_MULTICAST) |
243 | i->setHardwareName("Multicast"); | 245 | i->setHardwareName("Multicast"); |
244 | else if ((flags & IFF_LOOPBACK) == IFF_LOOPBACK) | 246 | else if ((flags & IFF_LOOPBACK) == IFF_LOOPBACK) |
245 | i->setHardwareName("Loopback"); | 247 | i->setHardwareName("Loopback"); |
246 | else | 248 | else |
247 | i->setHardwareName("Unknown"); | 249 | i->setHardwareName("Unknown"); |
248 | 250 | ||
249 | owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl; | 251 | owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl; |
250 | interfaceNames.insert(i->getInterfaceName(), i); | 252 | interfaceNames.insert(i->getInterfaceName(), i); |
251 | updateInterface(i); | 253 | updateInterface(i); |
252 | connect(i, SIGNAL(updateInterface(Interface*)), | 254 | connect(i, SIGNAL(updateInterface(Interface*)), |
253 | this, SLOT(updateInterface(Interface*))); | 255 | this, SLOT(updateInterface(Interface*))); |
254 | } | 256 | } |
255 | // now lets ask the plugins too ;) | 257 | // now lets ask the plugins too ;) |
256 | QMap<Module*, QLibrary*>::Iterator it; | 258 | QMap<Module*, QLibrary*>::Iterator it; |
257 | QList<Interface> ilist; | 259 | QList<Interface> ilist; |
258 | for( it = libraries.begin(); it != libraries.end(); ++it ) | 260 | for( it = libraries.begin(); it != libraries.end(); ++it ) |
259 | { | 261 | { |
260 | if(it.key()) | 262 | if(it.key()) |
261 | { | 263 | { |
262 | ilist = it.key()->getInterfaces(); | 264 | ilist = it.key()->getInterfaces(); |
263 | for( i = ilist.first(); i != 0; i = ilist.next() ) | 265 | for( i = ilist.first(); i != 0; i = ilist.next() ) |
264 | { | 266 | { |
265 | owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl; | 267 | owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl; |
266 | interfaceNames.insert(i->getInterfaceName(), i); | 268 | interfaceNames.insert(i->getInterfaceName(), i); |
267 | updateInterface(i); | 269 | updateInterface(i); |
268 | connect(i, SIGNAL(updateInterface(Interface*)), | 270 | connect(i, SIGNAL(updateInterface(Interface*)), |
269 | this, SLOT(updateInterface(Interface*))); | 271 | this, SLOT(updateInterface(Interface*))); |
270 | } | 272 | } |
271 | } | 273 | } |
272 | } | 274 | } |
273 | } | 275 | } |
274 | 276 | ||
275 | /** | 277 | /** |
276 | * Load all modules that are found in the path | 278 | * Load all modules that are found in the path |
277 | * @param path a directory that is scaned for any plugins that can be loaded | 279 | * @param path a directory that is scaned for any plugins that can be loaded |
278 | * and attempts to load them | 280 | * and attempts to load them |
279 | */ | 281 | */ |
280 | void MainWindowImp::loadModules(const QString &path) | 282 | void MainWindowImp::loadModules(const QString &path) |
281 | { | 283 | { |
282 | #ifdef DEBUG | 284 | #ifdef DEBUG |
283 | odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; | 285 | odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; |
284 | #endif | 286 | #endif |
285 | QDir d(path); | 287 | QDir d(path); |
286 | if(!d.exists()) | 288 | if(!d.exists()) |
287 | return; | 289 | return; |
288 | 290 | ||
289 | QString lang = ::getenv("LANG"); | 291 | QString lang = ::getenv("LANG"); |
290 | // Don't want sym links | 292 | // Don't want sym links |
291 | d.setFilter( QDir::Files | QDir::NoSymLinks ); | 293 | d.setFilter( QDir::Files | QDir::NoSymLinks ); |
292 | const QFileInfoList *list = d.entryInfoList(); | 294 | const QFileInfoList *list = d.entryInfoList(); |
293 | QFileInfoListIterator it( *list ); | 295 | QFileInfoListIterator it( *list ); |
294 | QFileInfo *fi; | 296 | QFileInfo *fi; |
295 | while ( (fi=it.current()) ) | 297 | while ( (fi=it.current()) ) |
296 | { | 298 | { |
297 | if(fi->fileName().contains(".so")) | 299 | if(fi->fileName().contains(".so")) |
298 | { | 300 | { |
299 | /* if loaded install translation */ | 301 | /* if loaded install translation */ |
300 | if( loadPlugin(path + "/" + fi->fileName()) != 0l ){ | 302 | if( loadPlugin(path + "/" + fi->fileName()) != 0l ){ |
301 | QTranslator *trans = new QTranslator(qApp); | 303 | QTranslator *trans = new QTranslator(qApp); |
302 | QString fn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm"; | 304 | QString fn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm"; |
303 | if( trans->load( fn ) ) | 305 | if( trans->load( fn ) ) |
304 | qApp->installTranslator( trans ); | 306 | qApp->installTranslator( trans ); |
305 | else | 307 | else |