Commit Graph

6328 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
96c30cc820 Tracker: fix warning in gcc2
Refactor a bit the conditions to avoid a warning.
2012-09-03 16:53:53 -04:00
Rene Gollent
139ee87903 Fix some behavioral regressions introduced by previous commit.
- Some parts of Tracker were basing certain assumptions on whether the
  types list was NULL or not. We now check on list emptiness instead.
2012-09-03 16:42:14 -04:00
Rene Gollent
9335e141ba Fix crash when dragging files onto nav menus.
- BNavMenu now keeps its own copy of the cached types list that's passed to it.
  In some circumstances it could happen that the container window would
  delete the list and consequently the nav menu would wind up with a pointer
  to an invalid object. Probably a regression from the async mouse tracking
  rewrites.
2012-09-03 16:28:47 -04:00
Ryan Leavengood
33570266f1 Get all parameters from a notification message.
Fixes #8916. Thanks Prodito for the patch.
2012-09-02 19:42:43 -04:00
Fredrik Modéen
7a74a5df45 WIP... Updating Bluetooth.
* Some bugfixes.
* added scan mode read.
* inactivated some printout for now. Was a lot of noice in terminal
2012-08-27 19:23:22 +00:00
czeidler
8e80f8cc35 Fix MinSize and PreferredSize. 2012-08-24 15:44:13 +12:00
Jessica Hamilton
d3668a5473 SoundConsumer.cpp: fix debug macros compiling in release mode
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2012-08-22 23:49:12 +02:00
John Scipione
91c78f092f Create and use new list view item colors
* B_LIST_BACKGROUND_COLOR
* B_LIST_SELECTED_BACKGROUND_COLOR
* B_LIST_ITEM_TEXT_COLOR
* B_LIST_SELECTED_ITEM_TEXT_COLOR
2012-08-22 00:28:24 -04:00
John Scipione
2c1f6c10ce Update ListItem's to use menu item colors.
* Selected bg uses B_MENU_SELECTED_BACKGROUND_COLOR
* Selected text uses B_MENU_SELECTED_ITEM_TEXT_COLOR
* Unselected text uses B_MENU_ITEM_TEXT_COLOR

Update BStringItem, but also the custom Listitem code in the
Appearance and Locale preflets.
2012-08-20 02:20:59 -04:00
Ryan Leavengood
d6c852ec49 Actually cache something when CacheLocalizedName is called.
Before its name was a lie, since nothing was cached.

Another boolean was added because getting the localized name could fail, and we
don't want to pointlessly try again, so relying on fHasLocalizedName won't work
for that.

Since in my tests this was getting called up to 4 times per application when
opening the Deskbar Application menu, this caching should speed that up a bit,
at least when this file name translation feature is turned on.
2012-08-19 21:25:43 -04:00
Ryan Leavengood
379dcaa1f6 Look up the entry_ref for a signature for localized file names.
Fixes #8124.
2012-08-19 21:21:30 -04:00
Ryan Leavengood
d7f6b4c18c ControlLook: Don't tint the selected menu item color.
Now that we use the actual selected menu item ui_color, this tinting is not
needed. In fact it makes the selected item too dark.

Thanks diver for noticing.
2012-08-19 18:17:07 -04:00
Philippe Saint-Pierre
ed63a5d20c Tracker: Double-Click simplification
Double-click check was redoing what is essentially already done in input_server.

The way we were doing it, right clicking (or pressing a different button for the second click,
for that matter) wasn't clearing the fields remembered and thus not breaking the sequence.
So a third click returning to the correct sequence (in a short time) would get recognized
as a valid second click.  So a quick left-right-left would be seen by that method as left-left.

Also, clean up a previous fix I committed.  Removed the introduced Origin() method as it
is the LeftTop() method I was interested in and it is already existing.

Fix #8714
2012-08-18 22:13:09 -04:00
Humdinger
cc2b203e16 Reverting part of hrev44535.
Renaming "Preferences" to "Tracker preferences" has been
unexpectedly contentious. Reverted.
2012-08-17 20:05:39 +02:00
Oliver Tappe
2bcc7f40c3 Simplify use of translated strings in BAboutWindow.
* avoid duplicate initialization of variables by joining the
  expressions.
2012-08-16 21:12:55 +02:00
Ryan Leavengood
59347b7f1b Reverse the meaning of BWindow fShowLevel to match BView.
This also matches the client_window_info.show_hide_level field used in Deskbar
and other applications.

While doing this, keep fShowLevel fully in sync between BWindow and app_server,
use one message type for both hiding and showing, and make the decision to show
and hide the window in the app_server.

Lastly make minimize behave as described in the Be Book: hidden windows cannot
be minimized, and minimized windows which get hidden become unminimized.
2012-08-15 23:45:15 -04:00
Adrien Destugues - PulkoMandy
86e47974c0 Fix build. 2012-08-15 13:45:29 +02:00
Adrien Destugues - PulkoMandy
3b85241aba Fix build. 2012-08-15 13:43:02 +02:00
Adrien Destugues - PulkoMandy
7dfdb91a2e Fix language mapping again for indi. 2012-08-15 13:33:24 +02:00
Adrien Destugues - PulkoMandy
4be15fbb7a Add language to country mappings for ReadOnlyBootPrompt
* Greek > Greece
 * Croatian > Croatia
 * Pakistanese > Pakistan
 * Indi > India
2012-08-15 12:50:04 +02:00
Adrien Destugues - PulkoMandy
93e30a47be Add a simpler test for BPushGameSound and attempt to fix the most striking mistakes in there. 2012-08-15 10:32:06 +02:00
Humdinger
ef4ed1b76b Replaced "Preferences"/"Options" with "Settings"
Replaced remaining "Preferences" and "Options" with "Settings" as
that is generally used for app settings instead of the system
preferences found in the preference panels.

Renamed Tracker's "Preferences" to "Tracker preferences" to be
similar to the entries in the Deskbar and e.g. the Media replicant
in the Deskbar tray.
2012-08-15 09:53:38 +02:00
Philippe Saint-Pierre
c38375376d Tracker: TextWidget editing flaws
TextWidget tried to detect if the editing box would span outside the PoseView,
but it was using an hardcoded value of 1 for the minimum left value.  But in Icon mode,
negative values can occur.  Change to use the view's origin (top left corner of the view).
2012-08-15 01:28:44 -04:00
Philippe Saint-Pierre
8cbdf82a0a Tracker: Drawing glitch when created Pose is first in PoseView
Due to clipping of a rect to match the view bounds, there was a confusion
as to whether the rect was at the top of the view bounds, or above the view
bounds as both met the condition.

Fixes #8876.
2012-08-14 16:26:19 -04:00
Philippe Saint-Pierre
7ad72ef6ea PoseView: avoid duplication of poses
When filtered, clear the FilteredPoseList before re-filling it.

Fixes #8875.
2012-08-12 16:34:39 -04:00
Ryan Leavengood
96cabf581a Sync BWindow fShowLevel with the app_server.
Implementing the window_info.show_hide_level in terms of this solves the
problem of minimized windows also being considered hidden, when really they are
just hidden in the app_server.

window_info.show_hide_level is still defined backwards with a comment making
that clear.

Also removed sending fShowLevel in the minimize request since it is now
maintained in the app_server.

Fixes #4127.
2012-08-12 10:40:21 -04:00
Rene Gollent
39433058f7 Fix ticket #8858.
- When an Identify/Force Identify request is made in Tracker, if the target
  is a link, resolve it to its destination first. Fixes #8858.
- Have mime_update.sh explicitly mimeset the welcome/user guide scripts.
2012-08-11 09:56:20 -04:00
Philippe Saint-Pierre
c01e918c0a Cancel editing of Widget if sorting of poses occured.
Since the position of the widget was registered at the first click,
it likely changed and its causing drawing afterfacts (it's editing at
its old location).
2012-08-10 12:23:08 -04:00
Philippe Saint-Pierre
66c09a3554 Delayed widget editing, crash avoidance
Make the PoseView stop watching a TextWidget if it's being deleted.
Could happen in race conditions for example, if you click to edit
the name widget of a pose while the pose is being deleted soon after.
2012-08-10 12:11:04 -04:00
Philippe Saint-Pierre
4cf0af0607 Tracker: Additional cases to cancel double-click detection
Don't wait for a potential second click (and then trigger Widget editing) when:

1. a click occurs on a different pose, on a 'pose-less' area or when right clicking
2. when you start dragging something.
2012-08-10 00:07:56 -04:00
Philippe Saint-Pierre
741e52463a Tracker: Double-click management changes
Make the "second click of a double-click" detection waiting time async. In other words
(hopefully clearer), when the TextWidget gets a click, it register itself, recording the time,
and it will get the editing order later as a callback from PoseView when the delay without any
further click expires.

Fixes #8818 and maybe others.
2012-08-09 23:15:27 -04:00
Philippe Saint-Pierre
e0e641c078 Tracker: Style fixes, should have no functional change 2012-08-09 23:15:27 -04:00
Philippe Saint-Pierre
9766084650 InfoWindow: Icon wasn't properly refreshing when changing 2012-08-09 01:28:54 -04:00
Philippe Saint-Pierre
11a36918ee PoseView::AddPosesTask - no need to open the node at this point 2012-08-09 01:28:54 -04:00
x-ist
6e1a7a15cd Fix BTextView tab calculation.
In rare cases such as described in #7955 BTextView happens to calculate the
width of a tab close to zero (e.g. 0.000031). This patch adds a fallback to the
default tab width in that case.

Signed-off-by: Ryan Leavengood <leavengood@gmail.com>
2012-08-08 22:17:38 -04:00
Rene Gollent
74e288401d 64-bit fixes. Gets Debugger fully compiling on x86-64. 2012-08-08 19:40:51 -04:00
Philippe Saint-Pierre
aafb6faf57 PoseView: crash related to PoseView containing many files
Due to a previous change in the incrementation of models in AddPosesTask,
PoseView containing large number of poses were prone to crash in ClearPoses().

Gaps in PoseList or other invalid memory area were introduced.

Thanks to x-ist for precious assistance in spotting those issues!
2012-08-08 16:36:02 -04:00
Philippe Saint-Pierre
0bc1be3252 PoseView: Fix crash in FilePanel
Again, a regression fix. Under some circumstance, fFiltering was wrongly
set. Also, the node wasn't open before checking the BRefFilter and some
filters expected that to be.
2012-08-08 14:59:29 -04:00
Philippe Saint-Pierre
5489384d45 Tracker: crash fix in FilePanel
Regression of hrev44493, file panel crashed when changing dir and
filtering being disabled (sorry!)

Also fix the widget editing when filtering is activated. Now renaming
a file/folder and causing it to 'fall off' the filter does work.
2012-08-08 13:07:53 -04:00
Philippe Saint-Pierre
7d460e3bb9 PoseList: fix an assertion failure 2012-08-08 13:07:53 -04:00
Philippe Saint-Pierre
ea8b1e14f9 OpenWithWindow: Fix crash at closing, and fix filtering
Following hrev44493, the way ShouldShowPose was used changed a bit,
to harmonize with type ahead filtering.

This updates OpenWithWindow to use a BRefFilter to do its
filtering rather than overloading ShouldShowPose.
2012-08-08 13:07:53 -04:00
Philippe Saint-Pierre
c2535dc48a Tracker: various issues regarding filtering
1. A BRefFilter-ed PoseView wouldn't keep monitoring files after its opening
thus not picking up files that happen to fit the filter thereafter (mime attr
updated, etc..)
2. A filtered PoseView wouldn't get updated when:
  a) a column was added or removed
  b) a file was renamed
  c) a file was moved
3. Harmonize the way BRefFiltering and Type-ahead filtering are working. Both
can be used together.
4. The handler for AttributeChanged() wasn't working properly if link(s) of a
changed model was/were its siblings.
5. Broken links weren't detected/updated (it nows monitor the lost target
parent directory, and wait for the target creation to show the link fixed)

This is a big change (even more considering the 'critical-ness' of the component)
Testing is MUCH welcome!

Should fix #4254, #5381, #1717 (and maybe others)
2012-08-07 18:31:54 -04:00
Hamish Morrison
59b4be8cc1 Move SoundConsumer to libmedia in the BPrivate namespace
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2012-08-07 23:38:37 +02:00
Ryan Leavengood
e77304562d Actually sort the translator menu used in ShowImage.
There were two problems with the last commit:

* the list needed to be outside of the top-level loop.
* BList was just broken for sorting translation_format pointers.

I fixed this by moving the loop outside and converting the translation_formats
to translator_info, which has the translator_id, since that is needed to create
the menu item, and would otherwise be unavailable outside the loop.

I tried to get this working with BList, but the sorting was completely broken,
and converting to BObjectList made the code much, much better and worked great.
Screw BList and casting, hurray templated BObjectList.

Really fixes #6782.
2012-08-07 00:41:41 -04:00
Ryan Leavengood
adfe152ee2 Sort the translation formats in AddTranslationItems by name.
This is used by ShowImage and CodyCam to create a list of image formats which a
file can be saved as. Tracker sorts the image MIME types used in the Find
window by name, so this makes these Save As menus match that (minus the icons
which I think are superfluous.)

Fixes #6782.

If the use of BList is no longer recommended, I welcome better suggestions
for sorting which will work in both GCC2 and GCC4. But this works ;)
2012-08-06 02:08:37 -04:00
Ryan Leavengood
57c5b09e1a Use be_control_look != NULL everywhere in the Interface Kit.
Should not be a functional change. It is not in the Haiku Coding Guidelines but
I feel like 'if (object != NULL)' is generally preferred to 'if (object)', plus
in this case of be_control_look that is the more common style.
2012-08-05 18:07:23 -04:00
Humdinger
aed3510485 Close alerts with ESCAPE key.
Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.
2012-08-05 19:32:46 +02:00
Ryan Leavengood
bab4f5ad7d Use the parent menu's font when truncating labels.
Fixes the other bug uncovered by #8829, but my other fix was valid too.
2012-08-04 00:24:56 -04:00
Ryan Leavengood
4ffc27fcc1 Fix incorrectly truncated menu labels.
An off-by-one error (> instead of >= really) was causing truncation when it
wasn't needed. But for some reason this only showed up when the main font size
was increased. I may or may not look into that, but this fixes the issue.

Maybe one of the faster bug logged to bug fixed times in Haiku history? ;)
2012-08-03 23:56:00 -04:00
John Scipione
593808d96a Return authors name's to DeskCalc headers.
No functional change.

* Surround email addresses in angle brackets.
* Add myself to ExpressionParser.cpp and .h
* Remove myself from ExpressionTextView.cpp and .h
* Alphatetize authors by last name.

Thanks Ingo and Axel.
2012-08-03 11:16:23 -04:00
Ryan Leavengood
0eed2a7c98 Fix flickering menus, especially menu bars.
Figured out by Stephan originally and only hacked in WebPositive, I knew
something about WebPositive was different because it did not flicker when
everything else did.

Since we fully draw the menus there is no need to have app_server fill in the
background with the view color. That is what was causing the flickering.

Should fix #484, #532 and #4335. Thanks diver for confirming the patch against
those tickets.
2012-08-02 23:25:29 -04:00
John Scipione
57e436840b Revert "Remove the ellipses for About App in the replicant menu."
Apparently ellipses are used for all dialog boxes on Haiku.
Sorry for the noise.

Thanks AnEvilYak

This reverts commit 147ef3a9e8.
2012-08-01 07:54:39 -04:00
John Scipione
147ef3a9e8 Remove the ellipses for About App in the replicant menu.
The ellipsis character (...) after a menu item means that
the command needs more information from the user before
the operation executes.

The ellipsis character doesn’t simply mean that a dialog
box or window will appear.

The window appearing completes the command and doesn’t
require additional input from the user before it executes.
2012-08-01 07:46:44 -04:00
Alex Smith
f7010474bb Changed resource alignment behaviour for ELF64 binaries.
The current behaviour of aligning to the maximum value of p_align seen
is problematic for x86_64, as the default segment alignment is 2MB.
This causes all x86_64 binaries to be padded to at least 2MB when
resources are added to them. There is no need to align to p_align in
the file itself (it's only an in-memory requirement), therefore
instead just align up to an 8-byte boundary. The current behaviour is
retained for ELF32, so this won't cause any compatibility problems
(there are no existing ELF64 BeOS/Haiku binaries to worry about).
2012-08-01 10:35:34 +01:00
John Scipione
8ffd0477dd Implement degree mode in DeskCalc.
Default is radian mode,  You set the option in the right click menu
like the other options.

Note: degree mode does not affect hyperbolic trigonometric functions.
This is how Mac Calculator, Windows Calculator, and Google Calculator
work.
2012-07-30 22:35:57 -04:00
Ryan Leavengood
6a03786cc9 Draw menus using the user chosen colors. 2012-07-28 23:02:17 -04:00
Ryan Leavengood
688e878807 Don't check for double click if it was a right mouse click.
Fixes #8714.
2012-07-28 19:58:28 -04:00
John Scipione
e51854a127 Add 96x96 and 128x128 icon sizes to tracker including scaling of BeOS icons using scale3x and scale4x algorithms. 2012-07-28 14:07:43 -04:00
John Scipione
ea001e585a Round 2 of style changes to Tracker
* focused on 80-char limit fixes.
* also some whitespace and case statement indentation fixes
2012-07-28 14:02:35 -04:00
John Scipione
a51764c53e WIP: Yet more style fixes, mostly 80 char violations. 2012-07-28 14:02:34 -04:00
John Scipione
96a1e39a63 An error while emptying trash is not that dramatic. 2012-07-27 20:46:48 -04:00
John Scipione
caaec0198e A for loop with just an end condition is better as a while loop. 2012-07-27 20:46:48 -04:00
John Scipione
b05aa8b5b1 Style changes in Tracker, no functional change.
Manual whitespace cleanup
Change instances of const char * to const char*
Convert /* */ C style comments to // C++ style comments
2012-07-27 20:46:47 -04:00
Philippe Saint-Pierre
b866f1fa54 Tracker: Files created from templates are now monitored
fixes #2796.
2012-07-24 14:53:57 -04:00
Philippe Saint-Pierre
4c45f003ed Tracker: Right clicking on Pose triggered Rename prompts
Right clicking on a Pose to get the contextual menu would quite often
trigger a rename action of that pose. Don't allow to rename a pose
by releasing the secondary mouse button.
2012-07-23 22:38:44 -04:00
Philippe Saint-Pierre
fb678bc3d0 Tracker: Sorting in filtered view led to crash
Fixes #6992.
2012-07-23 19:06:08 -04:00
Philippe Saint-Pierre
c082e8f2e2 Tracker: Variation between Saved and Restored widths
When restored, an overlap was wrongly detected in offsets for
failure to take into account the width of the border line.

This was causing the horizontal scrollbar to show unnecessarily.
2012-07-23 17:05:57 -04:00
Philippe Saint-Pierre
50d739dee5 Tracker: Regression fix
A crash of Tracker was triggered when accessing AddOn menu (by
shortcut or context-menu) for Pose on Desktop, because of it's
incapacity to read the mime type list (that wasn't built in
those cases).
2012-07-23 16:15:19 -04:00
Philippe Saint-Pierre
5cdd07a814 Tracker: Optimisation of AddonMenu menu construction
1. Build the list of mimetypes of files in selection only once and
reuse it for all further tests.

2. Fix a regression introduced in hrev44384 where the MimeType()
wouldn't get recognized when just changed by tracker (by that same
right click).  It would be on subsequent clicks.

3. Rename the static map variable to better fit our coding style
and be more understandable.
2012-07-23 14:47:24 -04:00
Philippe Saint-Pierre
516cac7817 Tracker: Coding style violations fixes and typos
No functional changes, thanks Axel!
2012-07-23 08:21:43 -04:00
Philippe Saint-Pierre
674ff0df2f Tracker: Various sorting issues in Tracker
When sorting files by Modified dates, right clicking on a file was leading
to a sorting issue where files were changing positions (without reason).

1. Any changes to stats (size, modification, creation, mode) was triggering
the sorting. Now only stats fields currently used as a Sort criteria will
trigger such event.

2. The Mimeset of file was set (in case of unknown file format) once per checked
add-on when building AddOn Menu. Now it's checked once per file in selection.
(so, once per file, rather then once per file, per add-on).

3. Now rely on registrar to force the mimeset (to trigger the sniffer in case
the attribute already exist) rather than trying to duplicate the feature in Tracker.

4. When Sorting, if there is a old position known, check if it's working by looking
if you should come after the previous item, and before the following item.  Previously,
the item would be pushed at the top if the group of item all fitting the criteria
(same file size, same file kind, etc.. depending on the sorting criteria).

Fixes #8478.
2012-07-22 22:16:19 -04:00
Philippe Saint-Pierre
1236c746af Tracker: a file leaving Trash won't appear in QueryPoseView
Fixing #1592.

A feedback FSNotification()->EntryMoved->PendingNodeMonitorCache->FSNotification
was seemingly introducing some race condition, as it was working 1 time
on several tries.
2012-07-21 22:09:45 -04:00
Philippe Saint-Pierre
2d5785ba12 CID 611239: Fix resource leak 2012-07-20 21:50:13 -04:00
Rene Gollent
902a98ad83 Fix #8753.
- Store whether or not the use of the horizontal scrollbar is desired
  on the class itself. If the CLV was set to use the horizontal scrollbar,
  and then asked to lay itself out while hidden, it would incorrectly assume
  the horizontal scrollbar wasn't in use, and consequently repositioned its
  views such that the horizontal scrollbar and outline view overlapped.
2012-07-20 19:35:21 -04:00
Ingo Weinhold
af350aa218 Add private shared class ArgumentVector
The parser is based on the FS shell's ArgVector.
2012-07-20 23:32:58 +02:00
Rene Gollent
03aa456e2e Fix mouse down handling error.
- When handling a mouse click, the button was hardcoded instead of
  passing the actual button clicked by the user. Spotted by Chris
  Roberts.
2012-07-18 23:21:06 -04:00
Rene Gollent
ed15f1b8fb Fix scrollbar handling when removing rows in BCLV.
- If removing a row results in there no longer being any rows whatsoever
  visible, force a scroll back into the visible range. Fixes #8287.
2012-07-18 23:02:30 -04:00
Alex Wilson
2d4288086f Make SpaceLayoutItem compose spacing using BControlLook.
This allows for passing spacing/inset flags to BSpaceLayoutItem.
Eg. in a builder, you could AddStrut(B_USE_ITEM_SPACING)
2012-07-16 14:59:32 +12:00
John Scipione
4bb5af765f Add control mark color setting. #8054
An enhancement adding a setting to Colors under Appearance to
set the mark color of radio button and check box controls.
2012-07-15 15:09:04 -04:00
Rene Gollent
975867a4ff Fix drawing bug in BStringField.
- If a string column was exactly the correct pixel width for the strings
  contained within it, they would skip attempting to truncate the string.
  However, the truncated string was always used for final drawing, with
  the end result that the fields would be drawn blank. This would sometimes
  manifest itself in Debugger where things like ID columns wound wind up
  showing no data until one resized the column.
2012-07-13 19:38:41 -04:00
Hamish Morrison
639ac47052 BTextView should not accept disallowed chars being pasted.
* Patch from #6885: This filters out any disallowed characters from text
  being pasted or dropped in. If the resulting filtered text is zero
  characters long, it beeps. Works with styled text too.
* Coding style: variables renaming by korli.
2012-07-12 23:56:36 +02:00
Rene Gollent
36c85ca8df Fix add-on image unloading for shelf replicants (ticket #8708).
- The version of instantiate_object() that returns the image id from which
  the object was reinstantiated was not correctly returning it in all
  circumstances, only if it had to find/load the add-on itself. This caused
  problems for BShelf since the latter relies on that image id in order to
  determine what image to unload when replicants are removed. To remedy this,
  introduce an additional version of find_instantiation_func() that returns
  the image id in which the instantiation function was found, and make use
  of it in instantiate_object() in order to also be able to return the image
  id in that case.
2012-07-10 18:41:49 -04:00
Humdinger
851c719d02 Small text changes in alert when renaming/moving special folders.
Since the button was renamed from "Do it!" to the specific action,
an additional explanation in case of special user folders isn't
needed any more.
Split text into paragraphs for better readability.
2012-07-04 08:42:38 +02:00
Philippe Saint-Pierre
8d87f2b43a StringForRate()
Introduce a function to generate the string representation of a bitrate
(kbps, mbps, gbps, etc..)

* Factor out the code from MediaPlayer InfoWindow
* Allow different bases (/1000 or /1024)
2012-06-25 13:29:22 -04:00
Ryan Leavengood
9f5864ab09 Handle the scroll wheel changing over scrollbars.
* Extract the scrollbar change based on the mouse wheel delta into a protected
  method of BView.
* Call that method from BScrollBar's MessageReceived.

With this change it is now a bit easier to scroll horizontally around the
system by putting the mouse cursor over a horizontal scrollbar and using the
wheel.

Fixes #8631.
2012-06-24 10:50:42 -04:00
Axel Dörfler
bea2387b68 Made constants static, coding style cleanup. 2012-06-05 23:15:54 +02:00
Reznikov Sergei
72b7db341b Added resize to fit shortcuts. Partially fixes #7467.
* Adjusted initial tracker windows width to fit modified column.
* Resolved a TODO: Added get info shortcut to Open with window.

 Author:    Sergei Reznikov <diver@gelios.net>

Signed-off-by: Alexandre Deckner <alexandre.deckner@uzzl.com>
2012-05-28 16:29:43 +02:00
czeidler
875b218202 Calling the BView version of {Enable,Disable}LayoutInvalidation() seems to be more natural. 2012-05-10 10:36:42 +12:00
czeidler
31f768577e The layout checks the target view now if the layout invalidation has been disabled in the view. 2012-05-10 10:36:41 +12:00
czeidler
58f3387d56 Workaround to not trigger a relayout in DoLayout when adding the label view again. 2012-05-09 14:34:44 +12:00
Philippe Saint-Pierre
78614977b0 Tracker: Removing the Desktop Background Image don't clear a pointer
fBackgroundImage wasn't being cleared when removing the desktop
background image because the loading process wasn't ignoring
loading failures (as is the "no background for this workspace" setting).

fBackgroundImage not being NULL was causing crashes mainly in
ScreenChanged(), where it was trying to re-center a non-existant
background.  Was causing #7376 and maybe others.
2012-05-06 20:00:15 -04:00
Philippe Saint-Pierre
4dad975dda Tracker: Consider extra column margin in PoseView::Extent()
In List Mode, consider the extra margin added to the right of
the last column when computing the Extent of the PoseView. This
was causing the ResizeToFit to resize a bit too small.

Fixes #4318
2012-05-06 18:43:59 -04:00
John Scipione
c645f9bcbe Rework tooltip method in BView again.
Passing NULL or a blank string to SetToolTip(const char*) sets the
tooltip to NULL by calling SetToolTip(BToolTip*) with a NULL argument.

Calling SetToolTip(BToolTip*) with a NULL argument calls HideToolTip()
because sometimes the tool tip can change without the mouse moving,
for example because the user clicked.

Thanks Axeld and Stippi.
2012-05-04 19:55:24 -04:00
John Scipione
5ccf455f7e Fix another tooltip related bug that appears in Deskbar.
The bug is that in horizontal mode the tooltip will remain set to
the last moused over team menu item even if the mouse is no longer
over a menu item. The bug can be seen in the following screenshot:

http://26.media.tumblr.com/tumblr_m3gze8s1xi1r0f0hfo1_400.png

To fix this bug, allow you to set the tooltip text to blank or NULL
in SetToolTip(const char* text). In ShowToolTip() check to see if
the tooltip text is blank or NULL and if so, don't show the tip.
Setting the tooltip to blank or NULL effectively unsets the tooltip
on a view.
2012-05-03 20:49:18 -04:00
John Scipione
4daa7647c9 After setting the tooltip text, invalidate the layout.
This fixes a bug introduced in hrev44075 (I think) where the internal
tooltip window wouldn't resize itself after setting new tooltip text.
So if you set the tooltip to a short string then set it to a long
string the tooltip would get cut-off or if you set it to a long string
and then set it to a short string the tooltip window would be too wide.
The result can be seen in Deskbar in the following screenshot:

http://30.media.tumblr.com/tumblr_m3fg327NsV1r0f0hfo1_400.png

After invalidating the layout the internal tooltip window gets resized
correctly.
2012-05-03 01:13:16 -04:00
John Scipione
7f7f5eac6e Refactor ToolTipManager a bit.
* Change ShowTip() point parameter name to where.
* Add a parameterless ResetWindowFrame() overload that get's the current
  where and calls ResetWindowFrame(BPoint where) which does the actual
  work. FrameResized() calls this parameterless ResetWindowFrame()
  method instead of doing the work in that method. This is functionaly
  the same but allows me to call the parameterless ResetWindowFrame()
  elsewhere.
2012-05-02 23:51:49 -04:00
Alex Wilson
4ca2a44779 Make ownership-taking idempotent during unarchiving.
The previous scheme made it hard to deal with reference-counted objects,
which may be owned by many objects.
2012-05-03 08:45:29 +12:00
czeidler
a937ffd238 Make the menu window not resizable.
Right clicking the menu border showed the resize arrow and sometimes even made it possible to resize the menu.
2012-05-01 11:03:27 +12:00
Axel Dörfler
8e2140fa5e Fixed a large client side memory leak for app_server memory.
* The areas allocated for BBitmaps were never deleted, even though the
  app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
  would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
  the areas, so that the app_server now notifies the client whenever that is
  possible.
* This might fix #6824.
2012-04-29 20:26:14 +02:00
czeidler
6eb2e6b47f Use the timeout in poll. 2012-04-29 16:53:40 +12:00