Commit Graph

44376 Commits

Author SHA1 Message Date
John Scipione
67bc15211f Make about window a bit taller so it fits the average amount of text
... without scrolling.

This completes my about window treatment for all replicants. It is my
hope that BAboutWindow will be used by all apps that need an about
dialog instead of using a BAlert.
2012-11-13 02:03:02 -05:00
John Scipione
df02847b49 Update Workspaces about dialog 2012-11-13 01:53:31 -05:00
John Scipione
b23f8cd41f Destroy AboutWindow on destruction 2012-11-13 01:42:01 -05:00
John Scipione
c191daa816 remove uneeded comment 2012-11-13 01:41:25 -05:00
John Scipione
d4d5bf6c50 Update PowerStatus about window 2012-11-13 01:37:30 -05:00
John Scipione
5070e7e222 Init fAboutWindow NULL first 2012-11-13 01:29:10 -05:00
John Scipione
83baea76a8 Update copyright info for ProcessController 2012-11-13 01:24:18 -05:00
John Scipione
be7c552a50 Bring AboutRequested() method back, not sure why I removed it. 2012-11-13 01:18:37 -05:00
John Scipione
730a45ee8f Rework NetworkStatus to use a non-modal BAboutWindow 2012-11-13 01:12:44 -05:00
John Scipione
5bf91175bc Haiku may be alpha quality, but DeskCalc isn't 2012-11-13 00:45:01 -05:00
John Scipione
cea3811974 Remove About DeskCalc... from right click menu.
We decided not to include about dialogs in system apps (right?)
2012-11-13 00:36:33 -05:00
John Scipione
96a5a088ba Add the authors back to AboutWindow.h, also use <> style for email addresses 2012-11-13 00:28:06 -05:00
John Scipione
7031e2beb2 Fix build, that's what I get for committing without testing first. 2012-11-12 23:57:33 -05:00
John Scipione
80d7bf83bd Add authors back. 2012-11-12 23:57:33 -05:00
John Scipione
d1b2e338ef There is nothing to translate in the initial copyright string, it is just '(c) %years% %holder%' 2012-11-12 23:57:32 -05:00
John Scipione
c73d4b3dc2 Move AboutPosition() method up. 2012-11-12 23:57:31 -05:00
John Scipione
d156f97655 Get rid of the _Init() method in BAboutWindow, just the single constructor body. 2012-11-12 23:57:31 -05:00
John Scipione
97a814061e Instead of destroying the BAboutWindow object on close, Hide() it, then on the destructor of the calling window call Quit() explicitly to destroy it. 2012-11-12 23:57:30 -05:00
John Scipione
04875296c4 Add version variety to the end of the version string (alpha, beta, etc.) 2012-11-12 23:57:29 -05:00
John Scipione
0fbb37d238 Move the app icon down a bit. 2012-11-12 23:57:29 -05:00
John Scipione
6cdd1023ab Get the icon and version from FindApp which works whether or not the app is currently running. This makes process controller show it's icon and version even though it lives in Deskbar. 2012-11-12 23:57:28 -05:00
John Scipione
a792461b21 Pass in 128 as an icon_size to GetTrackerIcon(), this makes it grab a nice 128x128 HVIF icon 2012-11-12 23:57:28 -05:00
John Scipione
12a9a71db6 Use a quit bool in B_ABOUT_REQUESTED to indicate that the about window has quit instead of using kAboutWindowClosed message. This prevents message signature clashes. 2012-11-12 23:57:27 -05:00
John Scipione
3fdab58446 Set the about window object to NULL on close or quit.
Pass the BHandler object that opened the about window to BAboutWindow.
When the window closes, send a kAboutWindowClosed message back to the
handler. This allows the handler to set the variable to NULL.

Implement the new about dialog constructor in all apps that use it.
Remove the old constructor. This now works reliably for all cases I
tested without crashing and does the right thing on close. The setup
and teardown is a bit more complicated than I wanted though.
Unfortunately this seems to be necessary when not using a BAlert.

Fetching the app icon does not work reliably yet. This is because for
replicants the app may not be running. I may have to pass the icon in
instead of grabbing it from the signature.
2012-11-12 23:57:26 -05:00
John Scipione
5b0cd98792 WIP: Create the about dialog once, hide and show, Quit() when object is destroyed. 2012-11-12 23:57:25 -05:00
John Scipione
0046f44436 Modify about window to take an app signature.
* Grabs the app icon and version from the resource file.
* Allow you to specify the copyright holder instead of hardcoding
  "Haiku, Inc."
* Support multiple extra copyright fields.
* Modify BAlert to take a custom icon.
* Set the custom icon of the BAlert to the app icon.
* Also set the app version.

* Convert BAboutWindow to derive from BWindow
* Place a 128x128 icon and fill out a scrolling BTextView
  with options such as authors, version history, copyright,
  license, etc. Still needs some work but is coming along.

* Add the word Version to the version line, i8n'ed of course,
  and tweak the info box and default sizes.
2012-11-12 23:57:24 -05:00
John Scipione
1a5df674c1 Fix saving and re-expanding items.
Subtle bug #1 found, 11th hour change broke this feature, fixed
once again.
2012-11-12 23:30:51 -05:00
John Scipione
a05a00c849 Tiny style fix 2012-11-12 22:03:27 -05:00
John Scipione
d1e438cad1 Force app menu to auto-layout before recomputing scroll limits.
This makes Deskbar correctly calulate the scroll limits in the case
when scrollbars are attached but not due to an app being added or
removed for example because the icon sizes increased.
2012-11-12 22:03:26 -05:00
John Scipione
652a115c1c Use fDragRegion width not left, you can't depend on the screen position reliably 2012-11-12 22:03:26 -05:00
John Scipione
27a53c3c9e Fix build, forgot a { 2012-11-12 22:03:25 -05:00
John Scipione
b4c922197c Fix Deskbar crash when scroll arrows are removed.
fExpando is added and removed from InlineScrollView only and it is
created and destroyed in BarView only. Before this there was a
case where it was removed in both InlineScrollView and BarView
causing a crash from the double remove
2012-11-12 22:03:25 -05:00
John Scipione
3135d0e0de Shrink icon only width a bit to make room for more icons
...before turning scrolling on.
2012-11-12 22:03:24 -05:00
John Scipione
e4f9bfce33 Need to position window before checking for scrolling.
Otherwise when you switch from bottom mini mode to vertical expando mode
you'll get scroll arrows when you shouldn't because the bottom of the
window frame will be below the screen.
2012-11-12 22:03:24 -05:00
John Scipione
dec421b1db Make sure that you remove the separator item before adding the team menu in mini mode or it won't work all the time 2012-11-12 22:03:23 -05:00
John Scipione
d6f6b835ad Draw a nice menu background on the inline scroll view and when scroll faster when you push control/option/command and click the little arrow button. 2012-11-12 22:03:23 -05:00
John Scipione
0e100a37a9 Cleanup 2012-11-12 22:03:22 -05:00
John Scipione
ed75ca7201 Set the scroll arrow limit based on the min menu item widths
... rather than the current menu item widths. This means that
Deskbar will shrink the menu items until they are at their minimum
size before it activates the scroll arrows. Previous to this
change the scroll arrows were being turned on prematurely. Also
lower the minimum menu item width to the icon width + 50pixels which
is arbitrary but looks good to my eye.
2012-11-12 22:03:22 -05:00
John Scipione
c07e6ff292 Make horizontal scrolling work in Deskbar
* Split the Leaf menu and seperator into their own menubar.
* I got rid of a lot of special cases for horizontal in the
  ExpandoMenuBar class because now the menubar contains the same
  items as in vertical mode. However, it also means that the dreaded
  <none> bug also affects horizontal mode.
* Make the application menubar resize itself even in horizontal mode.
  This means that the view background shows through so I'm going to have
  to fix this up.
* Calculate when to add the scroll arrows and how much to allow the user
  to scroll by for horizontal. CheckItemSizes() got a big refactoring.
* Rework the InlineScrollView class a bit. It no longer requires you to
  specify the begin and end limits on construction because it can
  calculate them instead. It also no longer depends on the screen at all,
  this means this class can be extened to be used more generally and in
  more places.
2012-11-12 22:03:22 -05:00
John Scipione
e6d8c22a7d WIP: Add support for horizontal scrolling. 2012-11-12 22:03:21 -05:00
John Scipione
255853fe15 Add left and right Scrollers and also an orientation parameter. Set the limit based on the view bottom and not the window bottom. 2012-11-12 22:03:21 -05:00
John Scipione
32f840b768 Rename ScrollArrowView to InlineScrollView
InlineScrollView takes a BView instead of a BMenu as well, and it
no longer has flags to do drawing respond to frame changes since
this view does neither of those things.
2012-11-12 22:03:20 -05:00
John Scipione
e06f13f911 Replace a deleted comment, check parent is not NULL before using it. 2012-11-12 22:03:20 -05:00
John Scipione
9c5644aa09 Detach the scrollbars before deleting fExpando.
... when rebuilding the application bar.

This fixes a Deskbar crash on resolution change because the lower
scrollbar is a child of fExpando so it must be removed and deleted
before fExpando is. So the tear down is remote scroll arrows
(if attached) then remote fExpando, then remove the scroll arrow
container view. The application bar is then rebuilt in reverse.
2012-11-12 22:03:19 -05:00
John Scipione
36ac19ebc1 Make the lower arrow a child of the menu instead.
When you scroll, make the lower arrow scroll the same way to give
the illusion that it isn't moving at all.

So, now both arrows scroll on MouseDown, but, Deskbar crashes on
resolution change.
2012-11-12 22:03:19 -05:00
John Scipione
fcfe60b02e Renamed BMenuScrollView to TScrollArrowView and moved it into Deskbar
Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works
but the down arrow doesn't because the sibling menu is stealing the
MouseDown event."
2012-11-12 22:03:18 -05:00
John Scipione
d7b5131b1a Set fValue and fLimit to be 0 in the MenuScrollView contructor. 2012-11-12 22:03:18 -05:00
John Scipione
afa1c29104 Tweaks, remove dead code. Menu and Menubar are stock again. 2012-11-12 22:03:18 -05:00
John Scipione
7ee3b479d1 Make the MenuScrollView a fixed size...
instead of trying to make it follow fExpando just make it a fixed
size on creation. It is invisible and extends to the bottom of the
screen. fExpando grows inside it, and the window follows fExpando.
When the window grows taller than the screenframe the arrows are
added. You can scroll with the mouse wheel, but I haven't yet gotten
scrolling to work from clicking. Deskbar still crashes when going
from Mini mode to vertical expando mode. I have no idea why.
2012-11-12 22:03:17 -05:00
John Scipione
49ff476d13 Make ScrollMenu not rely on Menu.cpp
Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.
2012-11-12 22:03:17 -05:00