From: <mg...@us...> - 2008-07-28 20:52:29
|
Revision: 1957 http://planeshift.svn.sourceforge.net/planeshift/?rev=1957&view=rev Author: mgist Date: 2008-07-28 20:52:37 +0000 (Mon, 28 Jul 2008) Log Message: ----------- - Patch for FS#107 from peeg. Modified Paths: -------------- trunk/data/gui/petitiongm.xml trunk/docs/history.txt trunk/src/client/gui/pawspetitiongmwindow.cpp trunk/src/client/gui/pawspetitiongmwindow.h trunk/src/common/net/messages.cpp trunk/src/common/net/messages.h trunk/src/common/paws/pawslistbox.cpp trunk/src/server/adminmanager.cpp Modified: trunk/data/gui/petitiongm.xml =================================================================== --- trunk/data/gui/petitiongm.xml 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/data/gui/petitiongm.xml 2008-07-28 20:52:37 UTC (rev 1957) @@ -9,7 +9,7 @@ <bgimage resource="Petitions Background" alpha="128" /> <widget name="PetitionList" factory="pawsListBox"> - <frame x="35" y="0" width="532" height="176" border="no"/> + <frame x="25" y="0" width="545" height="176" border="no"/> <font name="/planeshift/data/ttf/cupandtalon.ttf" r="255" g="255" b="255" size="12" /> <columns height="20" headings="yes"> <column width="30" > @@ -17,11 +17,16 @@ <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> </widget> </column> - <column width="100" > - <widget name="Player Name" factory="pawsTextBox"> + <column width="80" > + <widget name="Player" factory="pawsTextBox"> <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> </widget> </column> + <column width="40" > + <widget name="Online" factory="pawsTextBox"> + <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> + </widget> + </column> <column width="80" > <widget name="Status" factory="pawsTextBox"> <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> @@ -32,7 +37,7 @@ <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> </widget> </column> - <column width="207"> + <column width="200"> <widget name="Petition" factory="pawsTextBox"> <font name="/planeshift/data/ttf/LiberationSans-Regular.ttf" r="180" g="180" b="180" size="10" /> </widget> Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/docs/history.txt 2008-07-28 20:52:37 UTC (rev 1957) @@ -10,6 +10,9 @@ - Fixed a memory leak caused by a reference leak in netbase. - Patch for FS#1912 from weltall. - Patch for FS#1855 from Arerano. +- Fix for the last part of FS#74, patch by Kaerli. +- Patch for FS#107 from peeg. +=> NETVERSION BUMP! *** 2008-07-24 by Steven Patrick - Fixed FS#1991 - deputizing doesn't update GM console, patch by Zwenze. Modified: trunk/src/client/gui/pawspetitiongmwindow.cpp =================================================================== --- trunk/src/client/gui/pawspetitiongmwindow.cpp 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/client/gui/pawspetitiongmwindow.cpp 2008-07-28 20:52:37 UTC (rev 1957) @@ -567,6 +567,7 @@ selectedPet.status = petitionList->GetTextCellValue(selRow, PGMCOL_STATUS); selectedPet.created = petitionList->GetTextCellValue(selRow, PGMCOL_CREATED); selectedPet.petition = petitionList->GetTextCellValue(selRow, PGMCOL_PETITION); + selectedPet.online = petitionList->GetTextCellValue(selRow, PGMCOL_ONLINE); } else { @@ -587,6 +588,7 @@ petitionList->NewRow(i); SetText(i, PGMCOL_LVL, "%d", info.escalation); SetText(i, PGMCOL_PLAYER, "%s", info.player.GetData()); + SetText(i, PGMCOL_ONLINE, "%s", (info.online ? "yes" : "no")); SetText(i, PGMCOL_STATUS, "%s", info.status.GetData()); SetText(i, PGMCOL_CREATED, "%s", info.created.GetData()); SetText(i, PGMCOL_PETITION, "%s", info.petition.GetData()); Modified: trunk/src/client/gui/pawspetitiongmwindow.h =================================================================== --- trunk/src/client/gui/pawspetitiongmwindow.h 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/client/gui/pawspetitiongmwindow.h 2008-07-28 20:52:37 UTC (rev 1957) @@ -29,9 +29,10 @@ enum { PGMCOL_LVL = 0, PGMCOL_PLAYER = 1, - PGMCOL_STATUS = 2, - PGMCOL_CREATED = 3, - PGMCOL_PETITION = 4 + PGMCOL_ONLINE = 2, + PGMCOL_STATUS = 3, + PGMCOL_CREATED = 4, + PGMCOL_PETITION = 5 }; /** Defines the length a petition can be before it is Modified: trunk/src/common/net/messages.cpp =================================================================== --- trunk/src/common/net/messages.cpp 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/common/net/messages.cpp 2008-07-28 20:52:37 UTC (rev 1957) @@ -636,7 +636,8 @@ { messageSize+=sizeof(int32_t); messageSize+=curr->created.Length()+1; - messageSize+=curr->player.Length()+1; + messageSize+=curr->player.Length()+1; + messageSize+=sizeof(bool); // online flag for players } } @@ -677,6 +678,7 @@ msg->Add((int32_t)current->escalation); msg->Add(current->created.GetData()); msg->Add(current->player.GetData()); + msg->Add(current->online); } } msg->Add(errMsg); @@ -716,6 +718,7 @@ current.escalation = message->GetInt32(); current.created = message->GetStr(); current.player = message->GetStr(); + current.online = message->GetBool(); } petitions.Push(current); Modified: trunk/src/common/net/messages.h =================================================================== --- trunk/src/common/net/messages.h 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/common/net/messages.h 2008-07-28 20:52:37 UTC (rev 1957) @@ -858,6 +858,8 @@ csString player; // the player csString created; // date and time of creation csString resolution; // resolution of a closed petition + + bool online; // is the player online? }; enum { Modified: trunk/src/common/paws/pawslistbox.cpp =================================================================== --- trunk/src/common/paws/pawslistbox.cpp 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/common/paws/pawslistbox.cpp 2008-07-28 20:52:37 UTC (rev 1957) @@ -298,7 +298,7 @@ titleRow = new pawsListBoxRow(); titleRow->SetParent( this ); - titleRow->SetRelativeFrame( 5, 0, + titleRow->SetRelativeFrame( 0, 0, ScreenFrame().Width() , GetActualHeight(columnHeight) ); for ( int x = 0; x < totalColumns; x++ ) @@ -1164,7 +1164,7 @@ for ( int x = 0; x < column; x++ ) offset+=def[x].width; - title->SetRelativeFrame( offset+4, 4, def[column].width, def[column].height ); + title->SetRelativeFrame( offset-4, -4, def[column].width, def[column].height ); innerWidget->SetRelativeFrame(4, 4, def[column].width, def[column].height ); title->SetID(column); } Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2008-07-28 20:40:50 UTC (rev 1956) +++ trunk/src/server/adminmanager.cpp 2008-07-28 20:52:37 UTC (rev 1957) @@ -4632,7 +4632,8 @@ info.escalation = atoi((*rs)[i][3]); info.created = csString((*rs)[i][4]).Slice(0, 16); info.player = (*rs)[i][5]; - + info.online = (clients->Find(info.player) ? true : false); + // Append to the message: petitions.Push(info); } @@ -4717,8 +4718,9 @@ info.petition = (*rs)[i][1]; info.status = (*rs)[i][2]; info.escalation = atoi((*rs)[i][3]); - info.created = (*rs)[i][4]; + info.created = csString((*rs)[i][4]).Slice(0, 16); info.player = (*rs)[i][5]; + info.online = (clients->Find(info.player) ? true : false); // Append to the message: petitions.Push(info); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |