Fixed all warnings in Shortcuts preflet and enabled -Werror for it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38186 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1411,7 +1411,7 @@ if $(HAIKU_NO_WERROR) != 1 {
|
|||||||
EnableWerror src preferences print ;
|
EnableWerror src preferences print ;
|
||||||
EnableWerror src preferences screen ;
|
EnableWerror src preferences screen ;
|
||||||
EnableWerror src preferences screensaver ;
|
EnableWerror src preferences screensaver ;
|
||||||
# EnableWerror src preferences shortcuts ;
|
EnableWerror src preferences shortcuts ;
|
||||||
EnableWerror src preferences sounds ;
|
EnableWerror src preferences sounds ;
|
||||||
EnableWerror src preferences time ;
|
EnableWerror src preferences time ;
|
||||||
EnableWerror src preferences touchpad ;
|
EnableWerror src preferences touchpad ;
|
||||||
|
|||||||
@@ -693,12 +693,12 @@ ShortcutsSpec::ProcessColumnKeyStroke(int whichColumn, const char* bytes,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
int newCharLen = strlen(bytes);
|
uint32 newCharLen = strlen(bytes);
|
||||||
if ((newCharLen > 0) && (bytes[0] >= ' ')) {
|
if ((newCharLen > 0) && (bytes[0] >= ' ')) {
|
||||||
bool reAllocString = false;
|
bool reAllocString = false;
|
||||||
// Make sure we have enough room in our command string
|
// Make sure we have enough room in our command string
|
||||||
// to add these chars...
|
// to add these chars...
|
||||||
while ((int)fCommandLen - fCommandNul <= newCharLen) {
|
while (fCommandLen - fCommandNul <= newCharLen) {
|
||||||
reAllocString = true;
|
reAllocString = true;
|
||||||
// enough for a while...
|
// enough for a while...
|
||||||
fCommandLen = (fCommandLen + 10) * 2;
|
fCommandLen = (fCommandLen + 10) * 2;
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ void CLVColumnLabelView::MouseDown(BPoint Point)
|
|||||||
bool GrabbedResizeTab = false;
|
bool GrabbedResizeTab = false;
|
||||||
int32 NumberOfColumns = fDisplayList->CountItems();
|
int32 NumberOfColumns = fDisplayList->CountItems();
|
||||||
int32 ColumnFind;
|
int32 ColumnFind;
|
||||||
CLVColumn* ThisColumn;
|
CLVColumn* ThisColumn = NULL;
|
||||||
for(ColumnFind = 0; ColumnFind < NumberOfColumns; ColumnFind++)
|
for(ColumnFind = 0; ColumnFind < NumberOfColumns; ColumnFind++)
|
||||||
{
|
{
|
||||||
ThisColumn = (CLVColumn*)fDisplayList->ItemAt(ColumnFind);
|
ThisColumn = (CLVColumn*)fDisplayList->ItemAt(ColumnFind);
|
||||||
@@ -356,9 +356,11 @@ void CLVColumnLabelView::MessageReceived(BMessage *message)
|
|||||||
{
|
{
|
||||||
//Live dragging of columns
|
//Live dragging of columns
|
||||||
ColumnSnapped = false;
|
ColumnSnapped = false;
|
||||||
float ColumnsUpdateLeft,ColumnsUpdateRight;
|
float ColumnsUpdateLeft = 0;
|
||||||
float MainViewUpdateLeft,MainViewUpdateRight;
|
float ColumnsUpdateRight = 0;
|
||||||
CLVColumn* LastSwapColumn;
|
float MainViewUpdateLeft = 0;
|
||||||
|
float MainViewUpdateRight = 0;
|
||||||
|
CLVColumn* LastSwapColumn = NULL;
|
||||||
if(fSnapMin != -1.0 && MousePos.x < fSnapMin)
|
if(fSnapMin != -1.0 && MousePos.x < fSnapMin)
|
||||||
{
|
{
|
||||||
//Shift the group left
|
//Shift the group left
|
||||||
@@ -595,7 +597,7 @@ void CLVColumnLabelView::UpdateDragGroups()
|
|||||||
fDragGroups.MakeEmpty();
|
fDragGroups.MakeEmpty();
|
||||||
int32 NumberOfColumns = fDisplayList->CountItems();
|
int32 NumberOfColumns = fDisplayList->CountItems();
|
||||||
bool ContinueGroup = false;
|
bool ContinueGroup = false;
|
||||||
CLVDragGroup* CurrentGroup;
|
CLVDragGroup* CurrentGroup = NULL;
|
||||||
for(int32 Counter = 0; Counter < NumberOfColumns; Counter++)
|
for(int32 Counter = 0; Counter < NumberOfColumns; Counter++)
|
||||||
{
|
{
|
||||||
CLVColumn* CurrentColumn = (CLVColumn*)fDisplayList->ItemAt(Counter);
|
CLVColumn* CurrentColumn = (CLVColumn*)fDisplayList->ItemAt(Counter);
|
||||||
|
|||||||
@@ -77,16 +77,20 @@ ColumnListView::ColumnListView(BRect Frame, BScrollView **ContainerView, const c
|
|||||||
uint32 ResizingMode, uint32 flags, list_view_type Type, bool hierarchical, bool horizontal,
|
uint32 ResizingMode, uint32 flags, list_view_type Type, bool hierarchical, bool horizontal,
|
||||||
bool vertical, border_style border, const BFont *LabelFont)
|
bool vertical, border_style border, const BFont *LabelFont)
|
||||||
: BListView(Frame,Name,Type,B_FOLLOW_ALL_SIDES,flags|B_PULSE_NEEDED),
|
: BListView(Frame,Name,Type,B_FOLLOW_ALL_SIDES,flags|B_PULSE_NEEDED),
|
||||||
|
fHierarchical(hierarchical),
|
||||||
fColumnList(6),
|
fColumnList(6),
|
||||||
fColumnDisplayList(6),
|
fColumnDisplayList(6),
|
||||||
|
fDataWidth(0),
|
||||||
|
fDataHeight(0),
|
||||||
|
fPageWidth(0),
|
||||||
|
fPageHeight(0),
|
||||||
fSortKeyList(6),
|
fSortKeyList(6),
|
||||||
fFullItemList(32),
|
|
||||||
fRightArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVRightArrowData,false,false),
|
fRightArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVRightArrowData,false,false),
|
||||||
fDownArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVDownArrowData,false,false),
|
fDownArrow(BRect(0.0,0.0,10.0,10.0),B_COLOR_8_BIT,CLVDownArrowData,false,false),
|
||||||
_selectedColumn(-1), _editMessage(NULL)
|
fFullItemList(32),
|
||||||
|
_selectedColumn(-1),
|
||||||
|
_editMessage(NULL)
|
||||||
{
|
{
|
||||||
fHierarchical = hierarchical;
|
|
||||||
|
|
||||||
//Create the column titles bar view
|
//Create the column titles bar view
|
||||||
font_height FontAttributes;
|
font_height FontAttributes;
|
||||||
LabelFont->GetHeight(&FontAttributes);
|
LabelFont->GetHeight(&FontAttributes);
|
||||||
@@ -917,7 +921,7 @@ void ColumnListView::SetSorting(int32 NumberOfKeys, int32* SortKeys, CLVSortMode
|
|||||||
void ColumnListView::FrameResized(float width, float height)
|
void ColumnListView::FrameResized(float width, float height)
|
||||||
{
|
{
|
||||||
UpdateColumnSizesDataRectSizeScrollBars();
|
UpdateColumnSizesDataRectSizeScrollBars();
|
||||||
int32 NumberOfItems = CountItems();
|
uint32 NumberOfItems = CountItems();
|
||||||
BFont Font;
|
BFont Font;
|
||||||
GetFont(&Font);
|
GetFont(&Font);
|
||||||
for(uint32 Counter = 0; Counter < NumberOfItems; Counter++)
|
for(uint32 Counter = 0; Counter < NumberOfItems; Counter++)
|
||||||
@@ -1091,6 +1095,18 @@ bool ColumnListView::AddItem(CLVListItem* item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ColumnListView::AddItem(BListItem* item, int32 fullListIndex)
|
||||||
|
{
|
||||||
|
return BListView::AddItem(item, fullListIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ColumnListView::AddItem(BListItem* item)
|
||||||
|
{
|
||||||
|
return BListView::AddItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ColumnListView::AddItemPrivate(CLVListItem* item, int32 fullListIndex)
|
bool ColumnListView::AddItemPrivate(CLVListItem* item, int32 fullListIndex)
|
||||||
{
|
{
|
||||||
item->_selectedColumn = _selectedColumn;
|
item->_selectedColumn = _selectedColumn;
|
||||||
@@ -1281,6 +1297,12 @@ bool ColumnListView::RemoveItems(int32 fullListIndex, int32 count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ColumnListView::RemoveItem(BListItem* item)
|
||||||
|
{
|
||||||
|
return BListView::RemoveItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CLVListItem* ColumnListView::FullListItemAt(int32 fullListIndex) const
|
CLVListItem* ColumnListView::FullListItemAt(int32 fullListIndex) const
|
||||||
{
|
{
|
||||||
return (CLVListItem*)fFullItemList.ItemAt(fullListIndex);
|
return (CLVListItem*)fFullItemList.ItemAt(fullListIndex);
|
||||||
@@ -1533,7 +1555,6 @@ void ColumnListView::Collapse(CLVListItem* item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Remove the items under it
|
//Remove the items under it
|
||||||
int32 FullListIndex = fFullItemList.IndexOf(item);
|
|
||||||
uint32 ItemLevel = item->fOutlineLevel;
|
uint32 ItemLevel = item->fOutlineLevel;
|
||||||
int32 NextItemIndex = DisplayIndex+1;
|
int32 NextItemIndex = DisplayIndex+1;
|
||||||
while(true)
|
while(true)
|
||||||
@@ -1590,7 +1611,6 @@ void ColumnListView::SortItems()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int32 Counter;
|
int32 Counter;
|
||||||
BRect OldBounds;
|
|
||||||
if(!fHierarchical)
|
if(!fHierarchical)
|
||||||
{
|
{
|
||||||
//Plain sort
|
//Plain sort
|
||||||
|
|||||||
@@ -113,9 +113,12 @@ class ColumnListView : public BListView
|
|||||||
//CLVListItem*'s, NOT BListItem*'s
|
//CLVListItem*'s, NOT BListItem*'s
|
||||||
virtual bool AddList(BList* newItems, int32 fullListIndex); //This must be a BList of
|
virtual bool AddList(BList* newItems, int32 fullListIndex); //This must be a BList of
|
||||||
//CLVListItem*'s, NOT BListItem*'s
|
//CLVListItem*'s, NOT BListItem*'s
|
||||||
|
virtual bool AddItem(BListItem*, int32 fullListIndex); // unhide
|
||||||
|
virtual bool AddItem(BListItem*); // unhide
|
||||||
virtual bool RemoveItem(CLVListItem* item);
|
virtual bool RemoveItem(CLVListItem* item);
|
||||||
virtual BListItem* RemoveItem(int32 fullListIndex); //Actually returns CLVListItem
|
virtual BListItem* RemoveItem(int32 fullListIndex); //Actually returns CLVListItem
|
||||||
virtual bool RemoveItems(int32 fullListIndex, int32 count);
|
virtual bool RemoveItems(int32 fullListIndex, int32 count);
|
||||||
|
virtual bool RemoveItem(BListItem* item); // unhide
|
||||||
virtual void MakeEmpty();
|
virtual void MakeEmpty();
|
||||||
CLVListItem* FullListItemAt(int32 fullListIndex) const;
|
CLVListItem* FullListItemAt(int32 fullListIndex) const;
|
||||||
int32 FullListIndexOf(const CLVListItem* item) const;
|
int32 FullListIndexOf(const CLVListItem* item) const;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ int32 MouseWatcher(void* data)
|
|||||||
{
|
{
|
||||||
BMessenger* TheMessenger = (BMessenger*)data;
|
BMessenger* TheMessenger = (BMessenger*)data;
|
||||||
BPoint PreviousPos;
|
BPoint PreviousPos;
|
||||||
uint32 PreviousButtons;
|
uint32 PreviousButtons = 0xFFFFFFFF;
|
||||||
bool FirstCheck = true;
|
bool FirstCheck = true;
|
||||||
BMessage MessageToSend;
|
BMessage MessageToSend;
|
||||||
MessageToSend.AddPoint("where",BPoint(0,0));
|
MessageToSend.AddPoint("where",BPoint(0,0));
|
||||||
|
|||||||
Reference in New Issue
Block a user