Commit Graph

524 Commits

Author SHA1 Message Date
Siarzhuk Zharski
d79b659e26 Terminal:Fix printing and windows settings path.
* Fixes #7986 - behavior of Print command fixed to be consistent
  with other application, like StyledEdit. This change
  display the print job settings dialog instead of "Printing
  was cancelled" alert;
* Fixes #6998 - the path to storing windows settings changed from
  ~/config/settings/Terminal_windows to ~/c/s/Terminal/Windows;

  This patch was created during GCI 2011 by doctorkohaku.
  Thanks for the contribution!
2011-12-03 20:00:39 +01:00
Siarzhuk Zharski
f37821851e Refactoring of 8-bit encodings support.
* Fixed issue introduced in hrev38139: restoring from the line
  drawing table was hard-coded to UTF8 Ground table. That is wrong:
  the table for currently configured encoding must be set back.
  Please look on using of _GuessGroundTable() for details;

* Fixed issue introduced in hrev34894: the semantic of convert_xx_utf8
  functions requires the destination length to be set equal to the
  target buffer size. Pre-hrev34894 usage of "homebrew" conversion
  functions was a bit different - destination length was set to 0.
  This made any converstions of input data useless and produce no
  visual results;

* Private list of supported encodings (Encoding.cpp) was replaced by
  using BPrivate::BCharacterSetRoster functionality. That allows to
  use centralized info about encodings in unified with other
  applications (Mail & StyledEdit for example) way. Most of currently
  enumerated in UTF8.h encodings now available in Terminal.
  Note that UCS-2 and UTF-16 are temporary (???) excluded from the
  list of encodings supported by Terminal.

* The B_UTF16_CONVERSION was added in system-wide UTF8.h declarations.
  This character set is available for enumerating by BCharacterSetRoster
  but not listed in public API. Looks like it was just missed;

* Special note about "Text Encoding" entry in Preference File:
  So known "shortname" of encoding was used in the preferences file.
  For details look on the encodings list in previous version of
  Encoding.cpp. As result of migrating to BCharacterSet-provided
  resources this list was deleted and is not available anymore.
  Instead of it the IANA name of the character encoding targeted
  to be used for this purposes. Frankly speaking this part looks
  like not working at the moment. The value of text encoding is
  hardcoded to "UTF-8" now and is not affected by any operations
  in Terminal menu. Note that "shortname" for default encoding
  was "UTF8" but the saved value is "UTF-8" - and they are looking
  not dependent at all. So this change should not introduce any
  kind of backward incompatibility.
2011-11-13 13:17:38 +01:00
Joachim Seemer
9a39723ca5 Applied patch by Disreali, adding colour scheme green on black. Fixes #7977. Thanks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 22:42:52 +00:00
Axel Dörfler
7781d9ad28 * Applied patch by 'mt' that fixes ticket #6275 - thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 16:48:16 +00:00
Ingo Weinhold
24df65921b Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
  handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
  support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
  of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
  [set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-12 00:00:23 +00:00
Jonas Sundström
fdd2b7ebb1 Removal of the About window.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-27 21:59:49 +00:00
Jonas Sundström
560ff4478d Use resource definition files instead of DoCatalogs rule. Rename B_TRANSLATE_APP_NAME and related macros to the more generic B_TRANSLATE_SYSTEM_NAME, to also fits add-ons, folders, etc, and make 'System name' its standard context. Change CodyCam and PoorMan's app signatures to match the overall x-vnd.Haiku-App pattern. Some clean-up. Make SlideShowSaver build again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-25 22:13:48 +00:00
Jonas Sundström
71302e7c6d Further localization. Making use of B_TRANSLATE_APP_NAME, AboutWindow. Cleanups. Please review/test changes in Terminal.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-16 18:48:41 +00:00
Jérôme Duval
0961433d2a Patch from diver (bug #7329) with cleanup by myself: remove excessive localization
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-06 09:33:39 +00:00
Alexander von Gluck IV
f02c85adba Fix non-static, non-initialized member fProcessID CID 9946; Remove non-used fLockFlag, set un-initilized fSavedAttr member, CID 9945; fixed a few extra spaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-01 18:42:18 +00:00
Alexander von Gluck IV
1c9368988e remove a double free of fOurInfo. CID 10563
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-01 18:00:28 +00:00
Jonas Sundström
27f365eaa3 Small fix. Helps when doing a Close All from Deskbar and the Terminals all flatten/unflatten all over each other.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-21 04:02:50 +00:00
Philippe Houdoin
99aaa8c1fd Fix a typo spotted by Karvjorm. Thanks.
This close #6971.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 20:36:16 +00:00
Philippe Houdoin
c2a14a1a85 Can't use static const PREF_*_COLOR keys for translation.
Revert to literals for color menu items which needs, them, being localized.
Add missing source files to DoCatalogs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-06 19:22:49 +00:00
Philippe Houdoin
d70708127f Localize some forgotten strings spotted by diver.
Fix #6375.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-06 18:18:56 +00:00
Philippe Houdoin
8417651ec7 Actually remove these unnecessary lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-01 11:05:06 +00:00
Philippe Houdoin
b90b61272e Fixed scrollbars & window resize knob layout issue:
- active view at fullscreen enter and exit was not necessary the same one!
- all view's scrollbars are now resized at fullscreen switch
- new tab's scrollbar was sized for window mode, even when added while in
  fullscreen mode...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-01 10:51:21 +00:00
Adrien Destugues
150b717e5b Fix crash in terminal : GetLinecolor was accessing lines with negative offsets.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-30 20:09:43 +00:00
Adrien Destugues
4d41072817 Remove useless comment. Thanks Ingo for watching out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-28 17:38:19 +00:00
Adrien Destugues
627ced128b Use a better way to store the attributes for end of line. This should also fix some other bugs, as there were occasionalaccess to out-of-range chars.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-28 16:51:25 +00:00
Ingo Weinhold
c059c8c5d0 MessageReceived(): Override B_MOUSE_WHEEL_CHANGED when in alternative screen
mode and send the key/page up/down escape sequences instead of trying to
scroll. Makes mouse wheel scrolling in less, nano,... working. Closes #6460.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 17:49:40 +00:00
Ingo Weinhold
fa8c3f1065 Added IsAlternateScreenActive().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 17:45:55 +00:00
Ingo Weinhold
e9e3be37f9 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 17:06:57 +00:00
Adrien Destugues
a753859956 * Insert an extra space when doing a CR. This ensures the latest attribute setup gets inserted somehow in the line before we go elsewhere.
This gets 256colors.pl to give the right output, as well as useable vim in TERM=xterm-color mode (as far as I can tell).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 20:12:16 +00:00
Adrien Destugues
384fe02234 * Use the attributes from the parser instead of trying to guess blindly when inserting a tab. This avoids strange things hapenning when a tab is inserted at the start of a line.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 19:21:56 +00:00
Ingo Weinhold
ca598670fb * Removed the shell process ID from ActiveProcessInfo and moved it to new class
ShellInfo, which also contains a flag whether the shell is the default shell.
* If the Terminal has been started with a custom shell, also replace "%p" in
  the title by its name, when active.
* Also show the on-close alert for the custom shell.

Fixes #6844.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 15:30:26 +00:00
Ingo Weinhold
65b57677b5 TermWindow::TermWindow(): Update the TerminalRoster's window info.
Fixes #6880.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 13:29:21 +00:00
Ingo Weinhold
36cdd7a292 Corrected the alert text for the case that multiple processes are still active.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 11:17:35 +00:00
Ingo Weinhold
53c32667f7 TermWindow::_CanClose(): Collect the names of the running processes and display
them in the alert. Fixes #6862.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 21:00:10 +00:00
Ingo Weinhold
dd2cdb3a75 Set B_ESCAPE as shortcut for all BAlerts. Fixes #6850 and #6858.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 19:52:16 +00:00
Ingo Weinhold
105093fddb * Added new class TerminalRoster, which maintains a list of all running
terminals, including their window minimized status and workspaces. These
  information are shared via our special-purpose clipboard. TerminalRoster
  mainly acts as a cache.
* Removed the terminal ID management from TermApp. Most is now done by
  TerminalRoster, the rest has been moved to TermWindow.
* Moved the terminal position file reading/writing from TermApp to TermWindow.
* Moved the remaining terminal window title handling from TermApp to TermWindow.
* Replaced the solution for #6613 implemented in r39530 (enabling/disabling the
  "Switch Terminals" menu item depending on whether there are other Terminals).
  The new solution is more correct, since it does enable the menu item, if and
  only if switching to another Terminal will happen when triggering it. I.e.
  minimized Terminals and ones on other workspaces are ignored.

Should also fix #6612, since there's no synchronous communication between
different terminal apps anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 19:31:19 +00:00
Ingo Weinhold
441d3509c9 Removed debug leftover.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 18:35:32 +00:00
Ingo Weinhold
b216f4070e Enable/disable the "Switch Terminals" menu item depending on whether there are
other Terminals. Fixes #6613.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 23:51:16 +00:00
Ingo Weinhold
45a4344050 MessageReceived(): More descriptive variable name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 23:49:46 +00:00
Ingo Weinhold
2e394a4764 As suggested by Humdinger, replace "%p" by "--", if the shell is the active
process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 22:27:46 +00:00
Ingo Weinhold
47dbffcd1e Added a "Close other tabs" item to the tab menu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 15:30:09 +00:00
Ingo Weinhold
ad617d3320 * Moved some locally used message constants from TermConst.h to TermWindow.cpp.
* Added an "Edit tab title..." item to the tab menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 15:24:33 +00:00
Ingo Weinhold
486cd82188 Added a menu item that opens a dialog for editing the window title.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 15:08:05 +00:00
Ingo Weinhold
19838430ab Superfluous parentheses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 14:42:50 +00:00
Ingo Weinhold
1ded93a4b9 Use the new menu layout builder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 14:30:42 +00:00
Ingo Weinhold
8a6bf08d49 Renamed menu related member variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 12:30:21 +00:00
Ingo Weinhold
0f7255f763 Renamed fHelpmenu to fSettingsMenu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 12:26:00 +00:00
Ingo Weinhold
5feeb23410 A failing FindInt32() still modifies the result variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 12:20:41 +00:00
Ingo Weinhold
54197c6163 Don't send TermView pointers around in messages. When the message is processed
the pointer might already be invalid. Use SessionID instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 12:11:58 +00:00
Ingo Weinhold
713b2a7886 Added _SessionAt() helper method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 11:54:01 +00:00
Ingo Weinhold
135f173dce * Added SetTitleDialog, a dialog to edit a tab/window title.
* Use the dialog to open the tab title. Opened on double-click on the tab.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 11:49:23 +00:00
Ingo Weinhold
b647673227 Moved the reusable part of the tab/window title prefs tool tips to
TermConst.h/cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 11:42:47 +00:00
Ingo Weinhold
38d5ce6271 * Removed "move" parameter from the
TermView::Listener::{Previous,Next}TermView() methods. All B_COMMAND_KEY
  combos are intercepted by the window, so we never get them in the view.
* Added window shortcut Command-Shift-Left/Right to move the tabs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 01:08:21 +00:00
Ingo Weinhold
52474b49a3 Added MoveTab() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 01:06:02 +00:00
Ingo Weinhold
92b0038ec0 Added a listener interface to TermView. This allowed to get rid of
CustomTermView and of the messaging from view to window. It also simplified
things in TermWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-18 17:16:56 +00:00