Author: tqh Date: 2011-03-05 17:22:42 +0100 (Sat, 05 Mar 2011) New Revision: 40817 Changeset: http://dev.haiku-os.org/changeset/40817 Modified: haiku/trunk/src/apps/deskbar/BeMenu.h haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp haiku/trunk/src/apps/deskbar/DeskBarUtils.h Log: Even more style clean up patches by John Scipione from bug 7052. (I modified BeMenu.h to have consistent style for pointer variables.) Modified: haiku/trunk/src/apps/deskbar/BeMenu.h =================================================================== --- haiku/trunk/src/apps/deskbar/BeMenu.h 2011-03-05 16:14:52 UTC (rev 40816) +++ haiku/trunk/src/apps/deskbar/BeMenu.h 2011-03-05 16:22:42 UTC (rev 40817) @@ -26,9 +26,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Be Incorporated. -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. +Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered +trademarks of Be Incorporated in the United States and other countries. Other +brand product names are registered trademarks or trademarks of their respective +holders. All rights reserved. */ @@ -42,7 +43,7 @@ class TBarView; enum recent_type { - kRecentDocuments = 0, + kRecentDocuments = 0, kRecentApplications, kRecentFolders, kRecentAppDocuments @@ -69,15 +70,15 @@ private: int32 fWhich; - entry_ref *fAppRef; - char *fSignature; + entry_ref* fAppRef; + char* fSignature; int32 fRecentsCount; bool fRecentsEnabled; int32 fItemIndex; BMessage fRecentList; - - TBarView *fBarView; + + TBarView* fBarView; }; @@ -102,7 +103,7 @@ void AttachedToWindow(); void DetachedFromWindow(); - void ResetTargets(); + void ResetTargets(); static BMessenger DefaultTarget(); @@ -118,15 +119,15 @@ bool AddStandardBeMenuItems(); - private: - virtual bool StartBuildingItemList(); + private: + virtual bool StartBuildingItemList(); virtual void DoneBuildingItemList(); - virtual bool AddNextItem(); - virtual void ClearMenuBuildingState(); + virtual bool AddNextItem(); + virtual void ClearMenuBuildingState(); - // to keep track of the menu building state - State fAddState; - TBarView *fBarView; + // to keep track of the menu building state + State fAddState; + TBarView* fBarView; }; #endif /* _BE_MENU_H_ */ Modified: haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp 2011-03-05 16:14:52 UTC (rev 40816) +++ haiku/trunk/src/apps/deskbar/CalendarMenuWindow.cpp 2011-03-05 16:22:42 UTC (rev 40817) @@ -24,7 +24,7 @@ using BPrivate::B_WEEK_START_MONDAY; -// #pragma mark -- FlatButton +// #pragma mark -- FlatButton class FlatButton : public BButton { @@ -66,7 +66,7 @@ } -// #pragma mark -- CalendarMenuWindow +// #pragma mark -- CalendarMenuWindow enum { Modified: haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h =================================================================== --- haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h 2011-03-05 16:14:52 UTC (rev 40816) +++ haiku/trunk/src/apps/deskbar/CalendarMenuWindow.h 2011-03-05 16:22:42 UTC (rev 40817) @@ -17,17 +17,18 @@ namespace BPrivate { class BCalendarView; } -using BPrivate::BCalendarView; + using BPrivate::BCalendarView; + class CalendarMenuWindow : public BWindow { public: CalendarMenuWindow(BPoint where); virtual ~CalendarMenuWindow(); - virtual void Show(); - virtual void WindowActivated(bool active); - virtual void MessageReceived(BMessage* message); + virtual void Show(); + virtual void WindowActivated(bool active); + virtual void MessageReceived(BMessage* message); private: void _UpdateUI(const BDate& date); Modified: haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp =================================================================== --- haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp 2011-03-05 16:14:52 UTC (rev 40816) +++ haiku/trunk/src/apps/deskbar/DeskBarUtils.cpp 2011-03-05 16:22:42 UTC (rev 40817) @@ -26,9 +26,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Be Incorporated. -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. +Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered +trademarks of Be Incorporated in the United States and other countries. Other +brand product names are registered trademarks or trademarks of their respective +holders. All rights reserved. */ @@ -60,11 +61,11 @@ int32 count = 0; uint32 type = 0; entry_ref ref; - + m->GetInfo("refs", &type, &count); if (count <= 0) return; - + BPath path; BSymLink link; BDirectory dir; @@ -72,8 +73,7 @@ ref = *subdirectory; BEntry entry(&ref); if (entry.Exists()) { - // if the ref is a file - // get the parent and convert it to a ref + // if the ref is a file get the parent and convert it to a ref if (entry.IsFile()) { BEntry parent; entry.GetParent(&parent); @@ -81,7 +81,7 @@ } } else return; - + dir.SetTo(&ref); } else { if (find_directory(B_USER_DESKBAR_DIRECTORY, &path) == B_OK) @@ -89,13 +89,12 @@ else return; } - + for (long i = 0; i < count; i++) { if (m->FindRef("refs", i, &ref) == B_NO_ERROR) { - BEntry entry(&ref); entry.GetPath(&path); - + dir.CreateSymLink(ref.name, path.Path(), &link); } } Modified: haiku/trunk/src/apps/deskbar/DeskBarUtils.h =================================================================== --- haiku/trunk/src/apps/deskbar/DeskBarUtils.h 2011-03-05 16:14:52 UTC (rev 40816) +++ haiku/trunk/src/apps/deskbar/DeskBarUtils.h 2011-03-05 16:22:42 UTC (rev 40817) @@ -26,9 +26,10 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Be Incorporated. -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. +Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered +trademarks of Be Incorporated in the United States and other countries. Other +brand product names are registered trademarks or trademarks of their respective +holders. All rights reserved. */