Commit Graph
100 Commits
Author SHA1 Message Date
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 e32c26f1c7 Notification preflet: add margin to views in TabView 2012-07-23 21:53:33 -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 b6a70ecba9 ProcessController: fix display of CPU bars for systems having 3 cores
Generalize the drawing of separator lines for every number of cores
requesting them.

Fix the layout for 3 cores systems.

Should fix #8763.
2012-07-23 10:16:37 -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 5cf20610e1 FontDemo: Further cleanup
the strlen was used also in _AddShapes.  Widen use of BString.

Sorry for the noise!
2012-07-21 12:58:05 -04:00
Philippe Saint-Pierre c5e8e32acd FontDemo: Cleanup of previous UTF-8 compliancy fix
Avoid using the private API, rather use the public BString. Thanks mmlr.
2012-07-21 12:23:18 -04:00
Philippe Saint-Pierre 6b0362305f FontDemo: make it multibyte chars compliant (UTF-8)
fixes #8146.
2012-07-21 11:17:41 -04:00
Philippe Saint-Pierre 2d5785ba12 CID 611239: Fix resource leak 2012-07-20 21:50:13 -04:00
Philippe Saint-Pierre cb1f2e6525 Precedence of operators issues
Bitwise OR is taking precedence on Conditional operator.

CID 701957, CID 602560
2012-07-20 18:31:44 -04:00
Philippe Saint-Pierre 599150a3fc CID 701957: opendir() NULL returns weren't accounted for. 2012-07-20 18:31:44 -04:00
Philippe Saint-Pierre 8f226f2e87 CID 602195: use sizeof() of structure rather than pointer 2012-07-20 18:31:43 -04:00
Philippe Saint-Pierre a65ef31585 CID 609036: Avoid to exceed length of string 2012-07-20 18:31:43 -04:00
Philippe Saint-Pierre cd383c3378 CID 610802: Unchecked return of FindMessage() 2012-07-20 18:31:43 -04:00
Philippe Saint-Pierre c6df3cf4dc CID 702244: Uninit members were never used 2012-07-20 18:31:42 -04:00
Philippe Saint-Pierre 739ed61c38 CID 709703: Order of ops was unclear, but insignificant 2012-07-20 18:31:42 -04:00
Philippe Saint-Pierre fc4d98a2c0 Coding style fixes, no functionnal changes.
Following comments from Axel about a previous commit of mine.  Sorry Axel for the delay.
2012-07-20 14:28:44 -04:00
Philippe Saint-Pierre b78760b964 Replace several hard-coded paths with find_directory calls 2012-06-25 21:09:55 -04:00
Philippe Saint-Pierre b271ff3f4e SoundRecorder: UI fixes
* Remove several hard-coded colors
* Reduce slightly the font size in the file info panel (#6909).
* Don't hardcode the font height, compute it
* Fix a bug where deploying the bottom panel makes the current
  window width the new minimum width
* Don't hardcode the bottom panel's height, compute it
  (allows better font size tolerance).
2012-06-25 18:35:28 -04:00
Philippe Saint-Pierre c4e5472a71 FFMPEG: Remove unnecessary #include statements
They were included because of earlier tests.
Thanks Korli for the heads-up! (and sorry for the noise..)
2012-06-25 13:52:31 -04:00
Philippe Saint-Pierre 36784bbc2c StringForRate(): adjustments
* Make 1000.0f the default base
* Also use sizeof() in MediaPlayer to get the string size rather than hardcode.

Thanks Marcus
2012-06-25 13:43:53 -04: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
Philippe Saint-Pierre 9741d697e8 FFMPEG Copyright(): Fix memory leak
Fix a memory leak I introduced.  Followed Stippi's suggestion. Thanks!
2012-06-25 11:05:01 -04:00
Philippe Saint-Pierre c589e68f42 MediaPlayer InfoWindow: Add Bitrate info, fix duration display
* The duration minutes didn't include a leading zero when necessary
* Added Bitrate info (#7782)
2012-06-24 20:49:34 -04:00
Philippe Saint-Pierre 4dea247cee ffmpeg: implement Copyright() (resolves TODO) + typo fix 2012-06-24 20:47:39 -04:00
Philippe Saint-Pierre 919d3b7601 Pulse deskbar replicant couldn't be removed. Fixes #4244. 2012-06-16 14:08:53 -04:00
Philippe Saint-Pierre 163cd4bf53 Prevent ressource leak in time preferences (ntp update) CID 702055. 2012-06-10 16:57:45 -04:00
Philippe Saint-Pierre f1e0212d72 top: Attempt to avoid negative "(unknown)" %
Top was using the 'theorical' interval value to determine the percentages.
The measured thread times were taken in an always a bit larger interval than
that theorical value, hence the negative '%' occuring regularly.

Should fix #4589.
2012-05-08 21:09:36 -04: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
Philippe Saint-Pierre 42ae726e67 setgcc: add -l argument to ls call in script
In previous, it was still working as I was more interested into != 0 than
exact count. Still, for clarity sake, I add -l to get the actual count.

Thanks Axel.
2012-05-06 15:52:04 -04:00
Philippe Saint-Pierre 85fb3e7df8 setgcc: error message
The bash script tried to verify the existence of a file,
but there were several fils fitting the wildcard expression.
So, [ -e .../*gcc ]; was interpreted as if it had too many
arguments.  Replaced that expression by a count of files.

Fixes #8493.
2012-05-05 23:55:19 -04:00
Philippe Saint-Pierre 501546ee8f MediaPlayer: Looping regardless of setting
* Fixed a regression I introduced in hrev43642. Ticket #8364.
* Small coding style fix
2012-05-05 22:32:09 -04:00
Philippe Saint-Pierre 7ee685d20c Desklink: Close the Volume Window after dropping the replicant
When dropping a replicant of the Volume Control, close the volume window.

Enhancement #7718.
2012-02-22 20:00:43 -05:00
Philippe Saint-Pierre c90ebe1e5a CPUFrequency replicant
Use be_control_look to outline label (and change text color) when needed.
2012-02-22 19:25:11 -05:00
Philippe Saint-Pierre d63b75faf8 Outline of labels/strings drawn to desktop
* Rather than duplicating the decision taking logic involving wheter or not to draw
the outline or glow in every replicant, update be_control_look to make it more
generic.
* The Monitoring of the background preferences is now only done in Tracker (where it
was already being done).
* Add a BControlLook::B_IGNORE_OUTLINE flag to avoid this new behaviour.
* Remove that said logic from ActivityMonitor and use be_control_look.
* Use the ignore flag in DeskCalc to avoid the outline in its case.

Should fix #7716, #7291.
2012-02-22 19:06:22 -05:00
Philippe Saint-Pierre 4020aec13e Installer: minor memory leak fix. CID 1713. 2012-01-31 21:39:23 -05:00
Philippe Saint-Pierre 74983a5f69 shortcut_catcher: memory leak fixes
memory allocated in get_key_map(..) wasn't released.

CID 5696, CID 5697, CID 1699, CID 1700
2012-01-07 20:42:19 -05:00
Philippe Saint-Pierre a5a013ca40 MediaPlayer: Fix movement of items in playlist
In Playlist, whenever a move of items occured causing the
currently playing song to change its position, so :
1. Importing files (D&D for example) before its position
2. Removings files before it
3. Moving files before it

was causing the currently playing song to restart because
it was thinking a new entry was asked (it had a different
index number suddently).

Also adjusted the behaviour when you delete the currently
playing track.

Should fix ticket #6689.
2012-01-07 17:29:46 -05:00
Philippe Saint-Pierre 581a96616a Tracker: Fix inconsistent "Open parent" behaviour
1. When in /boot, you couldn't go to the parent (which is fine by itself),
but the menu item wasn't disabled.

2. In Single Window Browsing, doing "Open parent" wasn't respecting that
setting and was opening new windows.

3. In filepanel, when navigating to Desktop folder, the "Go to parent" was
still proposed even though it would do nothing choosing it.

4. Opening a Pose in Single Window Browsing was repopulating the menus and
putting the shortcuts again.  That was an issue if Navigator bar was used
since it conflicts with its shortcuts.

Fixing ticket #6851.
2012-01-05 21:44:11 -05:00
Philippe Saint-Pierre bac3774d59 MediaPlayer: Double-click on playlist item to restart it
Double-clicking on the currently playing playlist item restart that
item's playback from the beginning.

Ticket #6560.
2012-01-05 18:28:21 -05:00
Philippe Saint-Pierre 8df5e79d2c Tracker: FSMoveToTrash(): needless check and possible crash fix
In an earlier commit, I removed a memleak, but it was covering more cases
than intended.  Thanks to Alex Wilson's insight, it seems that simply removing
the check is better (since that check is essentially redone in FSMoveToTrash()).
2012-01-05 17:55:12 -05:00
Philippe Saint-Pierre f91a2037a5 intel accelerant: NULL dereferences (overlays)
Rather than checking if "window" AND "view" are NULL, check if
"window" OR "view" are NULL, since neither could be null and deferenced later
on.

From the Matrox accelerant, it seems that such event occurs when a
"Workspace switch, screen prefs change, or overlay app shutdown occurs"

Might be interesting to revisit tickets related to intel accelerant.

CID 205.
2012-01-04 20:48:15 -05:00
Philippe Saint-Pierre 97f16764c7 Tracker: Memory leak fix
The leak occured everytime a folder, or queries where opened while
navigating.

CID 5848.
2012-01-04 19:51:26 -05:00
Philippe Saint-Pierre dafbb16406 Tracker (FSUtils): negative passed to unsigned parameter
BVolume::BlockSize() might return a negative value (error code) and it
was passed as parameter of CalcItemsAndSize() as a size_t (unsigned).

Thus the check for an error code failed.

CID 4171.
2012-01-04 19:31:17 -05:00
Philippe Saint-Pierre aa11dcae4d Tracker (InfoWindow): small memory leak fix
In the case of a broken symlink, a Model object was leaked when trying
to get the icon of the target.

CID 5844.
2012-01-04 19:23:12 -05:00
Philippe Saint-Pierre c56f0ce1c3 FindPanel: Avoid NULL deference; CID 352. 2012-01-04 18:44:21 -05:00
Philippe Saint-Pierre d390c06551 PoseView: Fix assertion in InitDirentIterator
The dynamic_cast was called twice, and the assert was
done on the first attempt. Now it just cast once, assert on this
and pass it further as before.

CID 3122.
2012-01-04 18:11:12 -05:00
Philippe Saint-Pierre fcfd687380 Tracker: memory leak fix
In MoveRefsToTrash(), the srcList wasn't deleted after usage.

CID 5849.
2012-01-04 00:01:26 -05:00
Philippe Saint-Pierre f30530e387 ffmpeg (gif codec): Init len variable
It was already fixed upstream. CID 9309.
2012-01-03 23:35:14 -05:00
Philippe Saint-Pierre 1923ea178d ffmpeg: infinite loop (als decoder)
CID 3176.  Patch proposed upstream.
2012-01-03 22:49:01 -05:00
Philippe Saint-Pierre 9d991e3c99 Firewire: uninit buffers returned
Probably a copy-paste error caused the wrong variables being returned
in fw_xfer_alloc_buf() for the received transfers.

CID 10746.
2012-01-03 20:24:17 -05:00
Philippe Saint-Pierre f08709bbea No functional change; invert the order of includes. 2012-01-03 18:51:25 -05:00
Philippe Saint-Pierre 82556487af MediaConverter: Move a NULL check
To avoid a NULL dereference, moving a NULL check earlier.

CID 5955.
2012-01-02 23:27:59 -05:00
Philippe Saint-Pierre 7cd8f5f9b9 TextView: initialize buttons variable
CID 10751.
2012-01-02 22:46:30 -05:00
Philippe Saint-Pierre f54fc2dcfe Terminal: NULL dereference fix
An inversion in a condition could lead to a NULL dereference.

CID 11039.
2012-01-02 22:30:28 -05:00
Philippe Saint-Pierre 4040b622f4 VM: Memory leak fix in case of bad driver settings file
CID 5891.
2012-01-02 22:12:09 -05:00
Philippe Saint-Pierre 7d0a351c0a Wonderbrush translator: memory leak fix
A Buffer in archive_bitmap wasn't free'd upon completion. CID 5751.
2012-01-02 21:29:02 -05:00
Philippe Saint-Pierre c5e599ac1a IconUtils: memory leak fix
The intermediate step BBitmap in scale2x wasn't deleted. CID 10692.
2012-01-02 21:07:55 -05:00
Philippe Saint-Pierre 0891b95e63 Installer: Resource leak fix (CID 10693). 2012-01-02 20:54:49 -05:00
Philippe Saint-Pierre fccd8899fc People: memory leak fix. CID 10694. 2012-01-02 19:27:21 -05:00
Philippe Saint-Pierre be6c4d6a5d mail kit: fix memory leak.
CID 896.
2012-01-02 19:13:28 -05:00
Philippe Saint-Pierre 728d429e7d spamdbm: use the std::nothrow variant of new operator. 2012-01-02 18:55:19 -05:00
Philippe Saint-Pierre d79ded8a44 Mail: various checks of malloc returns + memory leak fix
CID 891.
2012-01-02 18:32:38 -05:00
Philippe Saint-Pierre 0106325bc4 Time preference: Fix a memory leak
Accidentally introduced with an earlier commit.
2012-01-02 16:52:52 -05:00
Philippe Saint-Pierre 93f68d97bf ProcessController: fix a small resource leak
fSettingsFile wasn't deleted in the destructor.  CID 1414.
2012-01-02 14:55:55 -05:00
Philippe Saint-Pierre 9e4224613c SoundFile.cpp: do a NULL check before deferencing.
CID 296.
2012-01-02 14:26:07 -05:00
Philippe Saint-Pierre e9132cc34c Time preferences: use std::nothrow variant of new operator
Also make sure to avoid an eventual negative array size. CID 10934.
2012-01-02 13:54:39 -05:00
Philippe Saint-Pierre 9668d19918 echo driver: replace usage of strncpy by strlcpy
Usage of strncpy in this context could lead to a non null terminated string.
various coding style fix.

CID 2217.
2012-01-02 13:19:30 -05:00
Philippe Saint-Pierre e480c1b658 echo driver: replace strncpy by strlcpy
using strncpy could possibly lead to a non null terminated string.
also some coding style fix.

CID 2216.
2012-01-01 19:42:16 -05:00
Philippe Saint-Pierre 12892428fc cmedia driver: coding style fix 2011-12-31 17:07:30 -05:00
Philippe Saint-Pierre 848762a7d4 firewire: unchecked return of acquire_sem_etc, coding style 2011-12-31 16:41:01 -05:00
Philippe Saint-Pierre a527d1d5b8 NFS: various checks added if malloc succeeded. (also coding style fix). 2011-12-31 00:14:47 -05:00
Philippe Saint-Pierre f8464b965d dp83815 network driver: replace sprintf by snprintf, code style 2011-12-30 21:57:00 -05:00
Philippe Saint-Pierre a42c52c07e devfs: Fix memory leak
Following r25662 (where devfs was migrated to the new driver architecture),
the issue noted in CID 872 and already fixed in r25643 was reintroduced.
2011-12-30 20:50:48 -05:00
Philippe Saint-Pierre fbbed9473f AC97 driver: replace some usage of strcpy() by strlcpy()
CID 8921, CID 8920, CID 8919, CID 8922.  Also fixes some coding
style issues.
2011-12-30 00:08:00 -05:00
Philippe Saint-Pierre c7199625ef Marvell Wifi driver: NULL check before dereferencing
CID 5911.
2011-12-29 23:27:44 -05:00
Philippe Saint-Pierre 258c1019f1 usb_disk: avoid to use variables after having been free'd()
CID 10543
2011-12-29 22:58:52 -05:00
Philippe Saint-Pierre eb94592703 acpi_manager: Uninit var returned in EcRead()
In case of failure in EcRead(), rather than returning the proper status,
an uninit variable was returned. CID 11145.
2011-12-29 17:37:58 -05:00
Philippe Saint-Pierre 5e783d6ad7 libgutenprint: channel.c: Defer assigment after NULL check
To avoid hypothetical NULL dereference. CID 10821, CID 10822

(patch sent upstream)
2011-12-29 15:51:38 -05:00
Philippe Saint-Pierre 3ad5b0818e ATA bus_manager: return value (signed) put in unsigned variable
This might have been occulting an eventual error code.

CID 4095.
2011-12-29 14:54:47 -05:00
Philippe Saint-Pierre 91a7326a04 Fix wrong order of arguments in memset()
CID 4119.
2011-12-29 14:29:43 -05:00
Philippe Saint-Pierre d2a423e499 driver_settings: Replace type of bufferSize from size_t to ssize_t
At various locations, checks are made so that bufferSize is >= 0, which never
occurs. CID 4197.
2011-12-29 14:08:15 -05:00
Philippe Saint-Pierre b6e4d1a9dc BufferedDataIO::Flush(), use ssize_t rather than size_t
Write() was returing an ssize_t and Flush() was expecting a ssize_t,
but a size_t was instead used. CID 11052.
2011-12-29 13:43:15 -05:00
Philippe Saint-Pierre 114ab70975 Change style of boolean expression to enhance readability. 2011-12-29 12:40:32 -05:00
Philippe Saint-Pierre 0fa5c8f528 Constant expression result
Usage of | rather than & to check a binary mask.  CID 11031.
2011-12-27 23:27:20 -05:00
Philippe Saint-Pierre 00e081a1ec Fix coding style violation 2011-11-28 13:00:43 -05:00
Philippe Saint-Pierre 04847eccdf Fix style coding violation (possibly causing confusion) 2011-11-28 12:58:31 -05:00
Philippe Saint-Pierre f6bd30f2af Partitioning system: avoid leakage of resource
The storage returned from GetSession() was leaked

CID 10827
2011-11-27 23:35:36 -05:00
Philippe Saint-Pierre 342169dfe2 Fix resource leakage
CID 10828
2011-11-27 23:24:18 -05:00
Philippe Saint-Pierre 9f66f05b58 Fix never met condition
(descriptor & 0x10)==1 could never be met, it would return 0x10 or 0x00

CID 2567
2011-11-27 18:42:17 -05:00
Philippe Saint-Pierre 4d5d809045 No functional changes. Improve readability.
Thanks Axel!
2011-11-27 18:13:13 -05:00
Philippe Saint-Pierre ec9e2f9018 No functional change, avoid confusion in Coverity about exceptions
CID 9248, CID 9250, CID 10844, CID 10977, CID 10978, CID 10979, CID 10980,
CID 10981, CID 10982, CID 10983
2011-11-27 17:47:45 -05:00
Philippe Saint-Pierre 8e844f63e9 Fix bogus argument validation
* The comparaison couldn't ever not match. Based on the comment above the
  function, I made it so that flags must contain at least one of B_WATCH_NAME,
  B_WATCH_STAT or B_WATCH_ATTR

CID 2586
2011-11-27 13:24:43 -05:00