Commit Graph

45180 Commits

Author SHA1 Message Date
John Scipione
ab21cedcce Remove docs and refactor style of TextView class.
* Make pointer style consistent, const char* name instead of const char *name.
* Lots of parameter renaming.
* in parameters don't get anything special, just font, or length instead of
  inFont, inLength.
* out parameters get a leading _ so *outWidth becomes *_width for example.
* We don't detail private function in the Haiku book and this class has a bunch
  so keep the documentation in the file but use regular comments instead.
* Normalize the parameter names between cpp file and header.
* Some minor whitespace fixes.

No functional change intended.
2013-03-16 17:05:09 -04:00
John Scipione
ca9a59bbc5 add a newline 2013-03-16 17:04:44 -04:00
John Scipione
163a2afd4f Use the single parameter version of SetInsets()
While I'm at it, I can reduce the LayoutBuilder indent by 1.
2013-03-16 16:11:12 -04:00
John Scipione
c0778509d2 Copy pasta error, double checked this time 2013-03-16 11:55:27 -04:00
John Scipione
4c45b1d99e Perform settings checking again partially reverting 43917ef.
Also storedSettings to prefs as it is shorter, easier to read the code.
2013-03-16 11:30:42 -04:00
John Scipione
e1c882014b Update screen prefs layout. Fixes #8817
* Center monitor info and Workspaces label.
* Use font-relative spacing.
* Update the header including copyright year, sort contributors by name and add
  myself as well.
2013-03-16 10:15:30 -04:00
John Scipione
4307b2e057 Diskprobe open window layout fixes 2013-03-16 08:59:28 -04:00
John Scipione
d3a0b2dccf Deskbar prefs i18n updates. Fixes #8562
* AddGlue() to the Menu box to make it expand with wider translations.
* Order checkboxes vertically to better accomidate wider translations.
2013-03-16 08:12:50 -04:00
Niels Sascha Reedijk
cadffca7e5 Update translations from Pootle 2013-03-16 06:22:01 +01:00
John Scipione
fe9f33d1c2 Reorder Default and Revert buttons in Appearance.
To match at least a couple other preflets that have Default and Revert buttons
such as Locale, CPU Frequency, Tracker, and Mouse.
2013-03-15 21:55:53 -04:00
John Scipione
5bfc9c7091 Save and load prefs window position to and from a file. 2013-03-15 21:44:59 -04:00
John Scipione
f49eecb564 Use horizontal strut instead of insets 2013-03-15 21:35:02 -04:00
John Scipione
a3f512d524 Rename Recent items back to Menu and tweak to make fit.
* Put the Open in Tracker... button back in Menu.
* Put the window checkboxes in 2 columns.
* Use vertical struts instead of insets for spacing in a couple places.
2013-03-15 21:35:01 -04:00
John Scipione
a601c3f172 Add 'Open menu in Tracker' button at bottom 2013-03-15 21:35:00 -04:00
John Scipione
633232da4c Reorder buttons.
Defaults then Revert both on left like Tracker and Locale and other preflets.
2013-03-15 21:34:59 -04:00
John Scipione
43917ef2e0 Refactor settings so that defaults get set in 1 place.
* Move desk_settings and clock_settings struct to a new header entitled
  'BarSettings.h' so it can be included in BarApp.h and PreferencesWindow.h.
* Refactor desk_settings to only include used, or at least relevant settings,
  some cruft had built up over time.
* Refactor the InitSettings() method, all the B_OK checking wasn't working so
  I removed it. Defaults get set up to and if the corresponding setting is
  found in the settings file it is replaced, else, it is not.
* Reorder the struct and code so it goes in the order that the settings appear:
  applications, then recent items, then window settings.
* Simplify the preferences window revert and defaults code based on using the
  prebuild desk_settings structs in BarApp instead of creating our own and
  copying. All initial setup is in the constructor.
2013-03-15 21:34:58 -04:00
John Scipione
cb42238603 Destroy prefs window on close once again 2013-03-15 21:34:57 -04:00
John Scipione
1ec3d37252 Rename 'Sort running applications' to 'Sort applications by name' 2013-03-15 21:34:56 -04:00
John Scipione
cb0602cf81 Implement Revert and Default buttons in Deskbar prefs 2013-03-15 21:34:36 -04:00
John Scipione
93a58e5028 Reformat Deskbar prefs all in one with no tabs 2013-03-15 21:33:59 -04:00
Ziusudra
41130d1c52 Terminal: Fixed small code duplication
SetTermSize(BRect) already contains all the code calling SetTermSize(int, int).
Partially fixes #9293.
2013-03-15 15:15:43 +00:00
Ziusudra
9f726b367b Terminal:Add ACS symbols supported by xterm-256color
More ACS (also known line drawing) symbols should be supported by
xterm-256color terminal emulator.
Partially fixes #9293.
2013-03-15 15:15:19 +00:00
Fredrik Holmqvist
39a81e5ac6 The optimised aligned version was broken and not used.
As pointed out by Hamish the alignment used && in second case
instead of &, which meant it was never used.

Another error when a32 was 0xFF000000 and b32 was 0xFF00FFFF
would return a non zero value. A simple fix for the issues
with going over to the byte by byte comparison failed, so
rather than leave broken code I remove this for the time being.

Not the best code I've written obviously.
2013-03-15 11:49:13 +01:00
François Revol
3881911cce Add the !DOCTYPE element to the text/html sniff rule 2013-03-15 00:55:38 +01:00
Siarzhuk Zharski
5b41331f11 CodeStyle fixes, some refactoring and cleanup
* Clear some codestyle issues catched by checker script;
* Rename RestartDebugCapture to more consistent StartStopDebugCapture;
* Updated Copyrights and authors lists, some occurences of the raw MIT
  licence text replaced with "under the terms of MIT licence" reference;
* Fixes for x86_64 build.

This is cumulative cleanup commit for series of Terminal refactoring
changes I have introduced last time. No significant functional changes.
2013-03-14 07:44:52 +00:00
Siarzhuk Zharski
fe25686978 Move colors table from TermView to TerminalBuffer
* ColorsTable moved to TerminalBuffer to let easy lookup of table
  during parsing of control sequences;
* Default Palette initialized from now in TermApp and preserved
  from modifying by applications;
2013-03-14 07:44:50 +00:00
Siarzhuk Zharski
bbfd23abd5 Use native bold style drawing (+ switchable emulation)
Use native bold font for rendering characters with corresponding
attribute set. Possibility for switching to R5-like bold characters
emulation is also implemented. This one uses uses the left-down shadow
in B_OP_BLEND drawing mode instead of the rigth-down one as previously.
2013-03-14 07:44:48 +00:00
Siarzhuk Zharski
6d30b376e9 Support for underline and ibeam terminal cursor styles
* Add support for underline and i-beam cursor shapes. No corresponding
  UI configuration in preferences view ATM because preferences are waiting
  for refactoring and we need some eggs for this Easters. ;-)
* Add handling of VT520/xterm specific DECSCUSR control sequences
  allowing applications to modify the style and blinking state of the
  cursor. May be utilized, for example, by console version of vim;
* Implement cursor blinking/hiding on DECSET/DECRST commands.
2013-03-14 07:44:47 +00:00
Siarzhuk Zharski
b0b7933ee7 Use stack for storing saved cursor positions
That fixes issue with latest versions of Midnight Commander - it
"restores" on exit the latest postion was set, that is equal to 0.0.
2013-03-14 07:44:45 +00:00
Siarzhuk Zharski
73d0eee58c Handle char attribute "holes" in Terminal History lines
Previous implementation doesn't care about characters that are not
covered by attributes run length array elements - so the attributes of
the next run array element was taken instead of default one on the
HistoryBuffer::GetTerminalLine() call. Note that this was the case of
"holes" in run array but not the characters after the end of run array
elements.
2013-03-14 07:44:44 +00:00
Siarzhuk Zharski
b512213be6 Support Background Color Erase, switch to xterm-256color
* Lot of fixes to add support of BCE (background color erase). Shell
  is switched to emulate xterm-256colors terminal, that is modern and
  declare the colors capabilities of our Terminal more precisely;
* Move current character attributes fAttr from TermView to
  BasicTerminalBuffer. This reduces count of function parameters on call
  various InsertXXX routines;
* In alternative screen buffer mode the whole cells "matrix" of the
  screen buffers is taken into account during drawing background of the
  cells in the view. In normal mode the "attributes" field of the
  TerminalLine is used to detect color of the area after the last
  character - there should be no changes with previous behaviour;
* Fix attributes on kSpaceChar-padding short lines. Current _line_
  attributes should be used instead of current _global_ attributes;
* Fixed pads and gaps attributes, more accurate handling of ESC[K and K°;
* _Invalidate strings just erased. Fix EraseChars DCH processing;
* Fixes for ESC[J erase lines control sequences;
* Added handling SGR 90-97, 100-107 codes;
* Clean the newly allocated TerminalLine lines;
* More precise cursor background [off-]color estimation at ends of
  lines. The current line attributes should be used instead of
  hard-coding it to fTextBackground;
* Fixed background color erase in normal screen buffer modes. Wrong
  line indexes calculation messed the drawing results or just returned
  0 [default] line attributes;
* Some more BCE support: TerminalLine::Clear() now honors current
  character attributes;
* Fixes #6143, #6510 and #6424.
2013-03-14 07:44:42 +00:00
Siarzhuk Zharski
718a28cead Add Debug snapshots and capture of Terminal data flow
Two helper functions introduced: "make debug snapshots" triggered by
Ctrl-Cmd-S shortcut and "capture data flow" triggered by Ctrl-Cmd-C
shortcut. The first one makes debug dump of current data both in visual
and in text buffer, including history lines if they available. The second
one mirrors all characters and control sequences that are flowing
through the Parser. Both dump and capture files are saved under /var/log
folder. That functionality available only if the USE_DEBUG_SNAPSHOTS switch is
defined.
2013-03-14 07:44:41 +00:00
Siarzhuk Zharski
238b435a8e Fix empty background coloring right/below of text lines 2013-03-14 07:44:39 +00:00
Siarzhuk Zharski
b9b805689e Revert hrev38316 fore-/background colors customization
This reverts hrev38316 in parts of foreground and background colors
handling. Mentioned revision has hardcoded colors to system ANSI color
entries 7 and 0 correspondently. It is very uncomfortable for the
console programs like Midnight Commander because they become
colors that were defined in the current Terminal scheme and doesn't
correspond to real ANSI color names. For example "ANSI black" can be
black, white, blue, gray or something else in dependency of the current
color scheme configuration. The same side-effect was obviously observed
for "ANSI white" and produced funny color combinations in software.
2013-03-14 07:44:38 +00:00
Siarzhuk Zharski
68ea9ce5bb OSC and color management improoved
* Global kTermColorTable replaced with it's private copy for every
  TermView instance. This allows to modify colors table for every view
  separately;
* Set of ANSI normal/bright color entries added into preferences;
* Default color table generated dynamicaly using ANSI colors
  preferences. 6x6x6 color cubes and grayscale ramp are generated in
  xterm colors model;
* Improoved support of Operating System Command control sequences;
* Support for X11 rgb.txt compatible color names. Corresponding entries
  are stored in hashed form in application resource and loaded only on
  demand.
2013-03-14 07:44:36 +00:00
Siarzhuk Zharski
02f3baa09d Cleanup:Remove unused pref entries and fix typo
* PREF_SHELL is not used anymore, corresponding entry in /etc/passwd
  should be used instead;
* PREF_GUI_LANGUAGE is not actual anymore - we have system-wide
  UI localization support;
* Fix typo in the name of MSG_SET_TERMNAL_TITLE constant.
2013-03-14 07:44:35 +00:00
Siarzhuk Zharski
f9443b14d5 Reverting hrev45143:bold characters visual regression
Terminal is GUI application and there are no need to emulate bold
in some kind of color adjustments, especially in case the proposed
emulation look is too far away from results observed on similar software
like xterm, Konsole and XFCE Terminal.
2013-03-14 07:44:33 +00:00
Siarzhuk Zharski
fb8041a277 Termcap.src updated to one shipped with ncurses 5.9
New version of termcap.src was generated using the "master" terminfo.src
database taken from the ncurses 5.9 package. This database is looking
like only one up-to-date I have found. This update is pre-requisite for
lot of Terminal BCE refactoring changes that follow soon;
File was generated using "tic -CrtT" command and was fixed for unpaired
:fs= and :sp= entries to satisfy ncurses' sanity check.
2013-03-14 07:44:32 +00:00
Alexander von Gluck IV
04b5e12f72 Network Kit: Fix parallel build
* HttpAuthentication.cpp wasn't in ssl grist
  resulting in unmet dependencies. #9523
* md5.c only being used when ssl wasn't available
  was kind of spaghetti logic.  These changes make
  this more obvious.
2013-03-14 00:06:41 -05:00
Jerome Duval
187d12c437 usb_modeswitch: support for some new devices
* tested OK with the stick ZTE MF190
2013-03-13 19:15:21 +01:00
Matt Madia
d7e5acad3f Automatic whitespace cleanup. No functional change.
This push (ok, the previous changeset) fixes #9486.
2013-03-12 21:10:35 -04:00
Gediminas Jarulaitis
723f4b6a43 iso9660 fs driver bugfix + code refactoring
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-03-12 21:09:34 -04:00
Humdinger
21406bd896 Added optional package System-sounds.
Added the optional package for system sounds that
were collected for GCI 2012. Also added the demo
packges to the "contents" at the top of OptionalPackages.
2013-03-12 18:47:08 +01:00
Pawel Dziepak
c5a88cf7e6 nfs4: VFS uses signed offsets while NFS4 expects unsigned 2013-03-12 17:36:53 +01:00
Pawel Dziepak
1a0386d743 Fix #8661: fcntl(fd, F_GETLK, ...) violates POSIX
The standard states that F_GETLK should check whether given lock would be
blocked by another one and return description of the conflicting one (or
set l_type to F_UNLCK if there is no collision).

Current implementation of F_GETLK performs completely different actions, it
"Retrieves the first lock that has been set by the current team". Moreover,
if there are no locks (advisory_locking == NULL) an error is returned
instead of l_type set to F_UNLCK.
2013-03-12 17:35:54 +01:00
Pawel Dziepak
0b269c601f Fix #9487: GIFLoad array subscript below array bounds
Recently enabled variable range propagation enables GCC to among others analyze
whether array subscript is in a valid range. While being quite useful this
particular feature also happens to produce false positives. This is merely
a workaround to make compiler happy.

The actual reason why compiler is reporting false positive is that array is
indexed with a signed integer and it is not clear for compiler what value it may
have due to it being a member of the class and and external procedure being
invoked between its initialization and usage.
2013-03-12 00:56:43 +01:00
Humdinger
ea06a55228 Committed changed Pe and sourcecode icons. (#9518)
Changed icons by jstressman. Thanks!
2013-03-11 20:14:22 +01:00
Pawel Dziepak
89878bd670 Restore up-to-date HaikuImage
While merging nfs4 branch accidentally outdated version of HaikuImage was used
to resolve conflicts. This commit corrects that mistake.
2013-03-11 15:18:02 +01:00
Pawel Dziepak
8f5358e419 nfs4: Use B_PRI* instead of standard PRI* 2013-03-11 14:32:56 +01:00
Pawel Dziepak
25909fec0b nfs4: Fix compiler warning about optionsEnd being not initialized 2013-03-11 13:15:19 +01:00