Пример #1
0
void CUITradeWnd::UpdateLists(EListType mode)
{
	if(mode==eBoth||mode==e1st){
		m_uidata->UIOurBagList.ClearAll(true);
		m_uidata->UIOurTradeList.ClearAll(true);
	}

	if(mode==eBoth||mode==e2nd){
		m_uidata->UIOthersBagList.ClearAll(true);
		m_uidata->UIOthersTradeList.ClearAll(true);
	}

	UpdatePrices						();


	if(mode==eBoth||mode==e1st){
		ruck_list.clear					();
   		m_pInv->AddAvailableItems		(ruck_list, true);
		std::sort						(ruck_list.begin(),ruck_list.end(),InventoryUtilities::GreaterRoomInRuck);
		FillList						(ruck_list, m_uidata->UIOurBagList, true);
	}

	if(mode==eBoth||mode==e2nd){
		ruck_list.clear					();
		m_pOthersInv->AddAvailableItems	(ruck_list, true);
		std::sort						(ruck_list.begin(),ruck_list.end(),InventoryUtilities::GreaterRoomInRuck);
		FillList						(ruck_list, m_uidata->UIOthersBagList, false);
	}
}
Пример #2
0
void MarketListWidget::on_addButton_clicked()
{
    if(!ui->listWidget->currentIndex().isValid()){
        QMessageBox::critical(this,"Nada seleccionado","Seleccione un item de la lista para modificar",QMessageBox::Ok);
        return;
    }
    QListWidgetItem *item = ui->listWidget->currentItem();
    int amount = ui->spinBox->value();
    QSqlQuery query;
    int id = item->data(Qt::UserRole).toInt();
    if(ui->spinBox->value()>0){
        query.prepare("UPDATE MarketList SET amount=? WHERE food_id=?");
        query.addBindValue(amount);
        query.addBindValue(id);
        if(query.exec()){
            qDebug()<<"updated market list item properly";
            FillList();
        }else{
            qDebug()<<"failed to update market list item";
        }
    }else{
        query.prepare("DELETE FROM MarketList WHERE food_id=?");
        query.addBindValue(id);
        if(query.exec()){
            qDebug()<<"deleted market list item properly";
            FillList();
        }else{
            qDebug()<<"failed to delete market list item";
        }
    }

}
Пример #3
0
int BKCurrentWindow_au(WndAndHandle * pItem)
{
	if(IsInHidedWndList(pItem))
	{
		return 0;
	}


	wchar_t * cTitle = new wchar_t[2048],cPID[20];
	memset(cTitle,0,2048 * sizeof(wchar_t));
	memset(cPID,0,20 * sizeof(wchar_t));
	

	FillList();
	swprintf(cPID,L"%X",pItem->lPID);
	wcscpy(cTitle,pItem->cWndTitle);
	ConstructBKSW_au(cPID,cTitle);
	delete [] cTitle;
	HideSelected(&sBKSel_con,1,1);
		
	WndAndHandle * pHidedItem = new WndAndHandle;
	memset(pHidedItem,0,sizeof(WndAndHandle));
	pHidedItem->lPID = pItem->lPID;
	g_HidedWndList.push_back(pHidedItem);



	Switch2BKTab();
	FillList();




	return 1;
}
Пример #4
0
void ezQtDataDirsDlg::on_ButtonUp_clicked()
{
  ezMath::Swap(m_Config.m_DataDirs[m_iSelection - 1], m_Config.m_DataDirs[m_iSelection]);
  --m_iSelection;

  FillList();
}
Пример #5
0
void ezQtDataDirsDlg::on_ButtonAdd_clicked()
{
  static QString sPreviousFolder;
  if (sPreviousFolder.isEmpty())
  {
    sPreviousFolder = QString::fromUtf8(ezToolsProject::GetSingleton()->GetProjectFile().GetData());
  }

  QString sFolder = QFileDialog::getExistingDirectory(this, QLatin1String("Select Directory"), sPreviousFolder,
                                                      QFileDialog::Option::ShowDirsOnly | QFileDialog::Option::DontResolveSymlinks);

  if (sFolder.isEmpty())
    return;

  sPreviousFolder = sFolder;

  ezStringBuilder sRootPath = ezFileSystem::GetSdkRootDirectory();

  ezStringBuilder sRelPath = sFolder.toUtf8().data();
  sRelPath.MakeRelativeTo(sRootPath);
  sRelPath.Prepend(">sdk/");
  sRelPath.MakeCleanPath();

  ezApplicationFileSystemConfig::DataDirConfig dd;
  dd.m_sDataDirSpecialPath = sRelPath;
  dd.m_bWritable = false;
  m_Config.m_DataDirs.PushBack(dd);

  m_iSelection = m_Config.m_DataDirs.GetCount() - 1;

  FillList();
}
Пример #6
0
void ShortcutsListDlg::OnContextChanged()
{
	//filter list to show only selected context
	GtkWidget *combobox4 = lookup_widget(m_pDialog, "combobox4");
	int nCtx = gtk_combo_box_get_active (GTK_COMBO_BOX(combobox4));
	FillList(nCtx);
}
void CLryEDBQryView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
	
	
	CListCtrl  *ListCtrl = (CListCtrl  *)&GetListCtrl();
	CLryEDBQryDoc *pDoc = (CLryEDBQryDoc *)GetDocument();
	CLryEDBQryDoc::CRowObj *rowInfo;
	int i;
	switch(lHint)
	{
	case 0:
		FillList();			//填写表格
		break;
	case 1:
		try
		{
			i = pDoc->Rs->AbsolutePosition-1;
			ListCtrl->EnsureVisible(i,TRUE);		
		}
		catch(_com_error &e)
		{
			dump_com_error(e);
		}
		break;
	case 2:
		rowInfo = (CLryEDBQryDoc::CRowObj*)pHint;
		ListCtrl->DeleteItem(rowInfo->RowNO);
		ListCtrl->Update(rowInfo->RowNO);
		break;
	default:
		break;
	}	
	
}
Пример #8
0
void ezQtDataDirsDlg::on_ButtonDown_clicked()
{
  ezMath::Swap(m_Config.m_DataDirs[m_iSelection], m_Config.m_DataDirs[m_iSelection + 1]);
  ++m_iSelection;

  FillList();
}
void PluginsConfigurationDlg::OnUninstall(wxCommandEvent& /*event*/)
{
    wxListCtrl* list = XRCCTRL(*this, "lstPlugins", wxListCtrl);
    if (list->GetSelectedItemCount() == 0)
        return;

    wxBusyCursor busy;

    long sel = -1;
    wxString failure;
    while (true)
    {
        sel = list->GetNextItem(sel, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (sel == -1)
            break;

        const PluginElement* elem = (const PluginElement*)list->GetItemData(sel);
        if (elem && elem->plugin)
        {
            if (!Manager::Get()->GetPluginManager()->UninstallPlugin(elem->plugin))
                failure << elem->info.title << _T('\n');
        }
    }

    FillList();
    if (!failure.IsEmpty())
        cbMessageBox(_("One or more plugins were not un-installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
}
Пример #10
0
static void CPROC AddButtonType( uintptr_t psv, PSI_CONTROL control )
{
	PMACRO_BUTTON button = (PMACRO_BUTTON)psv;
	PSI_CONTROL list = GetNearControl( control, LIST_CONTROL_TYPES );
	PLISTITEM pli = GetSelectedItem( list );
	TEXTCHAR *name = (TEXTCHAR*)GetItemData( pli );
	if( pli && button )
	{
		PMACRO_ELEMENT pme = New( MACRO_ELEMENT );
		pme->me = NULL;
		pme->next = NULL;
		pme->button = CreateInvisibleControl( configure_key_dispatch.frame, name );
		if( pme->button )
		{
			pme->button->container_button = button->button;
			//lprintf( WIDE( "Setting container of %p to %p" ), pme->button, button->button );

			LinkLast( button->elements, PMACRO_ELEMENT, pme );
			{
				// fake this lock...
				// global code allows this to continue... which means loss of current_configuration datablock.
				// faking this starts a configuration thread.
				//g.flags.bIgnoreKeys = 0;
				ConfigureKeyExx( configure_key_dispatch.frame, pme->button, TRUE, FALSE );
				//g.flags.bIgnoreKeys = 1;
				 // I'm still editing this mode...
			}
			FillList( GetNearControl( control, LIST_MACRO_ELEMENTS ), button );
		}
		else
			DebugBreak();
	}
}
void CDialog_PPEPrecache::OnFileSelected( KeyValues *pKV )
{
	const char *pathIn = pKV->GetString( "fullpath" );
	if ( Q_strlen( pathIn ) <= 1 )
		return;

	char tmp[MAX_PATH*4];
	if ( !g_pFullFileSystem->FullPathToRelativePath( pathIn, tmp, sizeof( tmp ) ) )
		Q_snprintf( tmp, sizeof(tmp), "%s", pathIn );

	CPostProcessingCache::PPE_Error error = GetPPCache()->LoadPostProcessingEffect( tmp, false );

	if ( error != CPostProcessingCache::PPE_OKAY )
	{
		PromptSimple *prompt = new PromptSimple( this, "Error" );
		prompt->MoveToCenterOfScreen();
		switch ( error )
		{
		case CPostProcessingCache::PPE_INVALID_INPUT:
				prompt->SetText( "Unable to load file." );
			break;
		case CPostProcessingCache::PPE_INVALID_GRAPH_TYPE:
				prompt->SetText( "This file is not a post processing graph!" );
			break;
		case CPostProcessingCache::PPE_GRAPH_NOT_VALID:
				prompt->SetText( "This graph is not valid, open the file and fix it!" );
			break;
		}
		prompt->AddButton( "Ok" );
	}
	else if ( pEditorRoot->GetSafeFlowgraph()->GetFlowgraphType() == CNodeView::FLOWGRAPH_POSTPROC )
		pEditorRoot->GetSafeFlowgraph()->UpdatePPECache();

	FillList();
}
Пример #12
0
BOOL CBCGPGridFilterListDlg::OnInitDialog() 
{
	CBCGPDialog::OnInitDialog();

	CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout();
	if (pLayout != NULL)
	{
		pLayout->AddAnchor(IDC_BCGBARRES_FILTER_SEARCH, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeHorz);
		pLayout->AddAnchor(IDC_BCGBARRES_FILTER_LIST, CBCGPStaticLayout::e_MoveTypeNone, CBCGPStaticLayout::e_SizeTypeBoth);
		pLayout->AddAnchor(IDOK, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
		pLayout->AddAnchor(IDCANCEL, CBCGPStaticLayout::e_MoveTypeBoth, CBCGPStaticLayout::e_SizeTypeNone);
	}

	CString strPrompt;
	
	{
		CBCGPLocalResource locaRes;

		strPrompt.LoadString(IDS_BCGBARRES_SEARCH_PROMPT);
		m_strSelectAll.LoadString(IDS_BCGBARRES_SELECT_ALL);
	}

	m_wndEdit.EnableSearchMode(TRUE, strPrompt);

	FillList();

	m_wndEdit.SetFocus();
	return FALSE; // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Пример #13
0
PyeManagerWindow::PyeManagerWindow(BHandler* returnHandler, Proxy* theProxy) :
	BWindow(BRect(200, 200, 415, 500), "Payee Manager",
	B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, 
	B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE)
{
	this->returnHandler = returnHandler;
	this->theProxy = theProxy;
	pyeS = theProxy->GetPyeS();

	BRect frame = Frame();
	frame.OffsetTo(0, 0);	
	BView* backdrop = new BView(frame, "backview", B_FOLLOW_ALL_SIDES, B_WILL_DRAW);
	backdrop->SetViewColor(222, 222, 222);
	AddChild(backdrop);
	
	lv = new BListView(BRect(10, 10, frame.Width() - 10 - 15, frame.Height() - 70),
		"PyeManagerLV");
	backdrop->AddChild(new BScrollView("scrolllv", lv,
		B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true));
	
	FillList();
	
	BButton* b = new BButton(BRect(10, frame.bottom - 60, 100, frame.bottom - 40), 
		"NewB", "New...", new BMessage(PyeManagerWindowNewMSG));
	backdrop->AddChild(b);
	b = new BButton(BRect(110, frame.bottom - 60, 200, frame.bottom - 40), 
		"RenameB", "Rename...", new BMessage(PyeManagerWindowRenameMSG));
	backdrop->AddChild(b);
	b = new BButton(BRect(10, frame.bottom - 30, 100, frame.bottom - 10), 
		"DeleteB", "Delete...", new BMessage(PyeManagerWindowDeleteMSG));
	backdrop->AddChild(b);
	b = new BButton(BRect(110, frame.bottom - 30, 200, frame.bottom - 10), 
		"CloseB", "Close", new BMessage(PyeManagerWindowCloseMSG));
	backdrop->AddChild(b);
}
IncrementalSelectListDlg::IncrementalSelectListDlg(wxWindow* parent, const IncrementalSelectIterator& iterator,
                                                   const wxString& caption, const wxString& message)
    : m_List(nullptr),
    m_Text(nullptr),
    m_Iterator(iterator)
{
    wxXmlResource::Get()->LoadObject(this, parent, _T("dlgIncrementalSelectList"),_T("wxScrollingDialog"));
    if (!caption.IsEmpty())
        SetTitle(caption);
    if (!message.IsEmpty())
        XRCCTRL(*this, "lblMessage", wxStaticText)->SetLabel(message);

    m_Text = XRCCTRL(*this, "txtSearch", wxTextCtrl);
    m_List = XRCCTRL(*this, "lstItems", wxListBox);

    SetSize(GetPosition().x - 90, GetPosition().y - 70, 500, 300);

    m_Text->Connect( wxEVT_KEY_DOWN,
                    (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction)
                    &IncrementalSelectListDlg::OnKeyDown,
                    nullptr, this );
    m_List->Connect( wxEVT_KEY_DOWN,
                    (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction)
                    &IncrementalSelectListDlg::OnKeyDown,
                    nullptr, this );

    FillList();
}
CDialog_RendertargetList::CDialog_RendertargetList( Panel *parent ) : CBaseDiag( parent, NULL, "_rt_list" )
{
	SetSizeable( false );
	SetVisible( true );

	SetMouseInputEnabled( true );
	SetKeyBoardInputEnabled( true );
	Activate();



	m_pList_RT = new PanelListPanel( this, "rtlist" );
	m_pList_RT->SetNumColumns( 2 );
	m_pList_RT->SetFirstColumnWidth( 200 );

	FillList();


	LoadControlSettings( "shadereditorui/vgui/dialog_rendertarget_list.res" );

	SetTitle( "Rendertarget manager", true );

	DoModal();
	SetDeleteSelfOnClose( true ); 
	MoveToCenterOfScreen();
}
Пример #16
0
void CPasteFunctionDialog::PostInit()
{
	fCellView = fOwner->GetCellView();
	
	BAutolock lock(this);
	if (!lock.IsLocked())
		THROW((errLockWindow));

	fList = (BListView *)FindView("list");
	fList->SetInvocationMessage(new BMessage(msg_OK));
	fList->SetSelectionMessage(new BMessage(msg_FuncChanged));
//	fList->SetFont(be_plain_font);

	fFuncDescription = (BTextView *)FindView("desc");

	BMenuField *mf = dynamic_cast<BMenuField *>(FindView("group"));
	fMenu = mf->Menu();
	fMenu->AddItem(new BMenuItem("All", new BMessage(msg_MenuChanged)));
	fMenu->AddSeparatorItem();
	fMenu->AddItem(new BMenuItem("Cell", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Date-Time", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Financial", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Math", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Statistical", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Text", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Logical", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Engineering", new BMessage(msg_MenuChanged)));
	fMenu->AddItem(new BMenuItem("Plugins", new BMessage(msg_MenuChanged)));

	fMenu->FindItem("All")->SetMarked(true);

	FillList();
	
	Show();
} /* CPasteFunctionDialog::CPasteFunctionDialog */
Пример #17
0
void CDamage::OnTextChangedComboElements(LPCTSTR text, short index) 
{
	// TODO: Add your control notification handler code here
  	CRCombo* combo;
	combo=GETDLGITEM(IDC_COMBO_ELEMENTS);
	int comboindex = combo->GetIndex();	
//DEADCODE RDH 16/05/00 	if (comboindex==0)
		groupnum=internalUIDList[comboindex];
//DEADCODE RDH 16/05/00 	else
//DEADCODE RDH 16/05/00 	{
//DEADCODE RDH 16/05/00 		internalUIDList
//DEADCODE RDH 16/05/00 		info_itemS*	p;
//DEADCODE RDH 16/05/00 		UniqueIDBand band;
//DEADCODE RDH 16/05/00 		for (int i=BritAAASiteBAND;i<WorldStuff::PITEMTABLESIZE;i++)
//DEADCODE RDH 16/05/00 			if (	((p=Persons2::ConvertPtrUID(UniqueID(i)))!=NULL)
//DEADCODE RDH 16/05/00 				&&	(p->SGT==wavenum && p->shape.Evaluate()!=EMPTY)
//DEADCODE RDH 16/05/00 				&&	(band=Persons2::getbandfromUID(UniqueID(i)))!=0
//DEADCODE RDH 16/05/00 				&&	band!=LandscapeBAND
//DEADCODE RDH 16/05/00 				)
//DEADCODE RDH 16/05/00 				if (--comboindex==0)
//DEADCODE RDH 16/05/00 					groupnum=i;
//DEADCODE RDH 16/05/00 	}
	m_pView->m_mapdlg.ResetIcon(UniqueID(groupnum));
	FillList();
}
void PluginsConfigurationDlg::OnInstall(wxCommandEvent& /*event*/)
{
    wxFileDialog fd(this,
                        _("Select plugin to install"),
                        wxEmptyString, wxEmptyString,
                        _T("Code::Blocks Plugins (*.cbplugin)|*.cbplugin"),
                        wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | compatibility::wxHideReadonly);
    if (fd.ShowModal() != wxID_OK)
        return;

    wxBusyCursor busy;

    wxArrayString paths;
    fd.GetPaths(paths);

    // install in global or user dirs?
    bool globalInstall = XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->GetValue();
    bool confirm = XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->GetValue();

    wxString failure;
    for (size_t i = 0; i < paths.GetCount(); ++i)
    {
        if (!Manager::Get()->GetPluginManager()->InstallPlugin(paths[i], globalInstall, confirm))
            failure << paths[i] << _T('\n');
    }

    FillList();
    if (!failure.IsEmpty())
        cbMessageBox(_("One or more plugins were not installed successfully:\n\n") + failure, _("Warning"), wxICON_WARNING, this);
}
Пример #19
0
//=========================================================
// 세 번째 프로퍼티 페이지에 대한 코드
BOOL CMyPage3::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	FillTree();	
	FillList();
	return TRUE;  
}
Пример #20
0
void KSceneEditorAISetDialog::OnBnClickedButtonNew()
{
	if(!m_pDocLogical)
		return;
	DWORD dwID;
	m_pDocLogical->NewOneAISet(dwID,"New AI Set");
	FillList();
}
void GymnastSelectionList::Init(QQmlApplicationEngine &p_qEngine)
{
    QQmlContext* pComboContext = p_qEngine.rootContext();
    pComboContext->setContextProperty("gymnastRegisteredModel", &m_cCbbModel);

    // move after mySQL read-out
    FillList();
}
void CDialog_PPEPrecache::OnCommand( const char *cmd )
{
	if ( !Q_stricmp( "add_effect", cmd ) )
	{
		OpenFiledialog();
	}
	else if ( Q_stristr( cmd, "del_effect_" ) == cmd )
	{
		const char *pszIdStart = cmd + 11;
		const int index = atoi( pszIdStart );

		Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );

		GetPPCache()->DeletePostProcessingEffect( index );

		FillList();
	}
	else if ( Q_stristr( cmd, "movedown_effect_" ) == cmd )
	{
		const char *pszIdStart = cmd + 16;
		const int index = atoi( pszIdStart );

		Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );

		GetPPCache()->MoveEffectAlongList( index, false );

		FillList();
	}
	else if ( Q_stristr( cmd, "moveup_effect_" ) == cmd )
	{
		const char *pszIdStart = cmd + 14;
		const int index = atoi( pszIdStart );

		Assert( index >= 0 && index < GetPPCache()->GetNumPostProcessingEffects() );

		GetPPCache()->MoveEffectAlongList( index, true );

		FillList();
	}
	else
	{
		GetPPCache()->SavePrecacheFile();

		BaseClass::OnCommand( cmd );
	}
}
Пример #23
0
MarketListWidget::MarketListWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::MarketListWidget)
{
    ui->setupUi(this);
    ui->listBackground->setStyleSheet("#listBackground {background-image: url(:/res/notebook.png);}");
    FillList();
}
Пример #24
0
// Refresh() refreshes the shell view.
STDMETHODIMP CShellViewImpl::Refresh()
{
    // Repopulate the list control.

    m_wndList.DeleteAllItems();
    FillList();

    return S_OK;
}
Пример #25
0
ezQtDataDirsDlg::ezQtDataDirsDlg(QWidget* parent)
    : QDialog(parent)
{
  setupUi(this);

  m_Config = ezQtEditorApp::GetSingleton()->GetFileSystemConfig();
  m_iSelection = -1;
  FillList();
}
// Save the scrollbar and caret position and refill the listbox
VOID Refresh()
{
    UINT uiTopIndex, uiCaretIndex;
    uiTopIndex = SendMessage(hListbox, LB_GETTOPINDEX, 0, 0);
    uiCaretIndex = SendMessage(hListbox, LB_GETCARETINDEX, 0, 0);
    FillList();
    SendMessage(hListbox, LB_SETCARETINDEX, uiCaretIndex, 0);
    SendMessage(hListbox, LB_SETTOPINDEX, uiTopIndex, 0);
}
// class constructor
PluginsConfigurationDlg::PluginsConfigurationDlg(wxWindow* parent)
{
	wxXmlResource::Get()->LoadObject(this, parent, _T("dlgConfigurePlugins"),_T("wxScrollingDialog"));
    FillList();

    // install options
    ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("plugins"));
    bool globalInstall = cfg->ReadBool(_T("/install_globally"), true);
    bool confirmation = cfg->ReadBool(_T("/install_confirmation"), true);

    // verify user can install globally
    DirAccessCheck access = cbDirAccessCheck(ConfigManager::GetFolder(sdPluginsGlobal));
    if (access != dacReadWrite)
    {
        globalInstall = false;
        // disable checkbox
        XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->Enable(false);
    }
    XRCCTRL(*this, "chkInstallGlobally", wxCheckBox)->SetValue(globalInstall);
    XRCCTRL(*this, "chkInstallConfirmation", wxCheckBox)->SetValue(confirmation);

    // Set default font size based on system default font size
#ifdef __linux__
    /* NOTE (mandrav#1#): wxWidgets documentation on wxHtmlWindow::SetFonts(),
    states that the sizes array accepts values from -2 to +4.
    My tests (under linux at least) have showed that it actually
    expects real point sizes. */

	wxFont systemFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
	int sizes[7] = {};
	for (int i = 0; i < 7; ++i)
        sizes[i] = systemFont.GetPointSize();
	XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetFonts(wxEmptyString, wxEmptyString, &sizes[0]);
#endif

    wxString initialInfo;
    initialInfo << _T("<html><body><font color=\"#0000AA\">");
    initialInfo << _("Tip: The above list allows for multiple selections.");
    initialInfo << _T("</font><br /><br /><b><font color=\"red\">");
    initialInfo << _("Have you saved your work first?");
    initialInfo << _T("</font></b><br /><i><font color=\"black\">\n");
    initialInfo << _("If a plugin is not well-written, it could cause Code::Blocks to crash ");
    initialInfo << _("when performing any operation on it...");

	if (PluginManager::GetSafeMode())
	{
		initialInfo << _T("</font></i><br /><br /><b><font color=\"red\">");
		initialInfo << _("Code::Blocks started up in \"safe-mode\"");
		initialInfo << _T("</font></b><br /><i><font color=\"black\">\n");
		initialInfo << _("All plugins were disabled on startup so that you can troubleshoot ");
		initialInfo << _("problematic plugins. Enable plugins at will now...");
	}

    initialInfo << _T("</font></i><br /></body></html>\n");

    XRCCTRL(*this, "htmlInfo", wxHtmlWindow)->SetPage(initialInfo);
}
Пример #28
0
BOOL CFolderOptionsDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	// Add data to list
	FillList();

	return TRUE;  // return TRUE unless you set the focus to a control
}
Пример #29
0
void MarketListWidget::on_addFoodButton_clicked()
{
    AddMarketDialog *dialog = new AddMarketDialog(this);
    int ret_val = dialog->exec();
    if(ret_val){
        FillList();
    }
    delete dialog;
}
Пример #30
0
BOOL CPropQkDlg::OnInitDialog()
{
	CPropertyPage::OnInitDialog();

	// TODO:  在此添加额外的初始化
	InitColum() ;
	FillList() ;
	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常:OCX 属性页应返回 FALSE
}