3 files changed, 7 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetup.ui b/noncore/settings/networksettings/interfaces/interfacesetup.ui index efcab8b..fa2db40 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetup.ui +++ b/noncore/settings/networksettings/interfaces/interfacesetup.ui | |||
@@ -1,62 +1,62 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>InterfaceSetup</class> | 2 | <class>InterfaceSetup</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>InterfaceSetup</cstring> | 7 | <cstring>InterfaceSetup</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>286</width> | 14 | <width>282</width> |
15 | <height>280</height> | 15 | <height>280</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Interface Configuration</string> | 20 | <string>Interface Configuration</string> |
21 | </property> | 21 | </property> |
22 | <vbox> | 22 | <vbox> |
23 | <property stdset="1"> | 23 | <property stdset="1"> |
24 | <name>margin</name> | 24 | <name>margin</name> |
25 | <number>11</number> | 25 | <number>11</number> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>spacing</name> | 28 | <name>spacing</name> |
29 | <number>6</number> | 29 | <number>6</number> |
30 | </property> | 30 | </property> |
31 | <widget> | 31 | <widget> |
32 | <class>QCheckBox</class> | 32 | <class>QCheckBox</class> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>name</name> | 34 | <name>name</name> |
35 | <cstring>autoStart</cstring> | 35 | <cstring>autoStart</cstring> |
36 | </property> | 36 | </property> |
37 | <property stdset="1"> | 37 | <property stdset="1"> |
38 | <name>text</name> | 38 | <name>text</name> |
39 | <string>Automatically bring up</string> | 39 | <string>Automatically bring up</string> |
40 | </property> | 40 | </property> |
41 | </widget> | 41 | </widget> |
42 | <widget> | 42 | <widget> |
43 | <class>QCheckBox</class> | 43 | <class>QCheckBox</class> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>name</name> | 45 | <name>name</name> |
46 | <cstring>dhcpCheckBox</cstring> | 46 | <cstring>dhcpCheckBox</cstring> |
47 | </property> | 47 | </property> |
48 | <property stdset="1"> | 48 | <property stdset="1"> |
49 | <name>text</name> | 49 | <name>text</name> |
50 | <string>DHCP</string> | 50 | <string>DHCP</string> |
51 | </property> | 51 | </property> |
52 | <property stdset="1"> | 52 | <property stdset="1"> |
53 | <name>checked</name> | 53 | <name>checked</name> |
54 | <bool>true</bool> | 54 | <bool>true</bool> |
55 | </property> | 55 | </property> |
56 | </widget> | 56 | </widget> |
57 | <widget> | 57 | <widget> |
58 | <class>QGroupBox</class> | 58 | <class>QGroupBox</class> |
59 | <property stdset="1"> | 59 | <property stdset="1"> |
60 | <name>name</name> | 60 | <name>name</name> |
61 | <cstring>staticGroupBox</cstring> | 61 | <cstring>staticGroupBox</cstring> |
62 | </property> | 62 | </property> |
@@ -64,96 +64,100 @@ | |||
64 | <name>enabled</name> | 64 | <name>enabled</name> |
65 | <bool>false</bool> | 65 | <bool>false</bool> |
66 | </property> | 66 | </property> |
67 | <property stdset="1"> | 67 | <property stdset="1"> |
68 | <name>frameShape</name> | 68 | <name>frameShape</name> |
69 | <enum>Box</enum> | 69 | <enum>Box</enum> |
70 | </property> | 70 | </property> |
71 | <property stdset="1"> | 71 | <property stdset="1"> |
72 | <name>frameShadow</name> | 72 | <name>frameShadow</name> |
73 | <enum>Sunken</enum> | 73 | <enum>Sunken</enum> |
74 | </property> | 74 | </property> |
75 | <property stdset="1"> | 75 | <property stdset="1"> |
76 | <name>title</name> | 76 | <name>title</name> |
77 | <string>Static Ip Configuration</string> | 77 | <string>Static Ip Configuration</string> |
78 | </property> | 78 | </property> |
79 | <grid> | 79 | <grid> |
80 | <property stdset="1"> | 80 | <property stdset="1"> |
81 | <name>margin</name> | 81 | <name>margin</name> |
82 | <number>11</number> | 82 | <number>11</number> |
83 | </property> | 83 | </property> |
84 | <property stdset="1"> | 84 | <property stdset="1"> |
85 | <name>spacing</name> | 85 | <name>spacing</name> |
86 | <number>6</number> | 86 | <number>6</number> |
87 | </property> | 87 | </property> |
88 | <widget row="1" column="0" > | 88 | <widget row="1" column="0" > |
89 | <class>QLabel</class> | 89 | <class>QLabel</class> |
90 | <property stdset="1"> | 90 | <property stdset="1"> |
91 | <name>name</name> | 91 | <name>name</name> |
92 | <cstring>TextLabel5</cstring> | 92 | <cstring>TextLabel5</cstring> |
93 | </property> | 93 | </property> |
94 | <property stdset="1"> | 94 | <property stdset="1"> |
95 | <name>text</name> | 95 | <name>text</name> |
96 | <string>Subnet Mask</string> | 96 | <string>Subnet Mask</string> |
97 | </property> | 97 | </property> |
98 | </widget> | 98 | </widget> |
99 | <widget row="2" column="1" > | 99 | <widget row="2" column="1" > |
100 | <class>QLineEdit</class> | 100 | <class>QLineEdit</class> |
101 | <property stdset="1"> | 101 | <property stdset="1"> |
102 | <name>name</name> | 102 | <name>name</name> |
103 | <cstring>gatewayEdit</cstring> | 103 | <cstring>gatewayEdit</cstring> |
104 | </property> | 104 | </property> |
105 | </widget> | 105 | </widget> |
106 | <widget row="1" column="1" > | 106 | <widget row="1" column="1" > |
107 | <class>QLineEdit</class> | 107 | <class>QLineEdit</class> |
108 | <property stdset="1"> | 108 | <property stdset="1"> |
109 | <name>name</name> | 109 | <name>name</name> |
110 | <cstring>subnetMaskEdit</cstring> | 110 | <cstring>subnetMaskEdit</cstring> |
111 | </property> | 111 | </property> |
112 | <property stdset="1"> | ||
113 | <name>text</name> | ||
114 | <string>255.255.255.0</string> | ||
115 | </property> | ||
112 | </widget> | 116 | </widget> |
113 | <widget row="0" column="1" > | 117 | <widget row="0" column="1" > |
114 | <class>QLineEdit</class> | 118 | <class>QLineEdit</class> |
115 | <property stdset="1"> | 119 | <property stdset="1"> |
116 | <name>name</name> | 120 | <name>name</name> |
117 | <cstring>ipAddressEdit</cstring> | 121 | <cstring>ipAddressEdit</cstring> |
118 | </property> | 122 | </property> |
119 | </widget> | 123 | </widget> |
120 | <widget row="3" column="0" > | 124 | <widget row="3" column="0" > |
121 | <class>QLabel</class> | 125 | <class>QLabel</class> |
122 | <property stdset="1"> | 126 | <property stdset="1"> |
123 | <name>name</name> | 127 | <name>name</name> |
124 | <cstring>TextLabel2</cstring> | 128 | <cstring>TextLabel2</cstring> |
125 | </property> | 129 | </property> |
126 | <property stdset="1"> | 130 | <property stdset="1"> |
127 | <name>text</name> | 131 | <name>text</name> |
128 | <string>First DNS</string> | 132 | <string>First DNS</string> |
129 | </property> | 133 | </property> |
130 | </widget> | 134 | </widget> |
131 | <widget row="0" column="0" > | 135 | <widget row="0" column="0" > |
132 | <class>QLabel</class> | 136 | <class>QLabel</class> |
133 | <property stdset="1"> | 137 | <property stdset="1"> |
134 | <name>name</name> | 138 | <name>name</name> |
135 | <cstring>TextLabel4</cstring> | 139 | <cstring>TextLabel4</cstring> |
136 | </property> | 140 | </property> |
137 | <property stdset="1"> | 141 | <property stdset="1"> |
138 | <name>text</name> | 142 | <name>text</name> |
139 | <string>IP Address</string> | 143 | <string>IP Address</string> |
140 | </property> | 144 | </property> |
141 | </widget> | 145 | </widget> |
142 | <widget row="2" column="0" > | 146 | <widget row="2" column="0" > |
143 | <class>QLabel</class> | 147 | <class>QLabel</class> |
144 | <property stdset="1"> | 148 | <property stdset="1"> |
145 | <name>name</name> | 149 | <name>name</name> |
146 | <cstring>TextLabel1_2</cstring> | 150 | <cstring>TextLabel1_2</cstring> |
147 | </property> | 151 | </property> |
148 | <property stdset="1"> | 152 | <property stdset="1"> |
149 | <name>text</name> | 153 | <name>text</name> |
150 | <string>Gateway</string> | 154 | <string>Gateway</string> |
151 | </property> | 155 | </property> |
152 | </widget> | 156 | </widget> |
153 | <widget row="4" column="0" > | 157 | <widget row="4" column="0" > |
154 | <class>QLabel</class> | 158 | <class>QLabel</class> |
155 | <property stdset="1"> | 159 | <property stdset="1"> |
156 | <name>name</name> | 160 | <name>name</name> |
157 | <cstring>TextLabel3</cstring> | 161 | <cstring>TextLabel3</cstring> |
158 | </property> | 162 | </property> |
159 | <property stdset="1"> | 163 | <property stdset="1"> |
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index a0b3113..4119490 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -450,97 +450,97 @@ void MainWindowImp::informationClicked(){ | |||
450 | QWidget *moduleInformation = i->getModuleOwner()->information(i); | 450 | QWidget *moduleInformation = i->getModuleOwner()->information(i); |
451 | if(moduleInformation != NULL){ | 451 | if(moduleInformation != NULL){ |
452 | moduleInformation->showMaximized(); | 452 | moduleInformation->showMaximized(); |
453 | #ifdef DEBUG | 453 | #ifdef DEBUG |
454 | qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); | 454 | qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); |
455 | #endif | 455 | #endif |
456 | return; | 456 | return; |
457 | } | 457 | } |
458 | } | 458 | } |
459 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); | 459 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); |
460 | information->showMaximized(); | 460 | information->showMaximized(); |
461 | } | 461 | } |
462 | 462 | ||
463 | /** | 463 | /** |
464 | * Update this interface. If no QListViewItem exists create one. | 464 | * Update this interface. If no QListViewItem exists create one. |
465 | * @param Interface* pointer to the interface that needs to be updated. | 465 | * @param Interface* pointer to the interface that needs to be updated. |
466 | */ | 466 | */ |
467 | void MainWindowImp::updateInterface(Interface *i){ | 467 | void MainWindowImp::updateInterface(Interface *i){ |
468 | if(!advancedUserMode){ | 468 | if(!advancedUserMode){ |
469 | if(i->getInterfaceName() == "lo") | 469 | if(i->getInterfaceName() == "lo") |
470 | return; | 470 | return; |
471 | } | 471 | } |
472 | 472 | ||
473 | QListViewItem *item = NULL; | 473 | QListViewItem *item = NULL; |
474 | 474 | ||
475 | // Find the interface, making it if needed. | 475 | // Find the interface, making it if needed. |
476 | if(items.find(i) == items.end()){ | 476 | if(items.find(i) == items.end()){ |
477 | item = new QListViewItem(connectionList, "", "", ""); | 477 | item = new QListViewItem(connectionList, "", "", ""); |
478 | // See if you can't find a module owner for this interface | 478 | // See if you can't find a module owner for this interface |
479 | QMap<Module*, QLibrary*>::Iterator it; | 479 | QMap<Module*, QLibrary*>::Iterator it; |
480 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 480 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
481 | if(it.key()->isOwner(i)) | 481 | if(it.key()->isOwner(i)) |
482 | i->setModuleOwner(it.key()); | 482 | i->setModuleOwner(it.key()); |
483 | } | 483 | } |
484 | items.insert(i, item); | 484 | items.insert(i, item); |
485 | interfaceItems.insert(item, i); | 485 | interfaceItems.insert(item, i); |
486 | } | 486 | } |
487 | else | 487 | else |
488 | item = items[i]; | 488 | item = items[i]; |
489 | 489 | ||
490 | // Update the icons and information | 490 | // Update the icons and information |
491 | #ifdef QWS | 491 | #ifdef QWS |
492 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); | 492 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); |
493 | #else | 493 | #else |
494 | item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); | 494 | item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); |
495 | #endif | 495 | #endif |
496 | 496 | ||
497 | QString typeName = "lan"; | 497 | QString typeName = "lan"; |
498 | if(i->getHardwareName().contains("Local Loopback")) | 498 | if(i->getInterfaceName() == "lo") |
499 | typeName = "lo"; | 499 | typeName = "lo"; |
500 | if(i->getInterfaceName().contains("irda")) | 500 | if(i->getInterfaceName().contains("irda")) |
501 | typeName = "irda"; | 501 | typeName = "irda"; |
502 | if(i->getInterfaceName().contains("wlan")) | 502 | if(i->getInterfaceName().contains("wlan")) |
503 | typeName = "wlan"; | 503 | typeName = "wlan"; |
504 | if(i->getInterfaceName().contains("usb")) | 504 | if(i->getInterfaceName().contains("usb")) |
505 | typeName = "usb"; | 505 | typeName = "usb"; |
506 | 506 | ||
507 | if(!i->isAttached()) | 507 | if(!i->isAttached()) |
508 | typeName = "connect_no"; | 508 | typeName = "connect_no"; |
509 | // Actually try to use the Module | 509 | // Actually try to use the Module |
510 | if(i->getModuleOwner() != NULL) | 510 | if(i->getModuleOwner() != NULL) |
511 | typeName = i->getModuleOwner()->getPixmapName(i); | 511 | typeName = i->getModuleOwner()->getPixmapName(i); |
512 | 512 | ||
513 | #ifdef QWS | 513 | #ifdef QWS |
514 | item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); | 514 | item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); |
515 | #else | 515 | #else |
516 | item->setPixmap(1, (SmallIcon(typeName))); | 516 | item->setPixmap(1, (SmallIcon(typeName))); |
517 | #endif | 517 | #endif |
518 | item->setText(2, i->getHardwareName()); | 518 | item->setText(2, i->getHardwareName()); |
519 | item->setText(3, QString("(%1)").arg(i->getInterfaceName())); | 519 | item->setText(3, QString("(%1)").arg(i->getInterfaceName())); |
520 | item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); | 520 | item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); |
521 | } | 521 | } |
522 | 522 | ||
523 | void MainWindowImp::newProfileChanged(const QString& newText){ | 523 | void MainWindowImp::newProfileChanged(const QString& newText){ |
524 | if(newText.length() > 0) | 524 | if(newText.length() > 0) |
525 | newProfileButton->setEnabled(true); | 525 | newProfileButton->setEnabled(true); |
526 | else | 526 | else |
527 | newProfileButton->setEnabled(false); | 527 | newProfileButton->setEnabled(false); |
528 | } | 528 | } |
529 | 529 | ||
530 | /** | 530 | /** |
531 | * Adds a new profile to the list of profiles. | 531 | * Adds a new profile to the list of profiles. |
532 | * Don't add profiles that already exists. | 532 | * Don't add profiles that already exists. |
533 | * Appends to the list and QStringList | 533 | * Appends to the list and QStringList |
534 | */ | 534 | */ |
535 | void MainWindowImp::addProfile(){ | 535 | void MainWindowImp::addProfile(){ |
536 | QString newProfileName = newProfile->text(); | 536 | QString newProfileName = newProfile->text(); |
537 | if(profiles.grep(newProfileName).count() > 0){ | 537 | if(profiles.grep(newProfileName).count() > 0){ |
538 | QMessageBox::information(this, "Can't Add","Profile already exists.", QMessageBox::Ok); | 538 | QMessageBox::information(this, "Can't Add","Profile already exists.", QMessageBox::Ok); |
539 | return; | 539 | return; |
540 | } | 540 | } |
541 | profiles.append(newProfileName); | 541 | profiles.append(newProfileName); |
542 | profilesList->insertItem(newProfileName); | 542 | profilesList->insertItem(newProfileName); |
543 | } | 543 | } |
544 | 544 | ||
545 | /** | 545 | /** |
546 | * Removes the currently selected profile in the combo. | 546 | * Removes the currently selected profile in the combo. |
diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control index e2db92f..182615f 100644 --- a/noncore/settings/networksettings/opie-networksettings.control +++ b/noncore/settings/networksettings/opie-networksettings.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-networksettings | 1 | Package: opie-networksettings |
2 | Files: bin/networksettings apps/Settings/networksettings.desktop plugins/networksettings/* pics/networksettings/* pics/Network/PPPConnect.png $OPIEDIR/lib/libinterfaces.so.1.0.0 $OPIEDIR/lib/libinterfaces.so.1.0 $OPIEDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile | 2 | Files: bin/networksettings apps/Settings/networksettings.desktop plugins/networksettings/* pics/networksettings/* pics/Network/PPPConnect.png $OPIEDIR/lib/libinterfaces.so.1.0.0 $OPIEDIR/lib/libinterfaces.so.1.0 $OPIEDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: Ben Meyer <meyerb@sharpsec.com> | 5 | Maintainer: Patrick S. Vogt <tille@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION-$SUB_VERSION | 7 | Version: $QPE_VERSION-$SUB_VERSION |
8 | Depends: task-opie-minimal | 8 | Depends: task-opie-minimal |
9 | Description: Network settings. | 9 | Description: Network settings. |
10 | Replaces: opie-networksetup | 10 | Replaces: opie-networksetup |