author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/settings/networksettings/ppp/general.cpp | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index ff1b11b..81dab38 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp | |||
@@ -39,98 +39,98 @@ | |||
39 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
40 | #include <qlabel.h> | 40 | #include <qlabel.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
43 | #include <qslider.h> | 43 | #include <qslider.h> |
44 | #include <qspinbox.h> | 44 | #include <qspinbox.h> |
45 | #include <qwhatsthis.h> | 45 | #include <qwhatsthis.h> |
46 | 46 | ||
47 | /* STD */ | 47 | /* STD */ |
48 | #include <termios.h> | 48 | #include <termios.h> |
49 | #include <string.h> | 49 | #include <string.h> |
50 | 50 | ||
51 | 51 | ||
52 | ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name ) | 52 | ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name ) |
53 | : QWidget(parent, name), _pppdata(pd) | 53 | : QWidget(parent, name), _pppdata(pd) |
54 | { | 54 | { |
55 | int k; | 55 | int k; |
56 | 56 | ||
57 | QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); | 57 | QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint()); |
58 | 58 | ||
59 | QLabel *label1; | 59 | QLabel *label1; |
60 | 60 | ||
61 | label1 = new QLabel(tr("Modem &name:"), this); | 61 | label1 = new QLabel(tr("Modem &name:"), this); |
62 | tl->addWidget(label1, 0, 0); | 62 | tl->addWidget(label1, 0, 0); |
63 | 63 | ||
64 | modemname = new QLineEdit(this, "modemName"); | 64 | modemname = new QLineEdit(this, "modemName"); |
65 | modemname->setText( _pppdata->devname() ); | 65 | modemname->setText( _pppdata->devname() ); |
66 | label1->setBuddy(modemname); | 66 | label1->setBuddy(modemname); |
67 | tl->addWidget(modemname, 0, 1); | 67 | tl->addWidget(modemname, 0, 1); |
68 | 68 | ||
69 | label1 = new QLabel(tr("Modem de&vice:"), this); | 69 | label1 = new QLabel(tr("Modem de&vice:"), this); |
70 | tl->addWidget(label1, 1, 0); | 70 | tl->addWidget(label1, 1, 0); |
71 | 71 | ||
72 | modemdevice = new QComboBox(false, this); | 72 | modemdevice = new QComboBox(false, this); |
73 | modemdevice->setEditable( true ); | 73 | modemdevice->setEditable( true ); |
74 | modemdevice->setDuplicatesEnabled ( false ); | 74 | modemdevice->setDuplicatesEnabled ( false ); |
75 | modemdevice->setInsertionPolicy( QComboBox::AtTop ); | 75 | modemdevice->setInsertionPolicy( QComboBox::AtTop ); |
76 | label1->setBuddy(modemdevice); | 76 | label1->setBuddy(modemdevice); |
77 | 77 | ||
78 | Config cfg("NetworkSetupPPP"); | 78 | Config cfg("NetworkSetupPPP"); |
79 | cfg.setGroup("Devices_General"); | 79 | cfg.setGroup("Devices_General"); |
80 | QStringList devs = cfg.readListEntry("devices",','); | 80 | QStringList devs = cfg.readListEntry("devices",','); |
81 | if (devs.isEmpty()) devs << "/dev/modem" << "/dev/ircomm0" << "/dev/ttyS0"; | 81 | if (devs.isEmpty()) devs << "/dev/modem" << "/dev/ircomm0" << "/dev/ttyS0"; |
82 | modemdevice->insertStringList( devs ); | 82 | modemdevice->insertStringList( devs ); |
83 | tl->addWidget(modemdevice, 1, 1); | 83 | tl->addWidget(modemdevice, 1, 1); |
84 | 84 | ||
85 | // connect(modemdevice, SIGNAL(activated(int)), | 85 | // connect(modemdevice, SIGNAL(activated(int)), |
86 | // SLOT(setmodemdc(int))); | 86 | // SLOT(setmodemdc(int))); |
87 | // connect(modemdevice, SIGNAL(textChanged( const QString & ) ), | 87 | // connect(modemdevice, SIGNAL(textChanged(const QString&) ), |
88 | // SLOT( setmodemdc( const QString &) ) ); | 88 | // SLOT( setmodemdc(const QString&) ) ); |
89 | 89 | ||
90 | QString tmp = tr("This specifies the serial port your modem is attached \n" | 90 | QString tmp = tr("This specifies the serial port your modem is attached \n" |
91 | "to. On Linux/x86, typically this is either /dev/ttyS0 \n" | 91 | "to. On Linux/x86, typically this is either /dev/ttyS0 \n" |
92 | "(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n" | 92 | "(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n" |
93 | "\n" | 93 | "\n" |
94 | "If you have an internal ISDN card with AT command\n" | 94 | "If you have an internal ISDN card with AT command\n" |
95 | "emulation (most cards under Linux support this), you\n" | 95 | "emulation (most cards under Linux support this), you\n" |
96 | "should select one of the /dev/ttyIx devices."); | 96 | "should select one of the /dev/ttyIx devices."); |
97 | 97 | ||
98 | QWhatsThis::add(label1,tmp); | 98 | QWhatsThis::add(label1,tmp); |
99 | QWhatsThis::add(modemdevice,tmp); | 99 | QWhatsThis::add(modemdevice,tmp); |
100 | 100 | ||
101 | 101 | ||
102 | label1 = new QLabel(tr("&Flow control:"), this); | 102 | label1 = new QLabel(tr("&Flow control:"), this); |
103 | tl->addWidget(label1, 2, 0); | 103 | tl->addWidget(label1, 2, 0); |
104 | 104 | ||
105 | flowcontrol = new QComboBox(false, this); | 105 | flowcontrol = new QComboBox(false, this); |
106 | label1->setBuddy(flowcontrol); | 106 | label1->setBuddy(flowcontrol); |
107 | flowcontrol->insertItem(tr("Hardware [CRTSCTS]")); | 107 | flowcontrol->insertItem(tr("Hardware [CRTSCTS]")); |
108 | flowcontrol->insertItem(tr("Software [XON/XOFF]")); | 108 | flowcontrol->insertItem(tr("Software [XON/XOFF]")); |
109 | flowcontrol->insertItem(tr("None")); | 109 | flowcontrol->insertItem(tr("None")); |
110 | tl->addWidget(flowcontrol, 2, 1); | 110 | tl->addWidget(flowcontrol, 2, 1); |
111 | // connect(flowcontrol, SIGNAL(activated(int)), | 111 | // connect(flowcontrol, SIGNAL(activated(int)), |
112 | // SLOT(setflowcontrol(int))); | 112 | // SLOT(setflowcontrol(int))); |
113 | 113 | ||
114 | tmp = tr("<p>Specifies how the serial port and modem\n" | 114 | tmp = tr("<p>Specifies how the serial port and modem\n" |
115 | "communicate. You should not change this unless\n" | 115 | "communicate. You should not change this unless\n" |
116 | "you know what you are doing.\n" | 116 | "you know what you are doing.\n" |
117 | "\n" | 117 | "\n" |
118 | "<b>Default</b>: CRTSCTS"); | 118 | "<b>Default</b>: CRTSCTS"); |
119 | 119 | ||
120 | QWhatsThis::add(label1,tmp); | 120 | QWhatsThis::add(label1,tmp); |
121 | QWhatsThis::add(flowcontrol,tmp); | 121 | QWhatsThis::add(flowcontrol,tmp); |
122 | 122 | ||
123 | QLabel *labelenter = new QLabel(tr("&Line termination:"), this); | 123 | QLabel *labelenter = new QLabel(tr("&Line termination:"), this); |
124 | tl->addWidget(labelenter, 3, 0); | 124 | tl->addWidget(labelenter, 3, 0); |
125 | 125 | ||
126 | enter = new QComboBox(false, this); | 126 | enter = new QComboBox(false, this); |
127 | labelenter->setBuddy(enter); | 127 | labelenter->setBuddy(enter); |
128 | enter->insertItem("CR"); | 128 | enter->insertItem("CR"); |
129 | enter->insertItem("LF"); | 129 | enter->insertItem("LF"); |
130 | enter->insertItem("CR/LF"); | 130 | enter->insertItem("CR/LF"); |
131 | tl->addWidget(enter, 3, 1); | 131 | tl->addWidget(enter, 3, 1); |
132 | // connect(enter, SIGNAL(activated(int)), SLOT(setenter(int))); | 132 | // connect(enter, SIGNAL(activated(int)), SLOT(setenter(int))); |
133 | tmp = tr("<p>Specifies how AT commands are sent to your\n" | 133 | tmp = tr("<p>Specifies how AT commands are sent to your\n" |
134 | "modem. Most modems will work fine with the\n" | 134 | "modem. Most modems will work fine with the\n" |
135 | "default <i>CR/LF</i>. If your modem does not react\n" | 135 | "default <i>CR/LF</i>. If your modem does not react\n" |
136 | "to the init string, you should try different\n" | 136 | "to the init string, you should try different\n" |