Commit Graph

45727 Commits

Author SHA1 Message Date
John Scipione
935599c53f Revert "Info: Set fixed size true for pref app menu field"
This reverts commit 879020baf1.
2013-05-09 21:29:11 -04:00
Rene Gollent
3313492032 Fix memory leaks introduced in previous commits. 2013-05-09 17:31:42 -04:00
Adrien Destugues
2b67ff2420 Add AddText method to AboutWindow
* Factor out the code to add some data to the about window, with a header and a content under it
 * Make this method public so it's possible to add custom entries in an about box
 * If the method is called with only the header or only the content, the text is added non-bold and non-indented (like the description entry*).
 * Make the header text bold. I'm not sure it looks that good, after all. Thoughts ?
2013-05-09 21:27:43 +02:00
Jérôme Duval
01c5671de8 midi kit, media_addon_server, mail_server: fixes 64 bit warnings 2013-05-09 18:11:19 +02:00
Jérôme Duval
24dba16d04 usb_serial: fixes 64 bit warnings 2013-05-09 17:40:35 +02:00
Jérôme Duval
0e8bd8493a usb_ecm: fixes 64 bit warnings 2013-05-09 17:38:13 +02:00
Jérôme Duval
19d7d464e5 usb_asix: fixes 64 bit warnings 2013-05-09 17:33:27 +02:00
Jérôme Duval
56dc5af735 usb_davicom: fixes 64 bit warnings 2013-05-09 17:30:06 +02:00
Jérôme Duval
6849e7cc15 cx23882: fixes 64 bit warnings 2013-05-09 17:24:09 +02:00
Jérôme Duval
4e159473a9 nbd: fixes 64 bit warnings 2013-05-09 17:05:06 +02:00
Jérôme Duval
d47767ba38 usb_printer: fixes 64 bit warnings 2013-05-09 16:46:02 +02:00
Jérôme Duval
69a33f8c3c usb_floppy: fixes 64 bit warnings 2013-05-09 16:40:49 +02:00
Jérôme Duval
f0704f6ba4 usb_raw: fixes 64 bit warnings 2013-05-09 16:22:15 +02:00
Jérôme Duval
2f66d0df8e usb_midi: fixes 64 bit warnings 2013-05-09 16:16:43 +02:00
Jérôme Duval
1f6d4bcfd3 echo: fixes 64 bit warnings 2013-05-09 16:03:38 +02:00
Jérôme Duval
e825d892e1 efi_gpt: fixes 64 bit warnings 2013-05-09 15:53:50 +02:00
Jérôme Duval
9bc120ace1 mpu401: fixes 64 bit warnings 2013-05-09 15:45:30 +02:00
Jérôme Duval
7e5b0f9649 udf: fixes 64 bit warnings 2013-05-09 15:44:10 +02:00
Jérôme Duval
5a58ea80cf nfs: fixes 64 bit warnings 2013-05-09 15:08:11 +02:00
Rene Gollent
e1fff3ea3a Build fix. 2013-05-09 07:24:13 -04:00
Rene Gollent
a69facf051 Implement #9756. ImageFunctionsView now builds...
...a source path-based tree of all the image's functions, and
consequently organizes them into a nested hierarchy similar to the
on-disk directory structure in which they were originally found (or at
least, as close as we can get from the DWARF info).
2013-05-08 23:26:12 -04:00
John Scipione
879020baf1 Info: Set fixed size true for pref app menu field
Fixes #9753

This changes the preferred app menu field to no longer resize itself
based on the item width and instead always take up the rest of the
available space in the window. For narrower items this means that there
will be empty space to the right where there wasn't before. For items
wider than the available width of the window (like the example in #9753)
this means that the item will be truncated when selected.

AFAIK this was always a problem and was not caused by my recent work on
menu fields, we just didn't notice it because it's rare that an application
name in English at the default 12pt font size is wider than the available
space.

That being said, this fix is a band aid, the real fix is to convert this
window to use the layout APIs so that if you have an application that is too
wide to fit then the window will resize itself to fit the new item. There are
other some layout problems in this window too. Unfortunately, like Find, this
window has not been updated in aldeck's Tracker layout branch. Luckily,
converting this window to use the layout API is a lot less work than Find was.
2013-05-08 14:26:45 -04:00
John Scipione
ec1f08fb05 Resize menu field menu bar iff fFixedSize is true
If the menu field is not fixed size than the width of the menu bar
should depend on the menu item contents so just do the default and
get the Bounds() without any extra resizing.
2013-05-08 14:26:45 -04:00
John Scipione
a61d468cf9 BMenuItem: Round to prevent unneeded truncation
The case I fear is if frameWidth is 99.999999 and labelWidth is 100.0
it will attempt to perform a truncation unnecessarily.
2013-05-08 14:26:44 -04:00
Jérôme Duval
a130bab351 ext2: fixes 64 bit warnings 2013-05-08 20:10:33 +02:00
Rene Gollent
df720531e3 Use B_USE_SMALL_{SPACING,INSETS} as suggested by Axel. 2013-05-07 22:59:35 -04:00
John Scipione
6ba46ced85 Reinit offscreen bitmap when set keyboard layout
Fixes #9345
2013-05-06 21:16:24 -04:00
Rene Gollent
4efba5fd99 Use default spacing for inspector's groups too. 2013-05-06 18:47:17 -04:00
John Scipione
e28ba280de BMCPrivate: Cleanup
Remove no longer needed header includes, most that I recently added
a few that were already there but just aren't needed anymore. Don't
use BPrivate::MenuPrivate namespace.
2013-05-06 18:29:34 -04:00
John Scipione
c1a7e89fc2 Put the label truncation code back in BMenuItem.
Just a few commits ago I moved the label truncation code out of
BMenuItem and into BMCMenuBar because the truncation had to happen
outside of BMenuItem. Turns out, that wasn't true so I'm moving the
label truncation back into BMenuItem and removing the _DrawItems()
method from BMCMenuBar.

Note that the code is not a copy of what was there before, but, the
updated version I created for BMCMenuBar. The main difference is that
I use menuPrivate.Padding() instead of GetItemMargins() and I always
use the width of the parent menu frame instead of using fBounds even
if the state is not MENU_STATE_CLOSED. These are changes needed for
BMCMenuBar but should work just as well for a regular BMenu.
2013-05-06 17:55:33 -04:00
John Scipione
13cec30211 Find: set a max width on each of the menu fields
... instead of the just on the mime type menu now that
menu field truncation is working. This will prevent the
volume menu growing too wide as well.
2013-05-06 17:23:59 -04:00
John Scipione
c333966291 Draw truncated menu label in BMCPrivate, fixes #9735
...instead of in BMenuItem and remove the truncation code from BMenuItem.

The label truncation code cannot work in BMenuItem because the super
menu helpfully resizes itself to fit the menu item. So, instead we do the label
truncation in BMCPrivate making sure that BMenuItem there can't expand the
BMCMenuBar because we set the width to fMenuField->_MenuBarWidth()
explicity.

Note that this only truncates the label in BMCMenuField, i.e. the label inside
the menufield, it does nothing to the labels of the menu items in the attached
BMenu or BPopUpMenu which is exactly what we want.
2013-05-06 17:15:20 -04:00
John Scipione
1afff67178 Set some static variables for magic number constants 2013-05-06 17:15:20 -04:00
John Scipione
4e1b19207a Refactor BMenuField::DrawLabel()
also use std::max() instead of max_c()
2013-05-06 17:15:19 -04:00
John Scipione
2bf1592a70 Rework layout-enabled contructor for BMCMenuBar
Was passing !fixedSize into the view flags of BMenuBar, which made no sense.
Stop doing that, set fixedSize to true instead.

Remove the fixedSize parameter from this contructor, it's too late for that.
2013-05-06 17:15:19 -04:00
John Scipione
6c1452071c Remove pre-ControlLook drawing code in menu classes 2013-05-06 17:15:19 -04:00
John Scipione
d218f0f822 Put the BMenuBar initilization on it's own line 2013-05-06 17:15:18 -04:00
John Scipione
d5c51ba676 Update header comments 2013-05-06 17:15:18 -04:00
John Scipione
d97b434060 Style fixes to BMenu and related classes. 2013-05-06 17:15:17 -04:00
Jérôme Duval
3f5d1e7825 exfat: fixes 64 bit warnings 2013-05-06 22:41:07 +02:00
Jérôme Duval
575eeda9a5 cdda: fixes 64 bit warnings 2013-05-06 22:41:06 +02:00
Jérôme Duval
267a780ab5 btrfs: fixes 64 bit warnings 2013-05-06 22:41:05 +02:00
Axel Dörfler
a1566b06b7 bfs: removed kernel_cpp.h's new operator.
* This fixes bug #9715 from the POV of BFS, ie. the new operator seems
  to call the constructor on a NULL object on failure.
2013-05-06 21:45:50 +02:00
Matt Madia
c0f529c38b VL-Gothic fonts is updated to version 20130422. Fixes #9706. 2013-05-05 17:16:46 -04:00
Rene Gollent
1b17f7ab00 Fix x86-64 build. 2013-05-05 16:57:51 -04:00
Rene Gollent
1b10489347 Add listener interface to MemoryView.
- When the target address of the memory view changes, an attached
  listener is now notified. This lets the inspector window's text input
  keep in sync with the current address when keyboard navigating the
  memory view.
2013-05-05 16:08:31 -04:00
Ingo Weinhold
5af6169bb2 x86[-64]: Fix arch_cpu_user_strlcpy() for small buffers
The case for small buffers was broken, since scasb operates on edi/rdi,
not esi/rsi.
2013-05-05 15:46:32 -04:00
Michael Lotz
ec4d0e426d BMediaNode: Handle port read syscall interrupts by retrying.
The syscall might be interrupted, especially in signal heavy
applications. In that case we need to retry the read until the timeout
runs out. since the timeout is already absolute we don't need to adjust
anything.
2013-05-05 21:16:45 +02:00
Rene Gollent
ab2e15ab8c Use default insets for inspector window as well. 2013-05-05 13:34:07 -04:00
Rene Gollent
2253368e6a Implement #8671.
Smarter Zoom behavior for TeamsWindow - resize such that the
team list view's horizontal scrollbar isn't needed.
2013-05-05 13:14:24 -04:00