By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1026
Collapse All | Expand All

(-)a/doc/kcontrol/kcmkonsole/index.docbook (-12 / +81 lines)
Lines 44-59 Daemon</guilabel>.</para> Link Here
44
functions.  It contains the following options:</para>
44
functions.  It contains the following options:</para>
45
45
46
<variablelist>
46
<variablelist>
47
<varlistentry>
48
<term><guilabel>Use Konsole as default terminal
49
application</guilabel></term>
50
<listitem>
51
<para>If you wish to have &tde; use another terminal application by
52
default, uncheck this box and enter the preferred application
53
(<application>wterm</application>, <application>rxvt</application>,
54
&etc;) in the text field below.</para>
55
</listitem>
56
</varlistentry>
57
47
58
<varlistentry>
48
<varlistentry>
59
<term><guilabel>Show Terminal Size when Resizing</guilabel></term>
49
<term><guilabel>Show Terminal Size when Resizing</guilabel></term>
Lines 72-80 behavior.</para></listitem> Link Here
72
</varlistentry>
62
</varlistentry>
73
63
74
<varlistentry>
64
<varlistentry>
75
<term><guilabel>Confirm quit with open sessions</guilabel></term>
65
<term><guilabel>Confirm quit when closing more than one session</guilabel></term>
76
<listitem>
66
<listitem>
77
<para>When set, a warning appears when you try to close a  &konsole;
67
<para>When set, a warning appears when you try to close a &konsole;
78
window with multiple sessions.</para>
68
window with multiple sessions.</para>
79
</listitem>
69
</listitem>
80
</varlistentry>
70
</varlistentry>
Lines 87-98 attention.</para></listitem> Link Here
87
</varlistentry>
77
</varlistentry>
88
78
89
<varlistentry>
79
<varlistentry>
80
<term><guilabel>Require Ctrl key for drag and drop</guilabel></term>
81
<listitem><para>If unchecked, you can drag and drop selected text by using the mouse.
82
If checked, the Ctrl key needs to be held down to allow drag and drop (this is
83
a good way to avoid erroneous drag and drop operations).
84
</para></listitem>
85
</varlistentry>
86
87
<varlistentry>
88
<term><guilabel>Triple click selects only from the current word forward</guilabel></term>
89
<listitem><para>If checked, a mouse triple click will select everything from the 
90
current cursor position to the end of the lime. If unchecked, a mouse triple click will select
91
the entire current row.
92
</para></listitem>
93
</varlistentry>
94
95
<varlistentry>
96
<term><guilabel>Allow programs to resize terminal window</guilabel></term>
97
<listitem><para>If checked, programs can resize the terminal window.
98
</para></listitem>
99
</varlistentry>
100
101
<varlistentry>
102
<term><guilabel>Use Ctrl+S/Ctrl+Q flow control</guilabel></term>
103
<listitem><para>If checked, Ctrl+S/Ctrl+Q can be used to control the flow of output
104
characters sent to the terminal. After pressing CTRL-S, the system will not send any
105
more data to the screen until a CTRL-Q is pressed.
106
</para></listitem>
107
</varlistentry>
108
109
<varlistentry>
110
<term><guilabel>Enable bidirectional text rendering</guilabel></term>
111
<listitem><para>If checked, text can be rendered from left to right or from right to left.
112
This is useful to support languages which are written in the second way.
113
</para></listitem>
114
</varlistentry>
115
116
<varlistentry>
117
<term><guilabel>Set tab title to match window title</guilabel></term>
118
<listitem><para>If checked, the title of the tab representing the current session will match
119
the text displayed on the window title bar. Whenever the window title changes, the tab 
120
tile changes as well.
121
</para></listitem>
122
</varlistentry>
123
124
<varlistentry>
125
<term><guilabel>Cycle tabs with mouse wheel</guilabel></term>
126
<listitem><para>If checked, you can move through the different session tabs 
127
using the mouse wheel over the tabbar control. If unchecked, the action is disabled.
128
</para></listitem>
129
</varlistentry>
130
131
<varlistentry>
132
<term><guilabel>Enable main menu accelerator keys</guilabel></term>
133
<listitem><para>If checked, the main menu shortcut keys are enabled, otherwise
134
they are disabled.
135
</para>
136
<note><para>If menu accelerators are enabled, some Alt-key combinations may not
137
be handled correctly any longer in Konsole applications.</para></note>
138
</listitem>
139
</varlistentry>
140
141
<varlistentry>
142
<term><guilabel>Handle Meta key as Alt Key</guilabel></term>
143
<listitem><para>If checked, the Meta key will be handled as if it was an Alt key.
144
</para>
145
<note><para>This is a useful option if you have enabled the main menu shortcut keys.
146
You can use the Meta key to activate those Alt-key combinations that otherwise
147
would not work any longer in Konsole.</para></note>
148
</listitem>
149
</varlistentry>
150
151
<varlistentry>
90
<term><guilabel>Line Spacing</guilabel></term>
152
<term><guilabel>Line Spacing</guilabel></term>
91
<listitem><para>Change the space between lines of text.</para>
153
<listitem><para>Change the space between lines of text.</para>
92
</listitem>
154
</listitem>
93
</varlistentry>
155
</varlistentry>
94
156
95
<varlistentry>
157
<varlistentry>
158
<term><guilabel>Seconds to detect silence</guilabel></term>
159
<listitem><para>Allows to specify the time interval used for monitoring the
160
Konsole for silence.
161
</para></listitem>
162
</varlistentry>
163
164
<varlistentry>
96
<term><guilabel>Consider the following characters part of a word when
165
<term><guilabel>Consider the following characters part of a word when
97
double clicking</guilabel></term>
166
double clicking</guilabel></term>
98
<listitem><para>It is a common &UNIX; behavior to select a whole word
167
<listitem><para>It is a common &UNIX; behavior to select a whole word
(-)a/kcontrol/konsole/kcmkonsole.cpp (-6 / +9 lines)
Lines 71-78 KCMKonsole::KCMKonsole(TQWidget * parent, const char *name, const TQStringList&) Link Here
71
    connect(dialog->frameCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
71
    connect(dialog->frameCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
72
    connect(dialog->line_spacingSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
72
    connect(dialog->line_spacingSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
73
    connect(dialog->matchTabWinTitleCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
73
    connect(dialog->matchTabWinTitleCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
74
    connect(dialog->tabsCycleWheel,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
74
    connect(dialog->tabsCycleWheelCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
75
    connect(dialog->menuAccelerators,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
75
    connect(dialog->menuAcceleratorsCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
76
    connect(dialog->metaAsAltModeCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
76
    connect(dialog->silence_secondsSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
77
    connect(dialog->silence_secondsSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
77
    connect(dialog->word_connectorLE,TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT( changed() ));
78
    connect(dialog->word_connectorLE,TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT( changed() ));
78
    connect(dialog->SchemaEditor1, TQT_SIGNAL(changed()), TQT_SLOT( changed() ));
79
    connect(dialog->SchemaEditor1, TQT_SIGNAL(changed()), TQT_SLOT( changed() ));
Lines 97-104 void KCMKonsole::load(bool useDefaults) Link Here
97
    bidiOrig = config.readBoolEntry("EnableBidi",false);
98
    bidiOrig = config.readBoolEntry("EnableBidi",false);
98
    dialog->bidiCB->setChecked(bidiOrig);
99
    dialog->bidiCB->setChecked(bidiOrig);
99
    dialog->matchTabWinTitleCB->setChecked(config.readBoolEntry("MatchTabWinTitle",false));
100
    dialog->matchTabWinTitleCB->setChecked(config.readBoolEntry("MatchTabWinTitle",false));
100
    dialog->tabsCycleWheel->setChecked(config.readBoolEntry("TabsCycleWheel",true));
101
    dialog->tabsCycleWheelCB->setChecked(config.readBoolEntry("TabsCycleWheel",true));
101
    dialog->menuAccelerators->setChecked(config.readBoolEntry("MenuAccelerators",false));
102
    dialog->menuAcceleratorsCB->setChecked(config.readBoolEntry("MenuAccelerators",false));
102
    dialog->warnCB->setChecked(config.readBoolEntry("WarnQuit",true));
103
    dialog->warnCB->setChecked(config.readBoolEntry("WarnQuit",true));
103
    dialog->ctrldragCB->setChecked(config.readBoolEntry("CtrlDrag",true));
104
    dialog->ctrldragCB->setChecked(config.readBoolEntry("CtrlDrag",true));
104
    dialog->cutToBeginningOfLineCB->setChecked(config.readBoolEntry("CutToBeginningOfLine",false));
105
    dialog->cutToBeginningOfLineCB->setChecked(config.readBoolEntry("CutToBeginningOfLine",false));
Lines 110-115 void KCMKonsole::load(bool useDefaults) Link Here
110
    dialog->line_spacingSB->setValue(config.readUnsignedNumEntry( "LineSpacing", 0 ));
111
    dialog->line_spacingSB->setValue(config.readUnsignedNumEntry( "LineSpacing", 0 ));
111
    dialog->silence_secondsSB->setValue(config.readUnsignedNumEntry( "SilenceSeconds", 10 ));
112
    dialog->silence_secondsSB->setValue(config.readUnsignedNumEntry( "SilenceSeconds", 10 ));
112
    dialog->word_connectorLE->setText(config.readEntry("wordseps",":@-./_~"));
113
    dialog->word_connectorLE->setText(config.readEntry("wordseps",":@-./_~"));
114
    dialog->metaAsAltModeCB->setChecked(config.readBoolEntry("metaAsAltMode",false));
113
115
114
    dialog->SchemaEditor1->setSchema(config.readEntry("schema"));
116
    dialog->SchemaEditor1->setSchema(config.readEntry("schema"));
115
117
Lines 137-144 void KCMKonsole::save() Link Here
137
    bool bidiNew = dialog->bidiCB->isChecked();
139
    bool bidiNew = dialog->bidiCB->isChecked();
138
    config.writeEntry("EnableBidi", bidiNew);
140
    config.writeEntry("EnableBidi", bidiNew);
139
    config.writeEntry("MatchTabWinTitle", dialog->matchTabWinTitleCB->isChecked());
141
    config.writeEntry("MatchTabWinTitle", dialog->matchTabWinTitleCB->isChecked());
140
    config.writeEntry("TabsCycleWheel", dialog->tabsCycleWheel->isChecked());
142
    config.writeEntry("TabsCycleWheel", dialog->tabsCycleWheelCB->isChecked());
141
    config.writeEntry("MenuAccelerators", dialog->menuAccelerators->isChecked());
143
    config.writeEntry("MenuAccelerators", dialog->menuAcceleratorsCB->isChecked());
142
    config.writeEntry("WarnQuit", dialog->warnCB->isChecked());
144
    config.writeEntry("WarnQuit", dialog->warnCB->isChecked());
143
    config.writeEntry("CtrlDrag", dialog->ctrldragCB->isChecked());
145
    config.writeEntry("CtrlDrag", dialog->ctrldragCB->isChecked());
144
    config.writeEntry("CutToBeginningOfLine", dialog->cutToBeginningOfLineCB->isChecked());
146
    config.writeEntry("CutToBeginningOfLine", dialog->cutToBeginningOfLineCB->isChecked());
Lines 150-155 void KCMKonsole::save() Link Here
150
    config.writeEntry("LineSpacing" , dialog->line_spacingSB->value());
152
    config.writeEntry("LineSpacing" , dialog->line_spacingSB->value());
151
    config.writeEntry("SilenceSeconds" , dialog->silence_secondsSB->value());
153
    config.writeEntry("SilenceSeconds" , dialog->silence_secondsSB->value());
152
    config.writeEntry("wordseps", dialog->word_connectorLE->text());
154
    config.writeEntry("wordseps", dialog->word_connectorLE->text());
155
    config.writeEntry("metaAsAltMode", dialog->metaAsAltModeCB->isChecked());
153
156
154
    config.writeEntry("schema", dialog->SchemaEditor1->schema());
157
    config.writeEntry("schema", dialog->SchemaEditor1->schema());
155
158
(-)a/kcontrol/konsole/kcmkonsoledialog.ui (-61 / +56 lines)
Lines 66-74 Link Here
66
                        <property name="name">
66
                        <property name="name">
67
                            <cstring>GroupBox2</cstring>
67
                            <cstring>GroupBox2</cstring>
68
                        </property>
68
                        </property>
69
                        <property name="title">
70
                            <string>Misc</string>
71
                        </property>
72
                        <grid>
69
                        <grid>
73
                            <property name="name">
70
                            <property name="name">
74
                                <cstring>unnamed</cstring>
71
                                <cstring>unnamed</cstring>
Lines 134-165 Link Here
134
                                    <cstring>xonXoffCB</cstring>
131
                                    <cstring>xonXoffCB</cstring>
135
                                </property>
132
                                </property>
136
                                <property name="text">
133
                                <property name="text">
137
                                    <string>Use Ctrl+S/Ctrl+Q flow control</string>
134
                                  <string>&amp;Use Ctrl+S/Ctrl+Q flow control</string>
138
                                </property>
135
                                </property>
139
                            </widget>
136
                            </widget>
140
                            <spacer row="12" column="3">
141
                                <property name="name">
142
                                    <cstring>Spacer3</cstring>
143
                                </property>
144
                                <property name="orientation">
145
                                    <enum>Horizontal</enum>
146
                                </property>
147
                                <property name="sizeType">
148
                                    <enum>Expanding</enum>
149
                                </property>
150
                                <property name="sizeHint">
151
                                    <size>
152
                                        <width>20</width>
153
                                        <height>20</height>
154
                                    </size>
155
                                </property>
156
                            </spacer>
157
                            <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="3">
137
                            <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="3">
158
                                <property name="name">
138
                                <property name="name">
159
                                    <cstring>bidiCB</cstring>
139
                                    <cstring>bidiCB</cstring>
160
                                </property>
140
                                </property>
161
                                <property name="text">
141
                                <property name="text">
162
                                    <string>Enable bidirectional text rendering</string>
142
                                  <string>E&amp;nable bidirectional text rendering</string>
163
                                </property>
143
                                </property>
164
                            </widget>
144
                            </widget>
165
                            <widget class="TQCheckBox" row="9" column="0" rowspan="1" colspan="4">
145
                            <widget class="TQCheckBox" row="9" column="0" rowspan="1" colspan="4">
Lines 167-192 Link Here
167
                                    <cstring>matchTabWinTitleCB</cstring>
147
                                    <cstring>matchTabWinTitleCB</cstring>
168
                                </property>
148
                                </property>
169
                                <property name="text">
149
                                <property name="text">
170
                                    <string>Set tab title to match window title</string>
150
                                  <string>Set &amp;tab title to match window title</string>
171
                                </property>
151
                                </property>
172
                            </widget>
152
                            </widget>
173
                            <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="3">
153
                            <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="3">
174
                                <property name="name">
154
                                <property name="name">
175
                                    <cstring>tabsCycleWheel</cstring>
155
                                    <cstring>tabsCycleWheelCB</cstring>
176
                                </property>
156
                                </property>
177
                                <property name="text">
157
                                <property name="text">
178
                                    <string>Cycle tabs with mouse wheel</string>
158
                                  <string>Cycle tabs &amp;with mouse wheel</string>
179
                                </property>
159
                                </property>
180
                            </widget>
160
                            </widget>
181
                            <widget class="TQCheckBox" row="11" column="0" rowspan="1" colspan="3">
161
                            <widget class="TQCheckBox" row="11" column="0" rowspan="1" colspan="3">
182
                                <property name="name">
162
                                <property name="name">
183
                                    <cstring>menuAccelerators</cstring>
163
                                    <cstring>menuAcceleratorsCB</cstring>
184
                                </property>
164
                                </property>
185
                                <property name="text">
165
                                <property name="text">
186
                                    <string>Enable main menu accelerator keys</string>
166
                                  <string>Enable main &amp;menu accelerator keys</string>
187
                                </property>
167
                                </property>
188
                            </widget>
168
                            </widget>
189
                            <widget class="KIntNumInput" row="12" column="2">
169
                            <widget class="TQCheckBox" row="12" column="0" rowspan="1" colspan="3">
170
                              <property name="name">
171
                                <cstring>metaAsAltModeCB</cstring>
172
                              </property>
173
                              <property name="text">
174
                                <string>Handle Meta &amp;key as Alt Key</string>
175
                              </property>
176
                            </widget>
177
                            <widget class="TQLabel" row="13" column="0" rowspan="1" colspan="2">
178
                              <property name="name">
179
                                <cstring>TextLabel1_4</cstring>
180
                              </property>
181
                              <property name="sizePolicy">
182
                                <sizepolicy>
183
                                  <hsizetype>1</hsizetype>
184
                                  <vsizetype>5</vsizetype>
185
                                  <horstretch>0</horstretch>
186
                                  <verstretch>0</verstretch>
187
                                </sizepolicy>
188
                              </property>
189
                              <property name="text">
190
                                <string>&amp;Line spacing:</string>
191
                              </property>
192
                              <property name="buddy" stdset="0">
193
                                <cstring>line_spacingSB</cstring>
194
                              </property>
195
                            </widget>
196
                            <spacer row="12" column="3">
197
                              <property name="name">
198
                                <cstring>Spacer3</cstring>
199
                              </property>
200
                              <property name="orientation">
201
                                <enum>Horizontal</enum>
202
                              </property>
203
                              <property name="sizeType">
204
                                <enum>Expanding</enum>
205
                              </property>
206
                              <property name="sizeHint">
207
                                <size>
208
                                  <width>20</width>
209
                                  <height>20</height>
210
                                </size>
211
                              </property>
212
                            </spacer>
213
                            <widget class="KIntNumInput" row="13" column="2">
190
                                <property name="name">
214
                                <property name="name">
191
                                    <cstring>line_spacingSB</cstring>
215
                                    <cstring>line_spacingSB</cstring>
192
                                </property>
216
                                </property>
Lines 205-229 Link Here
205
                                    <number>8</number>
229
                                    <number>8</number>
206
                                </property>
230
                                </property>
207
                            </widget>
231
                            </widget>
208
                            <widget class="TQLabel" row="12" column="0" rowspan="1" colspan="2">
209
                                <property name="name">
210
                                    <cstring>TextLabel1_4</cstring>
211
                                </property>
212
                                <property name="sizePolicy">
213
                                    <sizepolicy>
214
                                        <hsizetype>1</hsizetype>
215
                                        <vsizetype>5</vsizetype>
216
                                        <horstretch>0</horstretch>
217
                                        <verstretch>0</verstretch>
218
                                    </sizepolicy>
219
                                </property>
220
                                <property name="text">
221
                                    <string>&amp;Line spacing:</string>
222
                                </property>
223
                                <property name="buddy" stdset="0">
224
                                    <cstring>line_spacingSB</cstring>
225
                                </property>
226
                            </widget>
227
                            <spacer row="12" column="3">
232
                            <spacer row="12" column="3">
228
                                <property name="name">
233
                                <property name="name">
229
                                    <cstring>Spacer2</cstring>
234
                                    <cstring>Spacer2</cstring>
Lines 241-247 Link Here
241
                                    </size>
246
                                    </size>
242
                                </property>
247
                                </property>
243
                            </spacer>
248
                            </spacer>
244
                            <widget class="TQLabel" row="13" column="0">
249
                            <widget class="TQLabel" row="14" column="0" rowspan="1" colspan="2">
245
                                <property name="name">
250
                                <property name="name">
246
                                    <cstring>SilenceLabel</cstring>
251
                                    <cstring>SilenceLabel</cstring>
247
                                </property>
252
                                </property>
Lines 260-266 Link Here
260
                                    <cstring>silence_secondsSB</cstring>
265
                                    <cstring>silence_secondsSB</cstring>
261
                                </property>
266
                                </property>
262
                            </widget>
267
                            </widget>
263
                            <widget class="KIntNumInput" row="13" column="1" rowspan="1" colspan="2">
268
                            <widget class="KIntNumInput" row="14" column="2">
264
                                <property name="name">
269
                                <property name="name">
265
                                    <cstring>silence_secondsSB</cstring>
270
                                    <cstring>silence_secondsSB</cstring>
266
                                </property>
271
                                </property>
Lines 276-295 Link Here
276
                                    <number>1</number>
281
                                    <number>1</number>
277
                                </property>
282
                                </property>
278
                            </widget>
283
                            </widget>
279
                        </grid>
280
                    </widget>
281
                    <widget class="TQGroupBox" row="1" column="0">
282
                        <property name="name">
283
                            <cstring>GroupBox3</cstring>
284
                        </property>
285
                        <property name="title">
286
                            <string>Double Click</string>
287
                        </property>
288
                        <grid>
289
                            <property name="name">
284
                            <property name="name">
290
                                <cstring>unnamed</cstring>
285
                                <cstring>unnamed</cstring>
291
                            </property>
286
                            </property>
292
                            <widget class="TQLabel" row="0" column="0">
287
                            <widget class="TQLabel" row="15" column="0" colspan="3">
293
                                <property name="name">
288
                                <property name="name">
294
                                    <cstring>TextLabel1_3</cstring>
289
                                    <cstring>TextLabel1_3</cstring>
295
                                </property>
290
                                </property>
Lines 300-306 Link Here
300
                                    <cstring>word_connectorLE</cstring>
295
                                    <cstring>word_connectorLE</cstring>
301
                                </property>
296
                                </property>
302
                            </widget>
297
                            </widget>
303
                            <widget class="TQLineEdit" row="1" column="0">
298
                            <widget class="TQLineEdit" row="16" column="0" colspan="3">
304
                                <property name="name">
299
                                <property name="name">
305
                                    <cstring>word_connectorLE</cstring>
300
                                    <cstring>word_connectorLE</cstring>
306
                                </property>
301
                                </property>
(-)a/konsole/konsole/TEWidget.cpp (-10 / +17 lines)
Lines 1901-1907 bool TEWidget::eventFilter( TQObject *obj, TQEvent *e ) Link Here
1901
      return false; // not us
1901
      return false; // not us
1902
  if ( e->type() == TQEvent::KeyPress )
1902
  if ( e->type() == TQEvent::KeyPress )
1903
  {
1903
  {
1904
    TQKeyEvent* ke = (TQKeyEvent*)e;
1904
    TQKeyEvent *ke = TQT_TQKEYEVENT(e);
1905
1905
1906
    actSel=0; // Key stroke implies a screen update, so TEWidget won't
1906
    actSel=0; // Key stroke implies a screen update, so TEWidget won't
1907
              // know where the current selection is.
1907
              // know where the current selection is.
Lines 1914-1930 bool TEWidget::eventFilter( TQObject *obj, TQEvent *e ) Link Here
1914
        cursorBlinking = false;
1914
        cursorBlinking = false;
1915
    }
1915
    }
1916
1916
1917
    emit keyPressedSignal(ke); // expose
1917
    emit keyPressedSignal(ke);
1918
1919
    // in Qt2 when key events were propagated up the tree
1920
    // (unhandled? -> parent widget) they passed the event filter only once at
1921
    // the beginning. in qt3 this has changed, that is, the event filter is
1922
    // called each time the event is sent (see loop in TQApplication::notify,
1923
    // when internalNotify() is called for KeyPress, whereas internalNotify
1924
    // activates also the global event filter) . That's why we stop propagation
1925
    // here.
1926
    return true;
1918
    return true;
1927
  }
1919
  }
1920
  if ( e->type() == TQEvent::KeyRelease )
1921
  {
1922
    TQKeyEvent *ke = TQT_TQKEYEVENT(e);
1923
    emit keyReleasedSignal(ke);
1924
    return true;
1925
  }
1926
  if ( e->type() == TQEvent::FocusIn )
1927
  {
1928
    TQFocusEvent *fe = TQT_TQFOCUSEVENT(e);
1929
    if (fe->gotFocus())
1930
    {
1931
      emit focusInSignal(fe);
1932
      return true;
1933
    }
1934
  }
1928
  if ( e->type() == TQEvent::Enter )
1935
  if ( e->type() == TQEvent::Enter )
1929
  {
1936
  {
1930
    TQObject::disconnect( (TQObject*)cb, TQT_SIGNAL(dataChanged()),
1937
    TQObject::disconnect( (TQObject*)cb, TQT_SIGNAL(dataChanged()),
(-)a/konsole/konsole/TEWidget.h (+2 lines)
Lines 153-158 public slots: Link Here
153
signals:
153
signals:
154
154
155
    void keyPressedSignal(TQKeyEvent *e);
155
    void keyPressedSignal(TQKeyEvent *e);
156
    void keyReleasedSignal(TQKeyEvent *e);
157
    void focusInSignal(TQFocusEvent *e);
156
    void mouseSignal(int cb, int cx, int cy);
158
    void mouseSignal(int cb, int cx, int cy);
157
    void changedFontMetricSignal(int height, int width);
159
    void changedFontMetricSignal(int height, int width);
158
    void changedContentSizeSignal(int height, int width);
160
    void changedContentSizeSignal(int height, int width);
(-)a/konsole/konsole/TEmuVt102.cpp (-24 / +30 lines)
Lines 927-963 void TEmuVt102::onScrollLock() Link Here
927
   the complications towards a configuration file [see KeyTrans class].
927
   the complications towards a configuration file [see KeyTrans class].
928
*/
928
*/
929
929
930
void TEmuVt102::onKeyPress( TQKeyEvent* ev )
930
void TEmuVt102::doKeyPress( TQKeyEvent* ev )
931
{
931
{
932
  if (!listenToKeyPress) return; // someone else gets the keys
933
  emit notifySessionState(NOTIFYNORMAL);
932
  emit notifySessionState(NOTIFYNORMAL);
934
933
935
//printf("State/Key: 0x%04x 0x%04x (%d,%d)\n",ev->state(),ev->key(),ev->text().length(),ev->text().length()?ev->text().ascii()[0]:0);
934
  //printf("State/Key: 0x%04x 0x%04x (%d,%d)\n", ev->state(),ev->key(),
935
  //       ev->text().length(),ev->text().length()?ev->text().ascii()[0]:0);
936
936
937
  // lookup in keyboard translation table ...
937
  // lookup in keyboard translation table ...
938
  int cmd = CMD_none; 
938
  int cmd = CMD_none; 
939
  const char* txt; 
939
  const char *txt; 
940
  int len;
940
  int len;
941
  bool metaspecified;
941
  bool metaspecified;
942
  if (keytrans->findEntry(ev->key(), encodeMode(MODE_NewLine		, BITS_NewLine   ) + // OLD,
942
  int bits = encodeMode(MODE_NewLine		  , BITS_NewLine   ) + // OLD,
943
                                     encodeMode(MODE_Ansi		, BITS_Ansi      ) + // OBSOLETE,
943
             encodeMode(MODE_Ansi		      , BITS_Ansi      ) + // OBSOLETE,
944
                                     encodeMode(MODE_AppCuKeys		, BITS_AppCuKeys ) + // VT100 stuff
944
             encodeMode(MODE_AppCuKeys		, BITS_AppCuKeys ) + // VT100 stuff
945
                                     encodeMode(MODE_AppScreen		, BITS_AppScreen ) + // VT100 stuff
945
             encodeMode(MODE_AppScreen		, BITS_AppScreen ) + // VT100 stuff
946
                                     encodeStat(TQt::ControlButton	, BITS_Control   ) +
946
             encodeStat(TQt::ControlButton, BITS_Control   ) +
947
                                     encodeStat(TQt::ShiftButton	, BITS_Shift     ) +
947
             encodeStat(TQt::ShiftButton	, BITS_Shift     ) +
948
                                     encodeStat(TQt::AltButton		, BITS_Alt       ),
948
             encodeStat(TQt::AltButton		, BITS_Alt       );
949
                          &cmd, &txt, &len, &metaspecified ))
949
  if (metaKeyMode)
950
//printf("cmd: %d, %s, %d\n",cmd,txt,len);
950
    bits += encodeStat(TQt::MetaButton , BITS_Alt);
951
  keytrans->findEntry(ev->key(), bits, &cmd, &txt, &len, &metaspecified);
951
  if (connected)
952
  if (connected)
952
  {
953
  {
953
  switch(cmd) // ... and execute if found.
954
    switch(cmd) // ... and execute if found.
954
  {
955
    {
955
    case CMD_scrollPageUp   : gui->doScroll(-gui->Lines()/2); return;
956
      case CMD_scrollPageUp   : gui->doScroll(-gui->Lines()/2); return;
956
    case CMD_scrollPageDown : gui->doScroll(+gui->Lines()/2); return;
957
      case CMD_scrollPageDown : gui->doScroll(+gui->Lines()/2); return;
957
    case CMD_scrollLineUp   : gui->doScroll(-1             ); return;
958
      case CMD_scrollLineUp   : gui->doScroll(-1             ); return;
958
    case CMD_scrollLineDown : gui->doScroll(+1             ); return;
959
      case CMD_scrollLineDown : gui->doScroll(+1             ); return;
959
    case CMD_scrollLock     : onScrollLock(                ); return;
960
      case CMD_scrollLock     : onScrollLock(                ); return;
960
  }
961
    }
961
  }
962
  }
962
  if (holdScreen)
963
  if (holdScreen)
963
  {
964
  {
Lines 976-983 void TEmuVt102::onKeyPress( TQKeyEvent* ev ) Link Here
976
    || ev->key()==Qt::Key_PageUp || ev->key()==Qt::Key_PageDown))
977
    || ev->key()==Qt::Key_PageUp || ev->key()==Qt::Key_PageDown))
977
    scr->setHistCursor(scr->getHistLines());
978
    scr->setHistCursor(scr->getHistLines());
978
979
979
  if (cmd==CMD_send) {
980
  if (cmd==CMD_send)
980
    if ((ev->state() & TQt::AltButton) && !metaspecified ) sendString("\033");
981
  {
982
    if ((ev->state() & TQt::AltButton) || 
983
        (metaKeyMode && ((ev->state() & TQt::MetaButton) || metaIsPressed) && !metaspecified))
984
      sendString("\033");
981
    emit sndBlock(txt,len);
985
    emit sndBlock(txt,len);
982
    return;
986
    return;
983
  }
987
  }
Lines 985-991 void TEmuVt102::onKeyPress( TQKeyEvent* ev ) Link Here
985
  // fall back handling
989
  // fall back handling
986
  if (!ev->text().isEmpty())
990
  if (!ev->text().isEmpty())
987
  {
991
  {
988
    if (ev->state() & TQt::AltButton) sendString("\033"); // ESC, this is the ALT prefix
992
    if ((ev->state() & TQt::AltButton) || 
993
        (metaKeyMode && ((ev->state() & TQt::MetaButton) || metaIsPressed)))
994
      sendString("\033"); // ESC, this is the ALT prefix
989
    TQCString s = m_codec->fromUnicode(ev->text());     // encode for application
995
    TQCString s = m_codec->fromUnicode(ev->text());     // encode for application
990
    // FIXME: In Qt 2, TQKeyEvent::text() would return "\003" for Ctrl-C etc.
996
    // FIXME: In Qt 2, TQKeyEvent::text() would return "\003" for Ctrl-C etc.
991
    //        while in Qt 3 it returns the actual key ("c" or "C") which caused
997
    //        while in Qt 3 it returns the actual key ("c" or "C") which caused
(-)a/konsole/konsole/TEmuVt102.h (-1 / +2 lines)
Lines 60-66 public: Link Here
60
  void changeGUI(TEWidget* newgui);
60
  void changeGUI(TEWidget* newgui);
61
  ~TEmuVt102();
61
  ~TEmuVt102();
62
62
63
  virtual void onKeyPress(TQKeyEvent*);
63
  virtual void doKeyPress(TQKeyEvent*);
64
64
public slots: // signals incoming from TEWidget
65
public slots: // signals incoming from TEWidget
65
66
66
  void onMouse(int cb, int cx, int cy);
67
  void onMouse(int cb, int cx, int cy);
(-)a/konsole/konsole/TEmulation.cpp (-1 / +68 lines)
Lines 98-103 TEmulation::TEmulation(TEWidget* w) Link Here
98
  scr(0),
98
  scr(0),
99
  connected(false),
99
  connected(false),
100
  listenToKeyPress(false),
100
  listenToKeyPress(false),
101
  metaKeyMode(false),
102
  metaIsPressed(false),
101
  m_codec(0),
103
  m_codec(0),
102
  decoder(0),
104
  decoder(0),
103
  keytrans(0),
105
  keytrans(0),
Lines 123-128 void TEmulation::connectGUI() Link Here
123
                   this,TQT_SLOT(onHistoryCursorChange(int)));
125
                   this,TQT_SLOT(onHistoryCursorChange(int)));
124
  TQObject::connect(gui,TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
126
  TQObject::connect(gui,TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
125
                   this,TQT_SLOT(onKeyPress(TQKeyEvent*)));
127
                   this,TQT_SLOT(onKeyPress(TQKeyEvent*)));
128
  TQObject::connect(gui,TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)),
129
                   this,TQT_SLOT(onKeyReleased(TQKeyEvent*)));
130
  TQObject::connect(gui,TQT_SIGNAL(focusInSignal(TQFocusEvent*)),
131
                   this,TQT_SLOT(onFocusIn(TQFocusEvent*)));
126
  TQObject::connect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)),
132
  TQObject::connect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)),
127
		   this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) );
133
		   this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) );
128
  TQObject::connect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)),
134
  TQObject::connect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)),
Lines 151-156 void TEmulation::changeGUI(TEWidget* newgui) Link Here
151
                     this,TQT_SLOT(onHistoryCursorChange(int)));
157
                     this,TQT_SLOT(onHistoryCursorChange(int)));
152
    TQObject::disconnect(gui,TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
158
    TQObject::disconnect(gui,TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
153
                     this,TQT_SLOT(onKeyPress(TQKeyEvent*)));
159
                     this,TQT_SLOT(onKeyPress(TQKeyEvent*)));
160
    TQObject::disconnect(gui,TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)),
161
                     this,TQT_SLOT(onKeyReleased(TQKeyEvent*)));
162
    TQObject::disconnect(gui,TQT_SIGNAL(focusInSignal(TQFocusEvent*)),
163
                     this,TQT_SLOT(onFocusIn(TQFocusEvent*)));
154
    TQObject::disconnect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)),
164
    TQObject::disconnect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)),
155
                     this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) );
165
                     this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) );
156
    TQObject::disconnect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)),
166
    TQObject::disconnect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)),
Lines 275-285 void TEmulation::onRcvChar(int c) Link Here
275
285
276
/*!
286
/*!
277
*/
287
*/
278
279
void TEmulation::onKeyPress( TQKeyEvent* ev )
288
void TEmulation::onKeyPress( TQKeyEvent* ev )
280
{
289
{
281
  if (!listenToKeyPress) return; // someone else gets the keys
290
  if (!listenToKeyPress) return; // someone else gets the keys
291
292
  // HACK - workaround for what looks like a bug in Qt.
293
  // Specifically keep track of when the meta button is pressed or released.
294
  // Upon restarting TDE, restored windows do not received the correct KeyEvent state
295
  // when multiple keys are pressed: the MetaButton is missing. 
296
  // Instead on new created window, MetaButton information is correct.
297
  // Ex:
298
  // Meta is pressed --> the state is correct, both before and after 
299
  //   State: Before=0x0000/After=0x0800 Key: 0x1022 
300
  // Then h is presed --> the state does not contain the MetaButton anymore
301
  //   State: Before=0x0000/After=0x0000 Key: 0x0048
302
  if (ev->key() == TQt::Key_Meta)
303
    metaIsPressed = true;
304
  
305
  doKeyPress(ev);
306
}
307
308
void TEmulation::doKeyPress( TQKeyEvent* ev )
309
{
282
  emit notifySessionState(NOTIFYNORMAL);
310
  emit notifySessionState(NOTIFYNORMAL);
311
283
  if (scr->getHistCursor() != scr->getHistLines() && !ev->text().isEmpty())
312
  if (scr->getHistCursor() != scr->getHistLines() && !ev->text().isEmpty())
284
    scr->setHistCursor(scr->getHistLines());
313
    scr->setHistCursor(scr->getHistLines());
285
  if (!ev->text().isEmpty())
314
  if (!ev->text().isEmpty())
Lines 296-301 void TEmulation::onKeyPress( TQKeyEvent* ev ) Link Here
296
  }
325
  }
297
}
326
}
298
327
328
void TEmulation::onKeyReleased( TQKeyEvent* ev )
329
{
330
  if (!listenToKeyPress) return; // someone else gets the keys
331
332
  // HACK - workaround for what looks like a bug in Qt.
333
  // Specifically keep track of when the meta button is pressed or released.
334
  // Upon restarting TDE, restored windows do not received the correct KeyEvent state
335
  // when multiple keys are pressed: the MetaButton is missing. 
336
  // Instead on new created window, MetaButton information is correct.
337
  // Ex:
338
  // Meta is pressed --> the state is correct, both before and after 
339
  //   State: Before=0x0000/After=0x0800 Key: 0x1022 
340
  // Then h is presed --> the state does not contain the MetaButton anymore
341
  //   State: Before=0x0000/After=0x0000 Key: 0x0048
342
  if (ev->key() == TQt::Key_Meta || !(ev->stateAfter() & TQt::MetaButton))
343
    metaIsPressed = false;
344
  
345
  doKeyReleased(ev);
346
}
347
348
void TEmulation::doKeyReleased( TQKeyEvent* ke )
349
{
350
}
351
352
void TEmulation::onFocusIn( TQFocusEvent* fe )
353
{
354
  // HACK - workaround for what looks like a bug in Qt.
355
  // Always reset the status of 'metaIsPressed' when the emulation gets the focus,
356
  // to avoid pending cases. A pending case is a case where the emulation lost the 
357
  // focus while Meta was pressed but gets the focus when Meta is no longer pressed.
358
  metaIsPressed = false;
359
  doFocusIn(fe);
360
}
361
362
void TEmulation::doFocusIn( TQFocusEvent* fe )
363
{
364
}
365
299
// Unblocking, Byte to Unicode translation --------------------------------- --
366
// Unblocking, Byte to Unicode translation --------------------------------- --
300
367
301
/*
368
/*
(-)a/konsole/konsole/TEmulation.h (-1 / +12 lines)
Lines 55-61 public slots: // signals incoming from TEWidget Link Here
55
55
56
  virtual void onImageSizeChange(int lines, int columns);
56
  virtual void onImageSizeChange(int lines, int columns);
57
  virtual void onHistoryCursorChange(int cursor);
57
  virtual void onHistoryCursorChange(int cursor);
58
  virtual void onKeyPress(TQKeyEvent*);
58
59
  // HACK - start
60
          void onKeyPress(TQKeyEvent*);    // This should not be overwritten by derived classes
61
  virtual void doKeyPress(TQKeyEvent*);    // Instead this function should be overwritten if necessary
62
          void onKeyReleased(TQKeyEvent*); // This should not be overwritten by derived classes
63
  virtual void doKeyReleased(TQKeyEvent*); // Instead this function should be overwritten if necessary
64
          void onFocusIn(TQFocusEvent*);   // This should not be overwritten by derived classes
65
  virtual void doFocusIn(TQFocusEvent*);   // Instead this function should be overwritten if necessary
66
  // HACK - end
59
 
67
 
60
  virtual void clearSelection();
68
  virtual void clearSelection();
61
  virtual void copySelection();
69
  virtual void copySelection();
Lines 89-94 public: Link Here
89
97
90
  virtual void setMode  (int) = 0;
98
  virtual void setMode  (int) = 0;
91
  virtual void resetMode(int) = 0;
99
  virtual void resetMode(int) = 0;
100
  void setMetaKeyMode(bool mode) { metaKeyMode = mode; }
92
101
93
  virtual void sendString(const char*) = 0;
102
  virtual void sendString(const char*) = 0;
94
103
Lines 119-124 protected: Link Here
119
128
120
  bool   connected;    // communicate with widget
129
  bool   connected;    // communicate with widget
121
  bool   listenToKeyPress;  // listen to input
130
  bool   listenToKeyPress;  // listen to input
131
  bool   metaKeyMode;       // true -> meta key is handled as Alt
132
  bool   metaIsPressed;     // true -> the meta key has been pressed down - HACK
122
133
123
  void setCodec(int c); // codec number, 0 = locale, 1=utf8
134
  void setCodec(int c); // codec number, 0 = locale, 1=utf8
124
135
(-)a/konsole/konsole/konsole.cpp (-17 / +43 lines)
Lines 273-278 Konsole::Konsole(const char* name, int histon, bool menubaron, bool tabbaron, bo Link Here
273
,b_autoResizeTabs(false)
273
,b_autoResizeTabs(false)
274
,b_installBitmapFonts(false)
274
,b_installBitmapFonts(false)
275
,b_framevis(true)
275
,b_framevis(true)
276
,b_metaAsAlt(false)
276
,b_fullscreen(false)
277
,b_fullscreen(false)
277
,m_menuCreated(false)
278
,m_menuCreated(false)
278
,b_warnQuit(false)
279
,b_warnQuit(false)
Lines 1622-1627 void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool glo Link Here
1622
     b_bidiEnabled = config->readBoolEntry("EnableBidi",false);
1623
     b_bidiEnabled = config->readBoolEntry("EnableBidi",false);
1623
     s_word_seps= config->readEntry("wordseps",":@-./_~");
1624
     s_word_seps= config->readEntry("wordseps",":@-./_~");
1624
     b_framevis = config->readBoolEntry("has frame",true);
1625
     b_framevis = config->readBoolEntry("has frame",true);
1626
     b_metaAsAlt = config->readBoolEntry("metaAsAltMode",false);
1625
     TQPtrList<TEWidget> tes = activeTEs();
1627
     TQPtrList<TEWidget> tes = activeTEs();
1626
     for (TEWidget *_te = tes.first(); _te; _te = tes.next()) {
1628
     for (TEWidget *_te = tes.first(); _te; _te = tes.next()) {
1627
       _te->setWordCharacters(s_word_seps);
1629
       _te->setWordCharacters(s_word_seps);
Lines 1636-1642 void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool glo Link Here
1636
1638
1637
     monitorSilenceSeconds=config->readUnsignedNumEntry("SilenceSeconds", 10);
1639
     monitorSilenceSeconds=config->readUnsignedNumEntry("SilenceSeconds", 10);
1638
     for (TESession *ses = sessions.first(); ses; ses = sessions.next())
1640
     for (TESession *ses = sessions.first(); ses; ses = sessions.next())
1641
     {
1642
       ses->setMetaAsAltMode(b_metaAsAlt);
1639
       ses->setMonitorSilenceSeconds(monitorSilenceSeconds);
1643
       ses->setMonitorSilenceSeconds(monitorSilenceSeconds);
1644
     }
1640
1645
1641
     b_xonXoff = config->readBoolEntry("XonXoff",false);
1646
     b_xonXoff = config->readBoolEntry("XonXoff",false);
1642
     b_matchTabWinTitle = config->readBoolEntry("MatchTabWinTitle",false);
1647
     b_matchTabWinTitle = config->readBoolEntry("MatchTabWinTitle",false);
Lines 2187-2193 void Konsole::reparseConfiguration() Link Here
2187
  curr_schema = sch->numb();
2192
  curr_schema = sch->numb();
2188
  pmPath = sch->imagePath();
2193
  pmPath = sch->imagePath();
2189
2194
2190
  for (TESession *_se = sessions.first(); _se; _se = sessions.next()) {
2195
  for (TESession *_se = sessions.first(); _se; _se = sessions.next())
2196
  {
2197
     _se->setMetaAsAltMode(b_metaAsAlt);
2191
     ColorSchema* s = colors->find( _se->schemaNo() );
2198
     ColorSchema* s = colors->find( _se->schemaNo() );
2192
     if (s) {
2199
     if (s) {
2193
       if (s->hasSchemaFileChanged())
2200
       if (s->hasSchemaFileChanged())
Lines 2369-2376 void Konsole::disableMasterModeConnections() Link Here
2369
      for (; to_it.current(); ++to_it) {
2376
      for (; to_it.current(); ++to_it) {
2370
        TESession *to = to_it.current();
2377
        TESession *to = to_it.current();
2371
        if (to!=from)
2378
        if (to!=from)
2372
          disconnect(from->widget(),TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
2379
        {
2373
                     to->getEmulation(),TQT_SLOT(onKeyPress(TQKeyEvent*)));
2380
          disconnect(from->widget(), TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
2381
                     to->getEmulation(), TQT_SLOT(onKeyPress(TQKeyEvent*)));
2382
          disconnect(from->widget(), TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)),
2383
                     to->getEmulation(), TQT_SLOT(onKeyReleased(TQKeyEvent*)));
2384
          disconnect(from->widget(), TQT_SIGNAL(focusInSignal(TQFocusEvent*)),
2385
                     to->getEmulation(), TQT_SLOT(onFocusIn(TQFocusEvent*))); 
2386
        }
2374
      }
2387
      }
2375
    }
2388
    }
2376
  }
2389
  }
Lines 2385-2393 void Konsole::enableMasterModeConnections() Link Here
2385
      TQPtrListIterator<TESession> to_it(sessions);
2398
      TQPtrListIterator<TESession> to_it(sessions);
2386
      for (; to_it.current(); ++to_it) {
2399
      for (; to_it.current(); ++to_it) {
2387
        TESession *to = to_it.current();
2400
        TESession *to = to_it.current();
2388
        if (to!=from) {
2401
        if (to!=from)
2389
          connect(from->widget(),TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
2402
        {
2390
                  to->getEmulation(),TQT_SLOT(onKeyPress(TQKeyEvent*)));
2403
          connect(from->widget(), TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
2404
                  to->getEmulation(), TQT_SLOT(onKeyPress(TQKeyEvent*)));
2405
          connect(from->widget(), TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)),
2406
                  to->getEmulation(), TQT_SLOT(onKeyReleased(TQKeyEvent*)));
2407
          connect(from->widget(), TQT_SIGNAL(focusInSignal(TQFocusEvent*)),
2408
                  to->getEmulation(), TQT_SLOT(onFocusIn(TQFocusEvent*))); 
2391
        }
2409
        }
2392
      }
2410
      }
2393
    }
2411
    }
Lines 2951-2973 TQString Konsole::newSession(KSimpleConfig *co, TQString program, const TQStrLis Link Here
2951
  s->setProgram(TQFile::encodeName(program),cmdArgs);
2969
  s->setProgram(TQFile::encodeName(program),cmdArgs);
2952
  s->setMonitorSilenceSeconds(monitorSilenceSeconds);
2970
  s->setMonitorSilenceSeconds(monitorSilenceSeconds);
2953
  s->enableFullScripting(b_fullScripting);
2971
  s->enableFullScripting(b_fullScripting);
2972
  s->setMetaAsAltMode(b_metaAsAlt);
2973
  
2954
  // If you add any new signal-slot connection below, think about doing it in konsolePart too
2974
  // If you add any new signal-slot connection below, think about doing it in konsolePart too
2955
  connect( s,TQT_SIGNAL(done(TESession*)),
2975
  connect( s,TQT_SIGNAL(done(TESession*)),
2956
           this,TQT_SLOT(doneSession(TESession*)) );
2976
           this,TQT_SLOT(doneSession(TESession*)));
2957
  connect( s, TQT_SIGNAL( updateTitle(TESession*) ),
2977
  connect( s, TQT_SIGNAL(updateTitle(TESession*)),
2958
           this, TQT_SLOT( updateTitle(TESession*) ) );
2978
           this, TQT_SLOT(updateTitle(TESession*)));
2959
  connect( s, TQT_SIGNAL( notifySessionState(TESession*, int) ),
2979
  connect( s, TQT_SIGNAL(notifySessionState(TESession*, int)),
2960
           this, TQT_SLOT( notifySessionState(TESession*, int)) );
2980
           this, TQT_SLOT(notifySessionState(TESession*, int)));
2961
  connect( s, TQT_SIGNAL(disableMasterModeConnections()),
2981
  connect( s, TQT_SIGNAL(disableMasterModeConnections()),
2962
           this, TQT_SLOT(disableMasterModeConnections()) );
2982
           this, TQT_SLOT(disableMasterModeConnections()));
2963
  connect( s, TQT_SIGNAL(enableMasterModeConnections()),
2983
  connect( s, TQT_SIGNAL(enableMasterModeConnections()),
2964
           this, TQT_SLOT(enableMasterModeConnections()) );
2984
           this, TQT_SLOT(enableMasterModeConnections()));
2965
  connect( s, TQT_SIGNAL(renameSession(TESession*,const TQString&)),
2985
  connect( s, TQT_SIGNAL(renameSession(TESession*,const TQString&)),
2966
           this, TQT_SLOT(slotRenameSession(TESession*, const TQString&)) );
2986
           this, TQT_SLOT(slotRenameSession(TESession*, const TQString&)));
2967
  connect( s->getEmulation(), TQT_SIGNAL(changeColumns(int)),
2987
  connect( s->getEmulation(), TQT_SIGNAL(changeColumns(int)),
2968
           this, TQT_SLOT(changeColumns(int)) );
2988
           this, TQT_SLOT(changeColumns(int)) );
2969
  connect( s->getEmulation(), TQT_SIGNAL(changeColLin(int,int)),
2989
  connect( s->getEmulation(), TQT_SIGNAL(changeColLin(int,int)),
2970
           this, TQT_SLOT(changeColLin(int,int)) );
2990
           this, TQT_SLOT(changeColLin(int,int)));
2971
  connect( s->getEmulation(), TQT_SIGNAL(ImageSizeChanged(int,int)),
2991
  connect( s->getEmulation(), TQT_SIGNAL(ImageSizeChanged(int,int)),
2972
           this, TQT_SLOT(notifySize(int,int)));
2992
           this, TQT_SLOT(notifySize(int,int)));
2973
  connect( s, TQT_SIGNAL(zmodemDetected(TESession*)),
2993
  connect( s, TQT_SIGNAL(zmodemDetected(TESession*)),
Lines 2983-2989 TQString Konsole::newSession(KSimpleConfig *co, TQString program, const TQStrLis Link Here
2983
  connect( s, TQT_SIGNAL(setSessionSchema(TESession*, const TQString &)),
3003
  connect( s, TQT_SIGNAL(setSessionSchema(TESession*, const TQString &)),
2984
           this, TQT_SLOT(slotSetSessionSchema(TESession*, const TQString &)));
3004
           this, TQT_SLOT(slotSetSessionSchema(TESession*, const TQString &)));
2985
  connect( s, TQT_SIGNAL(changeTabTextColor(TESession*, int)),
3005
  connect( s, TQT_SIGNAL(changeTabTextColor(TESession*, int)),
2986
           this,TQT_SLOT(changeTabTextColor(TESession*, int)) );
3006
           this,TQT_SLOT(changeTabTextColor(TESession*, int)));
2987
3007
2988
  s->widget()->setVTFont(defaultFont);// Hack to set font again after newSession
3008
  s->widget()->setVTFont(defaultFont);// Hack to set font again after newSession
2989
  s->setSchemaNo(schmno);
3009
  s->setSchemaNo(schmno);
Lines 3727-3734 void Konsole::detachSession(TESession* _se) { Link Here
3727
    for(; from_it.current(); ++from_it) {
3747
    for(; from_it.current(); ++from_it) {
3728
      TESession *from = from_it.current();
3748
      TESession *from = from_it.current();
3729
      if(from->isMasterMode())
3749
      if(from->isMasterMode())
3750
      {
3730
        disconnect(from->widget(), TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
3751
        disconnect(from->widget(), TQT_SIGNAL(keyPressedSignal(TQKeyEvent*)),
3731
	           _se->getEmulation(), TQT_SLOT(onKeyPress(TQKeyEvent*)));
3752
	            _se->getEmulation(), TQT_SLOT(onKeyPress(TQKeyEvent*)));
3753
        disconnect(from->widget(), TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)),
3754
              _se->getEmulation(), TQT_SLOT(onKeyReleased(TQKeyEvent*)));
3755
        disconnect(from->widget(), TQT_SIGNAL(focusInSignal(TQFocusEvent*)),
3756
              _se->getEmulation(), TQT_SLOT(onFocusIn(TQFocusEvent*)));
3757
      }
3732
    }
3758
    }
3733
  }
3759
  }
3734
3760
(-)a/konsole/konsole/konsole.h (+1 lines)
Lines 435-440 private: Link Here
435
  bool        b_installBitmapFonts;
435
  bool        b_installBitmapFonts;
436
436
437
  bool        b_framevis:1;
437
  bool        b_framevis:1;
438
  bool        b_metaAsAlt:1;
438
  bool        b_fullscreen:1;
439
  bool        b_fullscreen:1;
439
  bool        m_menuCreated:1;
440
  bool        m_menuCreated:1;
440
  bool        b_warnQuit:1;
441
  bool        b_warnQuit:1;
(-)a/konsole/konsole/konsole_part.cpp (-4 / +19 lines)
Lines 105-110 konsolePart::konsolePart(TQWidget *_parentWidget, const char *widgetName, TQObje Link Here
105
,rootxpm(0)
105
,rootxpm(0)
106
,blinkingCursor(0)
106
,blinkingCursor(0)
107
,showFrame(0)
107
,showFrame(0)
108
,metaAsAlt(0)
108
,m_useKonsoleSettings(0)
109
,m_useKonsoleSettings(0)
109
,selectBell(0)
110
,selectBell(0)
110
,selectLineSpacing(0)
111
,selectLineSpacing(0)
Lines 431-436 void konsolePart::makeGUI() Link Here
431
     showFrame->setCheckedState(i18n("Hide Fr&ame"));
432
     showFrame->setCheckedState(i18n("Hide Fr&ame"));
432
     showFrame->plug(m_options);
433
     showFrame->plug(m_options);
433
434
435
     // Meta key as Alt key
436
     metaAsAlt = new TDEToggleAction(i18n("Me&ta key as Alt key"), 0,
437
                                this, TQT_SLOT(slotToggleMetaAsAltMode()), settingsActions);
438
     metaAsAlt->plug(m_options);
439
434
     // Word Connectors
440
     // Word Connectors
435
     TDEAction *WordSeps = new TDEAction(i18n("Wor&d Connectors..."), 0, this,
441
     TDEAction *WordSeps = new TDEAction(i18n("Wor&d Connectors..."), 0, this,
436
                                  TQT_SLOT(slotWordSeps()), settingsActions);
442
                                  TQT_SLOT(slotWordSeps()), settingsActions);
Lines 505-510 void konsolePart::applySettingsToGUI() Link Here
505
     selectLineSpacing->setCurrentItem(te->lineSpacing());
511
     selectLineSpacing->setCurrentItem(te->lineSpacing());
506
  if (blinkingCursor)
512
  if (blinkingCursor)
507
     blinkingCursor->setChecked(te->blinkingCursor());
513
     blinkingCursor->setChecked(te->blinkingCursor());
514
  if (metaAsAlt)
515
     metaAsAlt->setChecked(b_metaAsAlt);
508
  if (m_schema)
516
  if (m_schema)
509
     m_schema->setItemChecked(curr_schema,true);
517
     m_schema->setItemChecked(curr_schema,true);
510
  if (selectSetEncoding)
518
  if (selectSetEncoding)
Lines 532-537 void konsolePart::applyProperties() Link Here
532
   se->widget()->setVTFont( defaultFont );
540
   se->widget()->setVTFont( defaultFont );
533
   se->setSchemaNo( curr_schema );
541
   se->setSchemaNo( curr_schema );
534
   slotSetEncoding();
542
   slotSetEncoding();
543
544
   se->setMetaAsAltMode(b_metaAsAlt);
535
}
545
}
536
546
537
void konsolePart::setSettingsMenuEnabled( bool enable )
547
void konsolePart::setSettingsMenuEnabled( bool enable )
Lines 560-572 void konsolePart::readProperties() Link Here
560
  config->setDesktopGroup();
570
  config->setDesktopGroup();
561
571
562
  b_framevis = config->readBoolEntry("has frame",false);
572
  b_framevis = config->readBoolEntry("has frame",false);
573
  b_metaAsAlt = config->readBoolEntry("metaAsAltMode",false);
563
  b_histEnabled = config->readBoolEntry("historyenabled",true);
574
  b_histEnabled = config->readBoolEntry("historyenabled",true);
564
  n_bell = TQMIN(config->readUnsignedNumEntry("bellmode",TEWidget::BELLSYSTEM),3);
575
  n_bell = TQMIN(config->readUnsignedNumEntry("bellmode",TEWidget::BELLSYSTEM),3);
565
  n_keytab=config->readNumEntry("keytab",0); // act. the keytab for this session
576
  n_keytab=config->readNumEntry("keytab",0); // act. the keytab for this session
566
  n_scroll = TQMIN(config->readUnsignedNumEntry("scrollbar",TEWidget::SCRRIGHT),2);
577
  n_scroll = TQMIN(config->readUnsignedNumEntry("scrollbar",TEWidget::SCRRIGHT),2);
567
  m_histSize = config->readNumEntry("history",DEFAULT_HISTORY_SIZE);
578
  m_histSize = config->readNumEntry("history",DEFAULT_HISTORY_SIZE);
568
  s_word_seps= config->readEntry("wordseps",":@-./_~");
579
  s_word_seps= config->readEntry("wordseps",":@-./_~");
569
570
  n_encoding = config->readNumEntry("encoding",0);
580
  n_encoding = config->readNumEntry("encoding",0);
571
581
572
  TQFont tmpFont = TDEGlobalSettings::fixedFont();
582
  TQFont tmpFont = TDEGlobalSettings::fixedFont();
Lines 637-642 void konsolePart::saveProperties() Link Here
637
    config->writeEntry("historyenabled", b_histEnabled);
647
    config->writeEntry("historyenabled", b_histEnabled);
638
    config->writeEntry("keytab",n_keytab);
648
    config->writeEntry("keytab",n_keytab);
639
    config->writeEntry("has frame",b_framevis);
649
    config->writeEntry("has frame",b_framevis);
650
    config->writeEntry("metaAsAltMode",b_metaAsAlt);
640
    config->writeEntry("LineSpacing", te->lineSpacing());
651
    config->writeEntry("LineSpacing", te->lineSpacing());
641
    config->writeEntry("schema",s_tdeconfigSchema);
652
    config->writeEntry("schema",s_tdeconfigSchema);
642
    config->writeEntry("scrollbar",n_scroll);
653
    config->writeEntry("scrollbar",n_scroll);
Lines 914-927 void konsolePart::slotBlinkingCursor() Link Here
914
  te->setBlinkingCursor(blinkingCursor->isChecked());
925
  te->setBlinkingCursor(blinkingCursor->isChecked());
915
}
926
}
916
927
928
void konsolePart::slotToggleMetaAsAltMode()
929
{
930
  b_metaAsAlt ^= true;
931
  if (!se) return;
932
  se->setMetaAsAltMode(b_metaAsAlt);
933
}
934
917
void konsolePart::slotUseKonsoleSettings()
935
void konsolePart::slotUseKonsoleSettings()
918
{
936
{
919
   b_useKonsoleSettings = m_useKonsoleSettings->isChecked();
937
   b_useKonsoleSettings = m_useKonsoleSettings->isChecked();
920
921
   setSettingsMenuEnabled( !b_useKonsoleSettings );
938
   setSettingsMenuEnabled( !b_useKonsoleSettings );
922
923
   readProperties();
939
   readProperties();
924
925
   applySettingsToGUI();
940
   applySettingsToGUI();
926
}
941
}
927
942
(-)a/konsole/konsole/konsole_part.h (-3 / +6 lines)
Lines 118-123 signals: Link Here
118
    void slotSelectBell();
118
    void slotSelectBell();
119
    void slotSelectLineSpacing();
119
    void slotSelectLineSpacing();
120
    void slotBlinkingCursor();
120
    void slotBlinkingCursor();
121
    void slotToggleMetaAsAltMode();
121
    void slotUseKonsoleSettings();
122
    void slotUseKonsoleSettings();
122
    void slotWordSeps();
123
    void slotWordSeps();
123
    void slotSetEncoding();
124
    void slotSetEncoding();
Lines 136-144 signals: Link Here
136
    void setSchema(ColorSchema* s);
137
    void setSchema(ColorSchema* s);
137
    void updateKeytabMenu();
138
    void updateKeytabMenu();
138
139
139
	bool doOpenStream( const TQString& );
140
	  bool doOpenStream( const TQString& );
140
	bool doWriteStream( const TQByteArray& );
141
  	bool doWriteStream( const TQByteArray& );
141
	bool doCloseStream();
142
  	bool doCloseStream();
142
143
143
    TQWidget* parentWidget;
144
    TQWidget* parentWidget;
144
    TEWidget* te;
145
    TEWidget* te;
Lines 151-156 signals: Link Here
151
152
152
    TDEToggleAction* blinkingCursor;
153
    TDEToggleAction* blinkingCursor;
153
    TDEToggleAction* showFrame;
154
    TDEToggleAction* showFrame;
155
    TDEToggleAction* metaAsAlt;
154
    TDEToggleAction* m_useKonsoleSettings;
156
    TDEToggleAction* m_useKonsoleSettings;
155
157
156
    TDESelectAction* selectBell;
158
    TDESelectAction* selectBell;
Lines 174-179 signals: Link Here
174
    TQString     s_word_seps;			// characters that are considered part of a word
176
    TQString     s_word_seps;			// characters that are considered part of a word
175
177
176
    bool        b_framevis:1;
178
    bool        b_framevis:1;
179
    bool        b_metaAsAlt:1;
177
    bool        b_histEnabled:1;
180
    bool        b_histEnabled:1;
178
    bool        b_useKonsoleSettings:1;
181
    bool        b_useKonsoleSettings:1;
179
    bool        b_autoDestroy:1;
182
    bool        b_autoDestroy:1;
(-)a/konsole/konsole/session.cpp (+6 lines)
Lines 464-469 void TESession::setFontNo(int fn) Link Here
464
  font_no = fn;
464
  font_no = fn;
465
}
465
}
466
466
467
void TESession::setMetaAsAltMode(bool mode)
468
{
469
  if (em)
470
    em->setMetaKeyMode(mode);
471
}
472
467
void TESession::setTitle(const TQString& _title)
473
void TESession::setTitle(const TQString& _title)
468
{
474
{
469
  title = _title;
475
  title = _title;
(-)a/konsole/konsole/session.h (+1 lines)
Lines 123-128 public: Link Here
123
  void setSize(TQSize size);
123
  void setSize(TQSize size);
124
  void setFont(const TQString &font);
124
  void setFont(const TQString &font);
125
  TQString font();
125
  TQString font();
126
  void setMetaAsAltMode(bool mode);
126
127
127
public slots:
128
public slots:
128
129

Return to bug 1026