Commit Graph

239 Commits

Author SHA1 Message Date
Kurt Hindenburg
ff66b231bf Remove unneeded includes 2015-09-16 23:34:40 -04:00
Kurt Hindenburg
917d932f46 Add const and & 2015-09-15 10:23:08 -04:00
Kurt Hindenburg
104f3dd1ef Remove unused function qHash 2015-09-15 10:18:43 -04:00
Kurt Hindenburg
0882caa18c Remove outdated dbus /Konsole - use /Windows/# 2015-09-12 12:42:33 -04:00
Kurt Hindenburg
7b07dd78cd s/QLatin1String/QStringLiteral/ 2015-09-12 12:35:49 -04:00
Kurt Hindenburg
9484507f90 Add option to insert DnD URLs as plain text
This patch allows the dnd menu to be disabled, making it possible to
drag and drop URLs as text by default.

Thanks to Peter Wu peter lekensteyn nl for patch

REVIEW: 124908
BUG: 304290
2015-08-29 08:40:38 -04:00
Kurt Hindenburg
b330491507 Fix crash when _viewSplitter->activeContainer() returns null
Crash research/fix by Alexander Richardson arichardson kde gmail com

FIXED-IN: 3.0.0
REVIEW: 121108
(cherry picked from commit 1826b91d26)
2014-11-27 13:05:46 -05:00
Montel Laurent
83515eafbc Port to new connect api 2014-10-18 14:11:18 +02:00
Michal Humpula
d3310de9e0 port KIcon to QIcon
REVIEW: 120493
2014-10-11 14:38:18 +02:00
Lukáš Tinkl
cc85a5243c QAction::setShortcut -> KActionCollection::setDefaultShortcut 2014-10-06 22:27:29 +02:00
Aurélien Gâteau
dd1b2b4df0 Fix crash on close
Move code responsible for 'forgetting' a view outside of code responding to the
TerminalDisplay deletion.

This avoids a loop like this:

~MainWindow
=> ~QStackedWidget
=> ~TerminalDisplay
=> QObject::destroyed
=> ViewContainer::viewDestroyed
=> ViewContainer::removeViewWidget
   - internal cleanup
   - try to remove TerminalDisplay from QStackedWidget which is being deleted and
crash

Instead the code now does:

~MainWindow
=> ~QStackedWidget
=> ~TerminalDisplay
=> QObject::destroyed
=> ViewContainer::viewDestroyed
=> ViewContainer::forgetView (does the internal clean up)

And if one tries to explicitly remove a view, sequence is:

ViewContainer::removeView
=> ViewContainer::forgetView
=> ViewContainer::removeViewWidget

The patch also removes ViewManager::focusActiveView() because it causes a crash
when closing a TerminalDisplay as it tries to put the focus on the deleted
TerminalDisplay. I initially called it through a queued connection, but realized
it is actually not needed for focus to be passed to the correct view, so just
removed it.

BUG: 331724
REVIEW: 118839
2014-06-20 14:01:27 +02:00
Alex Richardson
a3ce74d4eb Convert to Qt5 signal slot syntax
REVIEW: 117482
2014-04-30 19:16:54 +02:00
Kurt Hindenburg
3023294c14 Fix rows calculation for new profile settings.
New feature in 2.13 allows columns/rows in profiles; however, the
rows would be incorrect depending on if tabbar was visible.  Ideally,
this should not be needed but I would guess this won't get fixed
correctly until frameworks timeframe.
This calculation can still be wrong if ShowNavigationAsNeeded and
perhaps other times depending on height of tabbar.

FIXED: 2.13
(cherry picked from commit 73e1db3e3b)
2014-03-04 23:27:02 -05:00
Kurt Hindenburg
d964d62081 Add note about why +1 is needed for setting rows (tabbar visiblity).
With the recent new code, profiles can have the terminal col/rows.
Everyone will notice that the rows won't match what Konsole uses.

(cherry picked from commit 90691643fb)
2014-02-17 09:26:44 -05:00
Kurt Hindenburg
522e4a57ba Allow konsole to store terminal size in the profile.
This removes the profile setting to 'Save window size upon exit'.  Now
it is in the Konsole settings; each profile can now set desired column
and row size.

Konsole Settings->Configure Konsole->General->Use current window size
on next startup:
Enabled - ignores all profile size settings - uses previous window size
Disabled - profile size settings are used - set via Edit Current
 Profile 1st tab

Only new windows will use "new" col/row/size settings.

BUG: 152385
REVIEW: 115628
FIXED-IN: 2.13
(cherry picked from commit 931d64df81)
2014-02-17 09:26:18 -05:00
Kurt Hindenburg
1ea501da62 remove include moc from .cpp files - removes build warnings 2013-10-22 20:07:23 -04:00
Kurt Hindenburg
b645fa4a0f s/splitted/split
(cherry picked from commit 43f7d5b34b)
2013-08-21 09:58:04 -04:00
Alex Richardson
a83db71590 Port to KF5/Qt5
TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes

REVIEW: 111937
2013-08-20 23:34:35 +02:00
Kurt Hindenburg
205a51839c Disable detaching when on Darwin (MacOSX)
Too many issues/crashes for too long when detaching on MacOSX.  You
can still some strange things but I can't get it to crash now.
2013-08-15 22:26:59 -04:00
Francesco Cecconi
194a852d33 Prevent the dragging of the last tab in a split view.
BUG: 210871
REVIEW: 107640
FIXED-IN: 4.12
2013-08-15 23:14:17 +02:00
Alex Richardson
ab5e15b1b7 Revert "Port to KF5/Qt5"
This reverts commit 4adfbe84bd.

This work will go into a new branch instead
2013-08-13 23:26:19 +02:00
Alex Richardson
4adfbe84bd Port to KF5/Qt5
To build for KF5 pass the option -DQT5_BUILD=ON to CMake

TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes

REVIEW: 111937
2013-08-13 21:26:59 +02:00
Kurt Hindenburg
c56db4cfd0 Use QRect instead of manually handling terminal margins
Instead of keeping track of constants and +1 -1, use a QRect to handle
the terminal margins.  There is no GUI for this currently and the
margins are hard-coded to what they are now.  Code to center the
terminal is also include (w/o GUI).

This patch comes from review 109891 w/ a few changes from me.
Thanks to Mariusz Glebocki mglb@arccos-1.net
2013-05-18 07:51:29 -04:00
Kurt Hindenburg
2d5df9cc09 Allow shortcuts up to 19 tabs
The current was 10; Ingo Molnar suggested 14 via email.  I have a
keyboard with 19 so that seems a reasonable limit.
2013-03-27 09:33:27 -04:00
Kurt Hindenburg
b5dbf6b32f minor space/tab fixes 2013-03-16 12:36:05 -04:00
Kurt Hindenburg
3cd4d2e440 Add profile option to scroll full/half height via Page Up/Down keys
The default is still half page - there is no GUI to change this;
either use konsoleprofile or change the .profile manually.

CCBUG: 280637
2013-02-24 12:03:46 -05:00
Kurt Hindenburg
7a2a5beb00 Correct spelling errors/word usage
All these are in the comments - no code changes
2013-01-09 22:07:11 -05:00
Kurt Hindenburg
417af269e5 Add option to disable ctrl+<mouse-wheel> zooming
The built-in behavior of Ctrl+<Mouse Wheel> to zoom in/out the terminal
can not be disabled. This patch adds an option to disable this
behavior. (Default to the original behavior).

Original patch by Yichao Yu yyc1992@gmail.com
I made some changes - bugs are mine as usual
REVIEW: 107281
FIXED-IN: 4.11
GUI:
2012-12-28 09:51:34 -05:00
Kurt Hindenburg
ca9dd11bf5 Allow option to trim spaces at end of line
In the ongoing issue with spaces at the end of lines, this allows for
an option to trim the spaces.  By default, it is disabled so only
people who need this will be affected.

Many thanks to David Smid <david@smidovi.eu>

CCBUG: 188528
2012-09-09 19:10:41 -04:00
Kurt Hindenburg
69dcbd3406 astyle fixes - spaces/{ 2012-09-02 17:28:43 -04:00
Jekyll Wu
131091c983 Adjust including form for some Qt headers as preparation for Qt5
So if someone notices later some Qt header is included in the form
of "#include <Class>" instead of the more common form of "#include
<Module/Class>", do not rush changing it.

REVIEW: 105819
2012-08-14 17:32:06 +08:00
Kurt Hindenburg
e02fea6e17 astyle fixes
use git diff -w --ignore-all-space to see non-space changes
2012-08-05 13:35:03 -04:00
Jekyll Wu
248f2c3cc9 Add profile option for opening URL by direct click(off by default)
Thanks to Asko Eronen<asko.eronen@gmail.com> for the idea and patch

REVIEW: 105282
FEATURE:
DIGEST:
2012-07-15 01:41:13 +08:00
Kurt Hindenburg
57994c1d5d Provide GUI to change line spacing
This provides a profile GUI to change the line spacing  (0-5).  Due to
the Qt4.8/BIDI issues, allowing the user to  change the spacing allows
the user to fix any issues w/ the font they are using.

FEATURE: 279490
REVIEW: 105478
FIXED-IN: 4.10
2012-07-10 10:41:38 -04:00
Kurt Hindenburg
ed31a8b0aa Provde a GUI option to disable requiring CTRL to dnd text
This adds a GUI checkbox per profile to enable/disable requiring the
CTRL key to drag-n-drop text.
The default is to require the CTRL key as before.

Thanks to Scott Kitterman (kde@kitterman.com) for patch.

BUG: 165923
REVIEW: 105423
FIXED-IN: 4.10
2012-07-06 16:37:27 -04:00
Kurt Hindenburg
692a48cbf9 Alter how newSession profile directory is coded
Use a loop and break out when the first profile match is found.
2012-06-26 11:11:49 -04:00
Jekyll Wu
6503473272 Use Qt::UniqueConnectio to avoid duplicate connection 2012-06-02 21:21:14 +08:00
Jekyll Wu
627a511daa Move the code for submenu of 'New Tab' button into class ViewContainer
This might feel like slight de-optimization of current code. However, it
helps abstracting and refactoring the code for the future.
2012-05-24 05:03:58 +08:00
Jekyll Wu
151b96fb0b Rename: konsoleadaptors ==> windowadaptors
TODO: it is really better to move those dbus interfaces up into class
MainWinow, which is more natural accroding to the '/Windows/N' naming
schema
2012-05-21 15:49:13 +08:00
Kurt Hindenburg
bee9aa8f78 minor style fixes - remove empty lines start/end code blocks 2012-05-13 10:08:05 -04:00
Jekyll Wu
3ddc6496b6 Add cmdline options for the visibility of menubar and tabbar
Since the menubar and tarbar settings are now global instead of per
profile , those cmdline options are useful to allow users to override
the defautl behavior.

The --hide-menubar and --hide-tabbar options can be used together
to simulate the miminal interface of xterm. I'm not sure whether
--show-menubar and --show-tabbar will be widely used , but add them at
the moment for the sake of completeness.
2012-05-13 03:06:14 +08:00
Jekyll Wu
02ae47c5fb Refactor the code for setting cursor color 2012-05-11 18:08:14 +08:00
Jekyll Wu
cf24bea6ab Add one global option for customizing the stylesheet of the tabbar
Note: this is just an experimental idea, so no GUI is added. It might
rename or disappear later.
2012-05-08 21:37:40 +08:00
Jekyll Wu
bb818010b4 Add two profile options for the copy & paste behavior of mouse
* support "automatially copy selected text into clipboard"
  * mouse middle button can be customized to paste from selectio or
    clipboard

The first feature might look like a unnecessary duplicate of the
"synchronize selection and clipboard" feature of Klipper. However, that
klipper feature is generally problematic, while doing it only in Konsole
is generally useful and harmless.

FEATURE: 183490
FIXED-IN: 4.9.0
REVIEW: 103861
DIGEST:
2012-04-25 12:55:38 +08:00
Jekyll Wu
3c958a2c97 Rename and remove the no longer needed signal relayer 2012-04-21 11:41:31 +08:00
Jekyll Wu
caaa91a08c Add support for KDE Web Shortcus
There is a submenu in the context menu for searching selected text using
any of the enabled search provider and opening the result in the default
web browser.

This could be useful for searching compilation failure messages, warning
messages in logfile, etc.

DIGEST:
FEATURE:
FIXED-IN: 4.9.0
REVIEW: 104493
2012-04-18 00:00:29 +08:00
Jekyll Wu
dc1144cc7f Revert "Less explict call of session->run()"
Unfortunately, that commit makes all tabs in the restored Konsole window
show fallback tab until you switch to it.

Cleearly, the way when and how to start a session is messy.

Note: reverting does means calling session->run() explicitly is the
OK way.

This reverts commit c6bb999066.
2012-04-16 03:42:34 +08:00
Jekyll Wu
50668d65b0 Set the initial/preferred terminal size accroding to profile options
The old code always set the hardcoded 80x40 size.

Two profile options are added under the "General" group:

  * TerminalColumns
  * terminalRows

Note: Due to the way KMainWindow works, those profile options may not
work :(. Do not take this commit as something completed.
2012-04-09 11:37:04 +08:00
Kurt Hindenburg
ba34c4ebe2 normalize SIGNALS
It is annoying that kdelibs-style and Qt normalize conflict
2012-04-06 08:57:47 -04:00
Kurt Hindenburg
5b083640ce whitespace and style fixes
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00