Commit Graph

37783 Commits

Author SHA1 Message Date
Ingo Weinhold
09b19da8c2 Introduced enum DefaultDecorator::Component to refer to the components of the
default decorator and used it instead of Decorator::Region where appropriate
(GetComponentColors(), _GetBitmapForButton()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 22:42:21 +00:00
Ingo Weinhold
ad1100115a Don't use the border highlight colors for the tab frame.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 22:32:37 +00:00
Axel Dörfler
06d8bb6f83 * Coding style cleanup, added license. No functional change.
* Note that our tests currently don't work because overloading BTestShell
  doesn't seem to work (the overridden LoadDynamicSuites() is never called).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 21:04:56 +00:00
Axel Dörfler
fed22d2a04 * Fixed build; the width buffer test seems to be gone.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 21:00:56 +00:00
Axel Dörfler
742d83e3d2 * Fixed warning.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 21:00:25 +00:00
Axel Dörfler
876a4a3cae * Also call FitToBounds() when you disable stretching, and the image is
currently zoomed in. This closes #6857.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 20:50:09 +00:00
Ingo Weinhold
e3ab8648d1 * DefaultDecorator:
- Introduced a virtual GetComponentColors(), that returns an array with the
    current colors for the specified component.
  - Removed all rgb_color members. Replaced the ones that were actually
    constant by const (or static const) ones and made use of
    GetComponentColors() where the non-constant ones were used.
* SATDecorator:
  - Turned rgb_color members into constants and added an overriding version
    of GetComponentColors().
  - HighlightBorders(): Invalidate the tab, too, as we use the border
    colors for drawing the outer lines of the tab (was this intented?).
    Fixes artifacts when breaking apart titled windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 20:07:32 +00:00
Ingo Weinhold
2ee2a8ede4 In FFM mode always update the focus in MouseMoved() regardless of the state.
I broke that with r39608.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 16:41:22 +00:00
Philippe Houdoin
8d25a74c68 Send the open flag sequence only when enough time elapsed since prior
closing flag sequence. See RFC1662 §4.4.2, last paragraph.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 16:34:02 +00:00
Ingo Weinhold
7ca71ab6a2 * DefaultDecorator: Moved the button drawing from _DrawTab() to the new
virtual DrawButtons().
* SATDecorator: Override DrawButtons() instead of _DrawTab(), thus saving a
  good deal of code duplication.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 15:01:30 +00:00
Ingo Weinhold
638d9c8039 * Coding style cleanup.
* Made inline getters in SATDecorator const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 14:42:28 +00:00
Ingo Weinhold
e29729e2a5 Removed first of two consecutive assignments to fNonFocusFrameColors[1].
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 14:37:17 +00:00
DarkWyrm
884384ff79 Sending B_COUNT_PROPERTIES for the View property now returns the right value.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 09:35:41 +00:00
Ingo Weinhold
427788e06f * Extended the Desktop's MouseFilter to reset the mouse-down messages' "clicks"
field. It does that when the modifiers, the pressed buttons, or the click
  target changes between the clicks, or when the distance between the click
  points is >= four pixels.
* Adjusted the Window::MouseDown() and WindowBehavior::MouseDown() interfaces
  and implementation accordingly (we now also pass and return click count and
  click targets).
* Removed the no longer need multi-click handling from DefaultWindowBehaviour.

Fixes #6841 and #6867.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 04:03:47 +00:00
Ingo Weinhold
76107eeb11 Added ModifiersChanged() hook to Window and [Default]WindowBehavior.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-25 00:38:32 +00:00
Clemens Zeidler
61707abd33 Removing duplicate stepping police label as suggested by diver, thanks. Fix #6906. Style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 23:58:19 +00:00
Jérôme Duval
93ca791b70 * added math.h missing prototypes like log2f. This fixes #6802.
* whitespace cleanup and renamed log2() to radeon_log2 (conflicts with log2 in math.h)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 23:42:17 +00:00
Ingo Weinhold
b509dbd998 Removed unused _SetColors().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 23:17:31 +00:00
Ingo Weinhold
b3b7517070 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 22:55:57 +00:00
Ingo Weinhold
78f7f8745e find_undefined_symbol_beos(): Look up the symbol in the requesting image
first. Fixes binary compatibility issue introduced with symbol preemption
support in the runtime loader. For unknown reasons liblayout.so, though
linked symbolically, contains a non-weak (!), preemptable BFont type info,
which was no longer resolved correctly with the new method.
Fixes #6892.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 22:11:42 +00:00
Ingo Weinhold
4e5bf97339 DefaultWindowBehaviour::MouseDown(): Reorganized the region checks. Instead of
checking the mouse button in every case, use separate switches for the
buttons. Makes things easier to read.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 21:31:05 +00:00
Ingo Weinhold
7cf8907453 Added new state ResizeBorderState, activated by right click on the decorator
or Cmd-Ctrl-right-click anywhere. Introduces the following behavioral changes:
* The send-to-back effect is triggered on mouse-up now. It expires after a
  short time of holding the button or moving the mouse, just like the
  activation effect on left-click in FFM mode.
* Depending on where the mouse was pressed, moving it will move the closest
  border or corner with it, thus resizing the window. The algorithm choosing
  the border/corner needs refinement. Currently the window is divided into 8
  equally sized sectors corresponding to the borders/corners.

Work in progress...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 21:22:13 +00:00
Ingo Weinhold
0fd5329656 * Removed click_type enum. Introduced a private Action enum in
DefaultWindowBehavior instead. DefaultDecorator uses the more appropriate
  Decorator::Region.
* DefaultWindowBehavior::MouseTrackingState: Generalized the fActivateOnMouseUp
  handling. It is now named fWindowActionOnMouseUp and the virtual method
  MouseUpWindowAction() is called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 18:34:40 +00:00
Philippe Houdoin
ce36f05450 Comments polishing, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 18:04:27 +00:00
Philippe Houdoin
de739bbef3 Factorized a bit more, and update fStatus in some place it was missing
but make sense. Please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 17:55:46 +00:00
Ingo Weinhold
5bbbdc9182 Fixed typo. Spotted by korli.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 16:51:34 +00:00
Ingo Weinhold
98c0eab3d4 Fixed another regression introduced in r39602: Reset the click count when a
different region has been clicked since the last click.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 16:38:31 +00:00
Ingo Weinhold
5116393fb9 MouseDown(): Also check whether the buttons pressed have changed since the
last click and reset the click count, if so. Fixes a regression introduced in
r39602 (left-click after right-click was recognized as double-click).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 16:25:12 +00:00
Ingo Weinhold
52cac2e7a4 * Refactored the MouseMoved(), MouseUp(), and part of the MouseDown() code
into newly introduced state classes.
* Fixed the right-click-while dragging behavior, I broke in r39602.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 16:17:32 +00:00
Philippe Houdoin
fb4527d22e * Use SetToWildcard() to init the local address.
* Implement OPTION_OVERLOAD support in dhcp_message::NextOption(). Untested.
* Comment out an ASSERT which don't compile in DEBUG mode (and make no sense for me, BTW)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 14:50:07 +00:00
Philippe Houdoin
3342fa7602 Make SetToWildcard() actually set address to wildcard one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 14:09:05 +00:00
Philippe Houdoin
1c9ad66954 Set AF_INET broadcast sockaddr length.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 11:49:16 +00:00
Philippe Houdoin
7fdae00f37 Remove duplicate code which was counting send error twice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 08:02:53 +00:00
Rene Gollent
7330d2fae3 Looks like this was somehow missed in r39602. Fixes build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 03:20:09 +00:00
Ingo Weinhold
89d652d5e0 * Decorator: Replaced the MouseAction() method with a new RegionAt().
RegionAt() just gets a point and returns which region was hit. This is in
  order to move behavioral code to [Default]WindowBehaviour. I'm not happy
  with this solution either, but to do it properly one would have to break the
  Decorator interface into separate look and feel interfaces and reorganize the
  interaction with WindowBehaviour. A task for the so-inclined reader. :-)
* Adjusted the Decorators implementations, but really tested only the default
  one.
* DefaultWindowBehaviour:
  - Replaced _ActionFor() method by a _RegionFor() which interprets the region
    returned by Decorator::RegionAt() and converts it to a "functional" region,
    i.e. combines cases we handle the same way.
  - MouseDown():
    - Handle the click region cases more in detail, disentangling the mouse
      button cases. With the following effects:
      - The middle mouse button has no effect anymore.
      - Left and right mouse buttons no longer share common behavior. A right
        click on a decorator button will send the window to the back.
    - The window key window management modifier combo does now have precedence,
      i.e. Cmd-Ctrl-click on the decorator buttons will have the same effect as
      clicking anywhere in the window.
    - When modifiers change between the clicks, reset the click count. Prevents
      a standard click in the window followed by a Cmd-Ctrl-click from being
      recognized as a double-click.
  - Mouse*(): Introduced a fMinimizeCheckOnMouseUp which works similar to
    fActivateOnMouseUp, just for double-clicks. The decision whether a
    double-click minimizes the window is postponed until releasing the mouse
    button. After moving the mouse sufficiently far or waiting half a second
    without moving the mouse the window will no longer be minimized. Fixes
    #6868.
  - MouseUp(): Moved the primary mouse button check without the
    "decorator != NULL" block. I suppose this fixes issues with the Cmd-Ctrl
    actions and decoratorless windows (if those actually exist).

I can't wait to hear what things I've broken. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 02:09:50 +00:00
Matt Madia
1e6e9d99cf * axeld is getting sloppy: applied r39597 to EthernetSettingsView.cpp as well :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 02:02:00 +00:00
Axel Dörfler
6d3838e37c * Don't overwrite the family if it is being passed as int32.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 22:20:11 +00:00
Axel Dörfler
e3feb1f8af * Added a new AS_DUMP_BITMAPS command.
* Extended app_server_debug command to be able to send it, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:50:12 +00:00
Axel Dörfler
ee72532a7a * Implemented deleting completely empty chunks.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:48:32 +00:00
Axel Dörfler
60fed7e077 * Moved the shared part of NetServer.h into a new private header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:44:37 +00:00
Axel Dörfler
4ac660519e * Improved syslog output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:25:09 +00:00
Axel Dörfler
af0745618f * Now uses the new network API instead of directly using socket ioctls.
This makes the code much cleaner and simpler.
* Completely untested, though (will do that next).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:11:04 +00:00
Axel Dörfler
01308f219b * Simplified get_address_family() function.
* Use new BNetworkInterface::AutoConfigure() method.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:05:32 +00:00
Axel Dörfler
2bd61a6f33 * Added Index() method, was not even declared yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:04:19 +00:00
Axel Dörfler
2087545cc0 * Added methods to manipulate routes.
* Added AutoConfigure() method.
* Implemented missing Index() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:03:11 +00:00
Axel Dörfler
2977e7888f * Added alternatives to AddInterface()/RemoveInterface() that take the name
of the interface instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:01:19 +00:00
Axel Dörfler
6a75869303 * Added SetAddress() methods for IPv4, and IPv6 addresses.
* Improved API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:00:05 +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
Philippe Houdoin
5655de51dd Initial send_data() support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 17:30:50 +00:00