Commit Graph

80 Commits

Author SHA1 Message Date
Jekyll Wu
ca7beebb0e KTabWidget is not used by konsole yet. 2011-09-06 08:23:16 +08:00
Jekyll Wu
de61d40c63 Include Qt headers in the form of "#include <Module/Class>" 2011-09-06 06:42:42 +08:00
Jekyll Wu
d11be81bf3 adjust indentation. 2011-08-14 20:10:28 +08:00
Jekyll Wu
ff1de927c2 class ProfileListWidget is not used anymore for a long time. 2011-08-10 05:27:27 +08:00
Montel Laurent
b91f50015d Normalize signals/slots 2011-07-30 14:10:56 +02:00
Kurt Hindenburg
f3c529af6d Only enable the tab popup menu 'Detach Tab' for > 1 tabs.
Currently you can Detach Tab if that tab is the only one;  that
makes no sense and has no use.
2011-07-09 22:30:29 -04:00
Kurt Hindenburg
e8145abc84 Allow all the tab widths to be the exact title length.
This toggles between the current calculations of the tab width and just
using the full title for the tab width.
This is a dbus method which will have to do unless I can get a GUI
in before the freeze.
2011-04-23 21:18:52 -04:00
Kurt Hindenburg
467fb1edcb Restore 'Close Tab' on the tab context menu and the close tabbar button.
These 2 options were disabled due to they messed up the menu texts
after the fix for bko 185466.
The close method via dbus has been disabled as it causes menu issues.

Most of patch to fix 'Close Tab' by Albert Astals Cid aacid@kde.org
BUG: 267896
CCBUG: 185466
FIXED-IN: 4.6.3
2011-04-05 11:39:48 -04:00
Kurt Hindenburg
dd9b08331f Fix a krazy issue with double-quotes. 2011-04-03 22:54:44 -04:00
Kurt Hindenburg
1d657aed8f Replace & with && for tab title.
If the tab title has & it will replace it by the shortcut symbol (_).

BUG: 267851
FIXED-IN: 4.6.2
2011-03-07 00:10:40 -05:00
Kurt Hindenburg
8641ba4268 Move the 3 Search Bar options into their own popup menu.
Opening the search bar causes the terminal width to be increased due
to the length of the three Search Bar options text.
Ideally, this should be redone using .ui file (consider looking at the
KHTMLFindBar code in kdelibs).  The Search Bar in general needs some
rework.

BUG: 211550
FIXED-IN: 4.7
2011-03-03 12:31:09 -05:00
Kurt Hindenburg
b59a51f2c9 Disable tab close methods until the issue of menu being trashed can be resolved.
CCBUG: 185466

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1217498
2011-01-27 15:26:13 +00:00
Kurt Hindenburg
6441f929a5 Recommit patch as this wasn't causing the crashes.
BUG: 240037

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1198147
2010-11-17 15:33:09 +00:00
Kurt Hindenburg
1236ba56d4 Remove previous commit as it cause a lot of crashes for apps using
Konsole Part.

CCBUG: 240037

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1194920
2010-11-10 05:19:30 +00:00
Kurt Hindenburg
f834ba132d When closing a tab, select the previously focused tab.
BUG: 240037
FIXED-IN: 4.6

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1186295
2010-10-15 17:42:49 +00:00
Kurt Hindenburg
4a4866c2ca Add tooltips for tab titles
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1186266
2010-10-15 15:23:44 +00:00
Kurt Hindenburg
49fd3291a7 Use stylesheet min/max width to handle tab width
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1172362
2010-09-07 04:17:12 +00:00
André Wöbbeking
81efd8621d forwardport r1147150
don't use deprecated signals

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1154986
2010-07-26 16:35:51 +00:00
Shaun Reich
1fbc3ae54d improve konsole tab dragging. makes the dragging smooth and not jumpy. also increased size of the drop indicator from 22 to 32 (see review 4180)
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1143454
2010-06-27 20:23:44 +00:00
Kurt Hindenburg
9292af91fd Add 'Detach Tab' to the tab context menu.
Original patch by Shlomi Fish.  I did some hacking on it.

BUG: 153376

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1118851
2010-04-26 02:10:05 +00:00
Kurt Hindenburg
cd3b4ed255 remove debugs
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1115902
2010-04-17 21:57:14 +00:00
Kurt Hindenburg
ca61bd99bc Change the way the tab widths are calcuated and their text to allow better space usage.
Patches/comments to make this better welcomed. I wanted something committed for KDE 4.5.

CCBUG: 157201

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1115895
2010-04-17 21:38:14 +00:00
Kurt Hindenburg
4c440f9de2 Implement 'Rename Tab...' and 'Close Tab' in tab context menu.
Original patch by Shlomi Fish.  I did some hacking on it and removed 'Detach Tab' option for this commit.

CCBUG: 153376

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1115877
2010-04-17 19:52:51 +00:00
Kurt Hindenburg
4481b0c58d exclude krazy's qclasses check
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1108137
2010-03-27 22:29:51 +00:00
Sascha Peilicke
2f3875f7c5 Removed unused class ListViewContainer from src/ViewContainer.[h|cpp].
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1098792
2010-03-04 10:43:51 +00:00
Sascha Peilicke
bb21ce680a Removed Konsole TabBar spacer item (review request 2883).
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1095490
2010-02-24 12:19:56 +00:00
Sascha Peilicke
b1e7c39d43 Replaced deprecated calls to QLayout::setMargin and replaced it with QLayout::setContentsMargins for several Konsole classes.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1088845
2010-02-11 19:25:45 +00:00
Kurt Hindenburg
68297a2165 Correct terminal focus issues when clicking on tabbar.
BUG: 215382
CCBUG: 157039

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1059061
2009-12-05 17:50:07 +00:00
Kurt Hindenburg
d1469fb39e Fix minor api issue and an used variable warning.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1059042
2009-12-05 16:21:36 +00:00
Kurt Hindenburg
45c1fbaf48 Fix issue where Shift+Tab would focus tab bar.
BUG: 157039

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1037396
2009-10-18 22:16:31 +00:00
Sascha Peilicke
a90c365a3c Changed the corner widgets of the Tabbar to use QToolButton instead of KPushButton. They use less space now and are more visually pleasant. A result of this change is the immediate visibility of the new-tab button's menu, it is now clear that it holds extra functionality. Finally the Konsole tabbar now looks the same as Konqueror's
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=951179
2009-04-08 15:37:27 +00:00
Eike Hein
9f5d7da6e9 Fix layout regression from r860035 that breaks up e.g.
Yakuake's UI by adding a margin around the terminal.

Robert, please seriously consider backporting this to 4.2.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=935623
2009-03-05 20:03:39 +00:00
Fredrik Höglund
7930b1930d Enable documentMode in the tab bar.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=929640
2009-02-21 19:02:03 +00:00
Alexis Ménard
fed1626302 Fix the crash in Konsole with Qt 4.5.
The problem is that ViewContainer is a QObject and is not aware that one of its QWidget member can die because the ViewContainer is not part of the "GUI" hierarchy. So when you delete the main window it will first delete all QWidgets and then all QObjects, so in our case all GUI objects and then ViewContainer. But since ViewContainer react to destroyed signal of some GUI object and use it that explain the crash. Having QPointer is the easy to way to be aware if one of the member die because the GUI has been deleted.

BUG:170052
BUG:179845

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=907272
2009-01-07 19:25:32 +00:00
Thiago Macieira
156c585181 The containerWidget is used by ViewSplit, which calls addWidget, which in turn sets the parent. So don't delete it if it has already been deleted.
If we are sure that the containerWidget will be parented, we can avoid the QPointer

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=869659
2008-10-09 16:44:11 +00:00
Frederik Schwarzer
ebbdfe6968 let me introduce: typo of the year "the the"
mostly seen as
"the the" -> "the"
"the the" -> "to the"
and in its best case
"a the the" -> "" :)

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864814
2008-09-25 15:05:22 +00:00
Robert Knight
956277c014 Convert tabs to 4 spaces to match kdelibs conventions. Previously
there was a mix of tabs and spaces for indentation.

CCMAIL:Stefan.Becker@nokia.com


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863326
2008-09-21 20:06:58 +00:00
Aaron J. Seigo
569235573d put the search bar on the correct side of the tabs .. INSIDE them ...
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=860035
2008-09-11 20:03:03 +00:00
Robert Knight
edcc8bc97b Fix "Show 'New Tab' and 'Close Tab' buttons on tab bar" setting not being
applied correctly on startup.

Test for the tab bar being explicitly hidden with isHidden() rather than just
isVisible() which will return true if the setting is applied before the 
container widget is shown.

BUG: 162420
CCBUG: 157015


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=810949
2008-05-21 22:19:43 +00:00
Robert Knight
730281a5c8 Remove close buttons on individual tabs and replace with a single close button on the
right of the tab bar when the "Show 'New Tab' and 'Close Tab' buttons on tab bar" option
is enabled - which brings tab management back to the way it was in KDE 3.    

Several users (esp. those working with laptop trackpads) were having problems with
accidentally closing tabs.  It seems KTabBar's close buttons need some refinements before
they can be used in the terminal.

CCMAIL: wstephenson@kde.org


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=809838
2008-05-19 16:19:05 +00:00
Robert Knight
34a9e7ec42 * Add option to show new tab button with delayed popup menu on tab bar.
Go to Settings -> Edit Current Profile -> Tabs page and tick "Show 'New tab' button in tab bar"

  This was added for the benefit of users with existing habits from KDE 3 and is not
  shown by default.

* Add close buttons on tabs using the new style ppenz added to KTabBar
* Add confirmation when closing via middle-click/close button if a program other than a shell or
  nested shell is running in the foreground of that session.

BUG: 157015

Squashed commit of the following:

commit 54a5db9c31a5527e44d7358b30587c28bab965bc
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:48:05 2008 +0100

    UI text correction: 'on tab bar' -> 'in tab bar'

commit ed8e70238e2cc4240f8334cd091fa2707785a908
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:46:42 2008 +0100

    Do not show the confirm-on-close prompt if the foreground program is another shell.

commit 010370c12950a532d93c99d0983c74c47e26ad07
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:40:05 2008 +0100

    Add a confirmation which is displayed when closing a tab via middle-click / close button if the program has an active program running in the session (other than the shell itself).

commit 49812e26e5fd8c44dd01f1a6a4c0e7271c6366fd
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:25:29 2008 +0100

    Add confirmClose() method to ViewProperties which is can be re-implemented to prompt whether to close the session.  Make the presence of the close button in the ViewContainer dependent on a QuickCloseView feature being enabled.

commit ece191ad5ad550af47cd2ca0bc75a517119e7189
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:09:17 2008 +0100

    Show 'close' button on tabs using the new close button style added to KTabBar by ppenz.

commit f975f04c993effdd2afef588c5f765192b6fab5a
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri May 2 01:03:54 2008 +0100

    Better UI text for 'Show New Tab' option.

commit 642c5b1d07cd2288c78446efe395da050730decb
Author: Robert Knight <robertknight@gmail.com>
Date:   Thu May 1 21:04:47 2008 +0100

    Sync 'new tab' tab bar menu actions with profile list.

commit c6c556980e43afcb1bb5fdfaaa9dd7e12e524688
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 23:01:34 2008 +0100

    Hook up actions in new tab popup menu so a new tab is created with the right profile when an action is chosen.

commit dece8a23ff101dda47d495ba38e57e55059c4e63
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 22:51:28 2008 +0100

    Apply ShowNewTabButton profile property to current view container.

commit e244a95512dc535198fa69c3afe34b597402de15
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 22:50:57 2008 +0100

    Add support for enabling/disabling a 'quick new view' widget in view containers.  Add an implementation of it (quick new tab button) in TabbedViewContainerV2

commit 9fdc2e450aefb9b602f8fb6b66d3508e6750531b
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 22:50:22 2008 +0100

    Hook up 'Show new tab button' UI option.

commit 7326e6dccbc095f0f784fd6f4da532f250ca5437
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 22:50:04 2008 +0100

    Add ShowNewTabButton profile property and set a default for it (false)

commit 273f85f0d21d8b755712c67c50a939400f15a169
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 21:22:09 2008 +0100

    Add checkbox for toggling new tab menu button.

commit 200744ce620cd6bd9a9d1791e62863c618921788
Author: Robert Knight <robertknight@gmail.com>
Date:   Wed Apr 30 21:21:33 2008 +0100

    Formatting. Remove extra lines.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=803112
2008-05-02 00:59:47 +00:00
Robert Knight
c5bfff3db3 Fix flicker when dropping a tab onto itself. Return after ignoring the drop event.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=803111
2008-05-02 00:59:34 +00:00
Robert Knight
dbe4605110 Draw drop indicator icon disabled if the source and destination locations are the same. Fix rect arguments to border painter calls.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=801164
2008-04-25 20:20:17 +00:00
Robert Knight
aecc847c66 Draw a thin border around the pixmap of tabs used for drag-and-drop so they can be seen more clearly against window backgrounds.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=801163
2008-04-25 20:20:12 +00:00
Robert Knight
ca7c39ffb7 Check drag source when considering whether a drag-and-drop event can be accepted.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800632
2008-04-24 14:53:49 +00:00
Robert Knight
5d9997446e Update copyright year to 2008. Remove '(C)' from copyright lines.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800631
2008-04-24 14:53:43 +00:00
Robert Knight
971a5315f9 Remove debugging messages.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800628
2008-04-24 14:52:39 +00:00
Constantin Berzan
7c0e11f649 Re-add ability to open a new tab by double-clicking the tab bar.
I don't know why this was removed; please tell me if I'm interfering.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=799364
2008-04-21 11:13:57 +00:00
Robert Knight
c407950161 Pick the closest drop position instead of just the one to the left of the current tab when dragging and dropping tabs.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=797293
2008-04-15 10:56:40 +00:00
Robert Knight
e9fe2b1b11 Support drag-and-drop of tabs between windows and containers, with drop indicator
arrow and 'torn-off' tab while moving.

(Drag and drop between windows is supported only for windows within the same process,
which will be all windows opened from a GUI)

Some of this functionality could be moved to kdelibs / KTabBar for the benefit of other
applications.

BUG: 75653

Squashed commit of the following:

commit 1e5b628b74f4c7182b1aed159088f0d449bf6f1f
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:32:04 2008 +0100

    Set drop indicator label to same size as pixmap.

commit 59ad9200465cfb76651ce81abd3ba20e2fdd3067
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:14:41 2008 +0100

    Adjust drop indicator for north and south tabs.

commit 01ba5bca9457bc19156f5a87ad6967fac7cc3c1e
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:06:52 2008 +0100

    Display a drop indicator arrow at the position where the tab will be dropped.

commit 137ade01d70d75d26f3c14624ec2c096c8c50eba
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 10:01:28 2008 +0100

    Update detach view action state when moving tabs between windows.

commit 412c2d16844afda3f0427a5583d653c2214722fb
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 09:56:37 2008 +0100

    Move mimetype definition to ViewProperties

commit dc31499351ef564cfe75c25124c3549b5dc75e16
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 02:26:03 2008 +0100

    Hack around crash which can occur after a drag-and-drop tab move causes a view container to be destroyed, taking the QDrag object with it.  Fix this by setting the QDrag's parent object to 0 before calling removeView().  This leaks the QDrag however.

commit df057fd06988bcd2b4c0f21e1d746543e7cfe1c5
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 02:24:21 2008 +0100

    Fix jumps based on uninitialized variables.

commit 864bfcc2e8c63e2c8a9b6e9c96bc4d90d3dacd7e
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 00:20:12 2008 +0100

    Make the initiator of the tab drag event remove the view.  Change newViewRequest() -> moveViewRequest().  Do not delete the view if the tab is dropped onto another application which blindly accepts it.

commit b922858420d4b61ad2727c64bc885042280d65f4
Author: Robert Knight <robertknight@gmail.com>
Date:   Mon Apr 14 23:29:18 2008 +0100

    Add support for drag-and-drop moving of tabs between any two tab bars in the same process.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=797287
2008-04-15 10:37:55 +00:00