Diffstat (limited to 'noncore/settings/networksettings2') (more/less context) (show whitespace changes)
15 files changed, 40 insertions, 34 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/config.in b/noncore/settings/networksettings2/bluetooth/config.in index e5155e8..b1a5a58 100644 --- a/noncore/settings/networksettings2/bluetooth/config.in +++ b/noncore/settings/networksettings2/bluetooth/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2BT | 1 | config NS2BT |
2 | boolean "opie-networksettings2plugin-bluetooth (set up BLUETOOTH)" | 2 | boolean "opie-networksettings2plugin-bluetooth (set up BLUETOOTH)" |
3 | default "n" if NS2 | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/cable/config.in b/noncore/settings/networksettings2/cable/config.in index 1cdcaa1..9007f14 100644 --- a/noncore/settings/networksettings2/cable/config.in +++ b/noncore/settings/networksettings2/cable/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2CABLE | 1 | config NS2CABLE |
2 | boolean "opie-networksettings2plugin-cable (set up Cable)" | 2 | boolean "opie-networksettings2plugin-cable (set up Cable)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/config.in b/noncore/settings/networksettings2/config.in index 1004ce4..ac38c2f 100644 --- a/noncore/settings/networksettings2/config.in +++ b/noncore/settings/networksettings2/config.in | |||
@@ -1,22 +1,23 @@ | |||
1 | source noncore/settings/networksettings2/networksettings2/config.in | ||
2 | |||
1 | config NS2 | 3 | config NS2 |
2 | boolean "opie-networksettings-2 (TCP/IP network settings)" | 4 | boolean |
3 | default "y" | 5 | default "y" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE | 6 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN |
5 | 7 | ||
6 | config NS2CORE | 8 | config NS2CORE |
7 | boolean | 9 | boolean |
8 | default "y" if NS2 | 10 | default "y" if NS2 |
9 | depends ( LIBQPE || LIBQPE-X11 ) && NS2 | 11 | depends ( LIBQPE || LIBQPE-X11 ) && NS2 |
10 | 12 | ||
11 | source noncore/settings/networksettings2/profile/config.in | 13 | source noncore/settings/networksettings2/profile/config.in |
12 | source noncore/settings/networksettings2/network/config.in | 14 | source noncore/settings/networksettings2/network/config.in |
13 | source noncore/settings/networksettings2/lancard/config.in | 15 | source noncore/settings/networksettings2/lancard/config.in |
14 | source noncore/settings/networksettings2/ppp/config.in | 16 | source noncore/settings/networksettings2/ppp/config.in |
15 | source noncore/settings/networksettings2/wlan/config.in | 17 | source noncore/settings/networksettings2/wlan/config.in |
16 | source noncore/settings/networksettings2/usb/config.in | 18 | source noncore/settings/networksettings2/usb/config.in |
17 | source noncore/settings/networksettings2/irda/config.in | 19 | source noncore/settings/networksettings2/irda/config.in |
18 | source noncore/settings/networksettings2/vpn/config.in | 20 | source noncore/settings/networksettings2/vpn/config.in |
19 | source noncore/settings/networksettings2/bluetooth/config.in | 21 | source noncore/settings/networksettings2/bluetooth/config.in |
20 | source noncore/settings/networksettings2/cable/config.in | 22 | source noncore/settings/networksettings2/cable/config.in |
21 | source noncore/settings/networksettings2/modem/config.in | 23 | source noncore/settings/networksettings2/modem/config.in |
22 | source noncore/settings/networksettings2/networksettings2/config.in | ||
diff --git a/noncore/settings/networksettings2/irda/config.in b/noncore/settings/networksettings2/irda/config.in index dd86b61..0da9a25 100644 --- a/noncore/settings/networksettings2/irda/config.in +++ b/noncore/settings/networksettings2/irda/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2IRDA | 1 | config NS2IRDA |
2 | boolean "opie-networksettings2plugin-irda (set up IRDA)" | 2 | boolean "opie-networksettings2plugin-irda (set up IRDA)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/lancard/config.in b/noncore/settings/networksettings2/lancard/config.in index 71fb83e..c694908 100644 --- a/noncore/settings/networksettings2/lancard/config.in +++ b/noncore/settings/networksettings2/lancard/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2LANCARD | 1 | config NS2LANCARD |
2 | boolean "opie-networksettings2plugin-lancard (regular wired lan card)" | 2 | boolean "opie-networksettings2plugin-lancard (regular wired lan card)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/main.cpp b/noncore/settings/networksettings2/main.cpp index b32b323..200e31b 100644 --- a/noncore/settings/networksettings2/main.cpp +++ b/noncore/settings/networksettings2/main.cpp | |||
@@ -54,24 +54,25 @@ int main( int argc, char * argv[] ) { | |||
54 | if( rmv ) { | 54 | if( rmv ) { |
55 | memmove( argv+i, argv+i+rmv, | 55 | memmove( argv+i, argv+i+rmv, |
56 | sizeof( char * ) * (argc-i-rmv) ); | 56 | sizeof( char * ) * (argc-i-rmv) ); |
57 | i --; | 57 | i --; |
58 | argc -= rmv; | 58 | argc -= rmv; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | if( strstr( argv[0], "-request" ) ) { | 62 | if( strstr( argv[0], "-request" ) ) { |
63 | // called from system to request something | 63 | // called from system to request something |
64 | GuiType = QApplication::Tty; | 64 | GuiType = QApplication::Tty; |
65 | Action = ACT_REQUEST; | 65 | Action = ACT_REQUEST; |
66 | Log(("Request : %s\n", argv[1] )); | ||
66 | } | 67 | } |
67 | 68 | ||
68 | // Start Qt | 69 | // Start Qt |
69 | #ifdef _WS_QWS_ | 70 | #ifdef _WS_QWS_ |
70 | // because QPEApplication does not handle GuiType well | 71 | // because QPEApplication does not handle GuiType well |
71 | if( GuiType == QApplication::Tty ) { | 72 | if( GuiType == QApplication::Tty ) { |
72 | // this cast is NOT correct but we do not use | 73 | // this cast is NOT correct but we do not use |
73 | // TheApp anymore ... | 74 | // TheApp anymore ... |
74 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); | 75 | TheApp = (QPEApplication *)new QApplication( argc, argv, GuiType ); |
75 | } else { | 76 | } else { |
76 | TheApp = new QPEApplication( argc, argv, GuiType ); | 77 | TheApp = new QPEApplication( argc, argv, GuiType ); |
77 | } | 78 | } |
diff --git a/noncore/settings/networksettings2/modem/config.in b/noncore/settings/networksettings2/modem/config.in index 1a36636..a354da0 100644 --- a/noncore/settings/networksettings2/modem/config.in +++ b/noncore/settings/networksettings2/modem/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2MODEM | 1 | config NS2MODEM |
2 | boolean "opie-networksettings2plugin-modem (set up DIALUP)" | 2 | boolean "opie-networksettings2plugin-modem (set up DIALUP)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/network/config.in b/noncore/settings/networksettings2/network/config.in index 4c37974..725b7f0 100644 --- a/noncore/settings/networksettings2/network/config.in +++ b/noncore/settings/networksettings2/network/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2NETWORK | 1 | config NS2NETWORK |
2 | boolean "opie-networksettings2plugin-ipsetup (set up TCP/IP)" | 2 | boolean "opie-networksettings2plugin-ipsetup (set up TCP/IP)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/networksettings2/config.in b/noncore/settings/networksettings2/networksettings2/config.in index 907f1a0..2b4e2f3 100644 --- a/noncore/settings/networksettings2/networksettings2/config.in +++ b/noncore/settings/networksettings2/networksettings2/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2MAIN | 1 | config NS2MAIN |
2 | boolean | 2 | boolean "opie-networksettings2 (TCP/IP network settings)" |
3 | default "y" if NS2 | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE |
diff --git a/noncore/settings/networksettings2/networksettings2/wextensions.cpp b/noncore/settings/networksettings2/networksettings2/wextensions.cpp index 778990c..c10bdc3 100644 --- a/noncore/settings/networksettings2/networksettings2/wextensions.cpp +++ b/noncore/settings/networksettings2/networksettings2/wextensions.cpp | |||
@@ -43,39 +43,43 @@ WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), i | |||
43 | 43 | ||
44 | /** | 44 | /** |
45 | * @return QString the station name of the access point. | 45 | * @return QString the station name of the access point. |
46 | */ | 46 | */ |
47 | QString WExtensions::station(){ | 47 | QString WExtensions::station(){ |
48 | if(!hasWirelessExtensions) | 48 | if(!hasWirelessExtensions) |
49 | return QString(); | 49 | return QString(); |
50 | const char* buffer[200]; | 50 | const char* buffer[200]; |
51 | iwr.u.data.pointer = (caddr_t) buffer; | 51 | iwr.u.data.pointer = (caddr_t) buffer; |
52 | iwr.u.data.length = IW_ESSID_MAX_SIZE; | 52 | iwr.u.data.length = IW_ESSID_MAX_SIZE; |
53 | iwr.u.data.flags = 0; | 53 | iwr.u.data.flags = 0; |
54 | if ( 0 == ioctl( fd, SIOCGIWNICKN, &iwr )){ | 54 | if ( 0 == ioctl( fd, SIOCGIWNICKN, &iwr )){ |
55 | iwr.u.data.pointer[(unsigned int) iwr.u.data.length-1] = '\0'; | 55 | buffer[(unsigned int) iwr.u.data.length-1] = '\0'; |
56 | return QString(iwr.u.data.pointer); | 56 | return (const char *)buffer; |
57 | } | 57 | } |
58 | return QString(); | 58 | return QString::null; |
59 | } | 59 | } |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * @return QString the essid of the host 802.11 access point. | 62 | * @return QString the essid of the host 802.11 access point. |
63 | */ | 63 | */ |
64 | QString WExtensions::essid(){ | 64 | QString WExtensions::essid(){ |
65 | if(!hasWirelessExtensions) | 65 | if(!hasWirelessExtensions) |
66 | return QString(); | 66 | return QString(); |
67 | const char* buffer[200]; | ||
68 | iwr.u.data.pointer = (caddr_t) buffer; | ||
69 | iwr.u.data.length = IW_ESSID_MAX_SIZE; | ||
70 | iwr.u.data.flags = 0; | ||
67 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr )){ | 71 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr )){ |
68 | iwr.u.essid.pointer[(unsigned int) iwr.u.essid.length] = '\0'; | 72 | buffer[(unsigned int) iwr.u.essid.length] = '\0'; |
69 | return QString(iwr.u.essid.pointer); | 73 | return (const char *)buffer; |
70 | } | 74 | } |
71 | return QString(); | 75 | return QString(); |
72 | } | 76 | } |
73 | 77 | ||
74 | /** | 78 | /** |
75 | * @return QString the mode of interface | 79 | * @return QString the mode of interface |
76 | */ | 80 | */ |
77 | QString WExtensions::mode(){ | 81 | QString WExtensions::mode(){ |
78 | if(!hasWirelessExtensions) | 82 | if(!hasWirelessExtensions) |
79 | return QString(); | 83 | return QString(); |
80 | if ( 0 == ioctl( fd, SIOCGIWMODE, &iwr ) ) | 84 | if ( 0 == ioctl( fd, SIOCGIWMODE, &iwr ) ) |
81 | return QString("%1").arg(iwr.u.mode == IW_MODE_ADHOC ? "Ad-Hoc" : "Managed"); | 85 | return QString("%1").arg(iwr.u.mode == IW_MODE_ADHOC ? "Ad-Hoc" : "Managed"); |
diff --git a/noncore/settings/networksettings2/ppp/config.in b/noncore/settings/networksettings2/ppp/config.in index 9e3cd35..c722a10 100644 --- a/noncore/settings/networksettings2/ppp/config.in +++ b/noncore/settings/networksettings2/ppp/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2PPP | 1 | config NS2PPP |
2 | boolean "opie-networksettings2plugin-ppp (set up PPP)" | 2 | boolean "opie-networksettings2plugin-ppp (set up PPP)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/profile/config.in b/noncore/settings/networksettings2/profile/config.in index c5f2075..f99ef99 100644 --- a/noncore/settings/networksettings2/profile/config.in +++ b/noncore/settings/networksettings2/profile/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2PROFILE | 1 | config NS2PROFILE |
2 | boolean "opie-networksettings2plugin-profiles (User profiles)" | 2 | boolean "opie-networksettings2plugin-profiles (User profiles)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/usb/config.in b/noncore/settings/networksettings2/usb/config.in index 136806d..d0c6cba 100644 --- a/noncore/settings/networksettings2/usb/config.in +++ b/noncore/settings/networksettings2/usb/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2USB | 1 | config NS2USB |
2 | boolean "opie-networksettings2plugin-usb (set up USB)" | 2 | boolean "opie-networksettings2plugin-usb (set up USB)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/vpn/config.in b/noncore/settings/networksettings2/vpn/config.in index fff52c3..0d2cb3a 100644 --- a/noncore/settings/networksettings2/vpn/config.in +++ b/noncore/settings/networksettings2/vpn/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2VPN | 1 | config NS2VPN |
2 | boolean "opie-networksettings2plugin-vpn (set up VPN)" | 2 | boolean "opie-networksettings2plugin-vpn (set up VPN)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |
diff --git a/noncore/settings/networksettings2/wlan/config.in b/noncore/settings/networksettings2/wlan/config.in index 328287b..13ef9da 100644 --- a/noncore/settings/networksettings2/wlan/config.in +++ b/noncore/settings/networksettings2/wlan/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config NS2WLAN | 1 | config NS2WLAN |
2 | boolean "opie-networksettings2plugin-wlan (set up Wireless LAN)" | 2 | boolean "opie-networksettings2plugin-wlan (set up Wireless LAN)" |
3 | default "n" if NS2 | 3 | default "n" if NS2MAIN |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2 && NS2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2MAIN && NS2CORE |