Exemple #1
0
void WFileList::OnMenuShowColumn(wxCommandEvent& event)
{
    switch (event.GetId())
    {
    case myID_MENU_SHOW_COLUMN0 + 1:
        metasettings.show_size = -metasettings.show_size;
        break;
    case myID_MENU_SHOW_COLUMN0 + 2:
        metasettings.show_compressed = -metasettings.show_compressed;
        break;
    case myID_MENU_SHOW_COLUMN0 + 3:
        metasettings.show_compression = -metasettings.show_compression;
        break;
    case myID_MENU_SHOW_COLUMN0 + 4:
        metasettings.show_encryption = -metasettings.show_encryption;
        break;
    case myID_MENU_SHOW_COLUMN0 + 5:
        metasettings.show_mtime = -metasettings.show_mtime;
        break;
    case myID_MENU_SHOW_COLUMN0 + 6:
        metasettings.show_ctime = -metasettings.show_ctime;
        break;
    case myID_MENU_SHOW_COLUMN0 + 7:
        metasettings.show_author = -metasettings.show_author;
        break;
    case myID_MENU_SHOW_COLUMN0 + 8:
        metasettings.show_subject = -metasettings.show_subject;
        break;
    }

    UpdateDisplayMode(displaymode);
    ResetItems();
}
// ---------------------------------------------------------
// CTrialContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CTrialContainer::ConstructL( const TRect& aRect, 
                                  class CTrialView* aView )
{
   CreateWindowL();

   iNormalTopLeft = aRect.iTl;

   iView = aView;

   // Create a periodic timer but don't start it yet
   iPeriodicTimer = CPeriodic::NewL(CActive::EPriorityStandard);
   LOGNEW(iPeriodicTimer, CPeriodic);
   SetTimerTick(1000);

   class TResourceReader reader;
   iCoeEnv->CreateResourceReaderLC( reader, R_WAYFINDER_TRIAL_LIST );
   iListBox = new( ELeave ) CAknDoubleStyleListBox();
   LOGNEW(iListBox, CAknDoubleStyleListBox);
   iListBox->SetContainerWindowL(*this);
   iListBox->ConstructFromResourceL(reader);
   iListBox->SetListBoxObserver( this );
   CleanupStack::PopAndDestroy(/*reader*/);  // Resource reader

   iListBox->SetExtent( LISTBOX_POS, iListBox->MinimumSize() );
   if (iView->SearchingForIAP()) {
      /* Don't show selection list. */
      iListBox->MakeVisible(EFalse);
   }
   ResetItems(iView->ShowTrialEntryInTrialView());

   SetRect(aRect);
   ActivateL();
}
Exemple #3
0
//#define rndnum(y,z) ((random()*((z)-((y)+1)))+(y))
void RestartLevel()
{
	edict_t *player;
	int i;
	edict_t *dropped = NULL;
	techspawn = false;
	ResetItems();
	match_nextthink = level.time + 1;
	match_state = STATE_NEEDPLAYERS;
	match_state_end = 1;
	ResetCaps();
	hstime = level.time - 10;
	mapvoteactive = false;
	for_each_player(player, i)
	{
		player->client->resp.score = 0;
		player->client->resp.frags = 0;
		player->client->resp.spree = 0;
		player->client->resp.deaths = 0;
		player->client->pers.db_hud = true;
		if(player->client->pers.pl_state == 2)
			player->client->pers.pl_state = 3;
		player->client->resp.startframe = level.newframenum;
		if (ctf->value)
		{
			if ((!flag1_item || !flag2_item) && ctf->value)
				CTFInit();
			if (player->client->pers.inventory[ITEM_INDEX(flag1_item)])
			{
				dropped = Drop_Item(player, flag1_item);
				player->client->pers.inventory[ITEM_INDEX(flag1_item)] = 0;
				my_bprintf(PRINT_HIGH, "%s lost the %s flag!\n",
					player->client->pers.netname, CTFTeamName(CTF_TEAM1));
			}
			else if (player->client->pers.inventory[ITEM_INDEX(flag2_item)])
			{
				dropped = Drop_Item(player, flag2_item);
				player->client->pers.inventory[ITEM_INDEX(flag2_item)] = 0;
				my_bprintf(PRINT_HIGH, "%s lost the %s flag!\n",
					player->client->pers.netname, CTFTeamName(CTF_TEAM2));
			}
			if (dropped)
			{
				dropped->think = G_FreeEdict;
				dropped->timestamp = level.time;
				dropped->nextthink = level.time + 0.2;
			}
			//JSW - clear flag carrier var
			player->hasflag = 0;
		}
	}
Exemple #4
0
void WFileList::OnMenuView(wxCommandEvent& event)
{
    switch (event.GetId())
    {
    case myID_MENU_VIEW_BIGICONS:
        UpdateDisplayMode(0);
        break;

    case myID_MENU_VIEW_LIST:
        UpdateDisplayMode(1);
        break;

    case myID_MENU_VIEW_REPORT:
        UpdateDisplayMode(2);
        break;
    }

    ResetItems();
}
Exemple #5
0
void StackWnd::Notify( buffer* callstack )
{
	Clear();
	while( callstack )
	{
		Params* p = new Params;
		PraseString( callstack->data, *p );
		if( p->size() == 5 )
		{
			m_callstack.push_back( p );
		}
		callstack = callstack->next;
	}
	ResetItems( m_callstack.size() );

	CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();

	buffer* ret = Debug_Command( pFrame->GetDebuger(), "stack 0" );
	pFrame->local_vars_wnd_.Notify( ret );

}
Exemple #6
0
void WFileList::OnMenuFileDelete(wxCommandEvent& WXUNUSED(event))
{
    std::vector<int> subfilelist;

    long sfid = -1;
    while (1)
    {
        sfid = GetNextItem(sfid, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (sfid == -1) break;

        subfilelist.push_back(sfid);
    }

    wxString surestr;

    if (subfilelist.empty()) return;
    else if (subfilelist.size() == 1)
    {
        wxString filelist = strSTL2WX(wmain->container.GetSubFileProperty(subfilelist[0], "Name"));
        surestr = wxString::Format(_("Going to permanently delete \"%s\". This cannot be undone, are you sure?"), filelist.c_str());
    }
    else {
        surestr = wxString::Format(_("Going to permanently delete %u files. This cannot be undone, are you sure?"), subfilelist.size());
    }

    wxMessageDialog suredlg(this, surestr, _("Delete files?"),
                            wxYES_NO | wxNO_DEFAULT);

    if (suredlg.ShowModal() != wxID_YES) return;

    for (std::vector<int>::reverse_iterator sfi = subfilelist.rbegin();
         sfi != subfilelist.rend(); ++sfi)
    {
        wmain->DeleteSubFile(*sfi, false);
    }

    ResetItems();
}