/* Extension package item constructor: */
    UIExtensionPackageItem(QTreeWidget *pParent, const UISettingsCacheGlobalExtensionItem &data)
        : QTreeWidgetItem(pParent, UIItemType)
        , m_data(data)
    {
        /* Icon: */
        setIcon(0, UIIconPool::iconSet(m_data.m_fIsUsable ?
                                       ":/status_check_16px.png" :
                                       ":/status_error_16px.png"));

        /* Name: */
        setText(1, m_data.m_strName);

        /* Version, Revision, Edition: */
        QString strVersion(m_data.m_strVersion.section(QRegExp("[-_]"), 0, 0));
        QString strAppend;
        /* workaround for http://qt.gitorious.org/qt/qt/commit/7fc63dd0ff368a637dcd17e692b9d6b26278b538 */
        if (m_data.m_strVersion.contains(QRegExp("[-_]")))
            strAppend = m_data.m_strVersion.section(QRegExp("[-_]"), 1, -1, QString::SectionIncludeLeadingSep);
        setText(2, QString("%1r%2%3").arg(strVersion).arg(m_data.m_strRevision).arg(strAppend));

        /* Tool-tip: */
        QString strTip = m_data.m_strDescription;
        if (!m_data.m_fIsUsable)
        {
            strTip += QString("<hr>");
            strTip += m_data.m_strWhyUnusable;
        }
        setToolTip(0, strTip);
        setToolTip(1, strTip);
        setToolTip(2, strTip);
    }
Esempio n. 2
0
AboutDlg::AboutDlg(wxWindow* parent,wxWindowID id)
{
	//(*Initialize(AboutDlg)
	wxBoxSizer* BoxSizer4;

	Create(parent, id, _("About"), wxDefaultPosition, wxDefaultSize, 0, _T("id"));
	SetClientSize(wxSize(17,16));
	BoxSizer1 = new wxBoxSizer(wxVERTICAL);
	StaticBitmap1 = new wxStaticBitmap(this, ID_STATICBITMAP1, wxBitmap(wxImage(_T("img\\boomworks_logo.bmp"))), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICBITMAP1"));
	BoxSizer1->Add(StaticBitmap1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
	BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
	StaticBitmap2 = new wxStaticBitmap(this, ID_STATICBITMAP2, wxBitmap(wxImage(_T("img\\SourceCounter.ico"))), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICBITMAP2"));
	BoxSizer2->Add(StaticBitmap2, 1, wxTOP|wxBOTTOM|wxALIGN_TOP|wxALIGN_CENTER_HORIZONTAL, 5);
	BoxSizer3 = new wxBoxSizer(wxVERTICAL);
	StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("SourceCounter"), wxDefaultPosition, wxSize(214,14), 0, _T("ID_STATICTEXT1"));
	BoxSizer3->Add(StaticText1, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Unicode version 1.0.1.0"), wxDefaultPosition, wxSize(214,14), 0, _T("ID_STATICTEXT2"));
	BoxSizer3->Add(StaticText2, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Label"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
	BoxSizer3->Add(StaticText4, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
	StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("(C) 1999 - 2010 BoomWorks.Org"), wxDefaultPosition, wxSize(214,13), 0, _T("ID_STATICTEXT3"));
	BoxSizer3->Add(StaticText3, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("mailto:[email protected]"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5"));
	BoxSizer3->Add(StaticText5, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
	BoxSizer3->Add(BoxSizer4, 1, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	StaticText6 = new wxStaticText(this, ID_STATICTEXT6, _("Thanks to:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT6"));
	BoxSizer3->Add(StaticText6, 0, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM, 5);
	StaticText7 = new wxStaticText(this, ID_STATICTEXT7, _("[email protected] - Korea translator"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT7"));
	BoxSizer3->Add(StaticText7, 0, wxLEFT|wxEXPAND|wxALIGN_LEFT|wxALIGN_BOTTOM, 10);
	m_bmpBtnBMW = new wxBitmapButton(this, ID_BITMAPBUTTON1, wxBitmap(wxImage(_T("img\\www.boomworks.net--thumb.jpg"))), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON1"));
	m_bmpBtnBMW->SetDefault();
	BoxSizer3->Add(m_bmpBtnBMW, 0, wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer3->Add(-1,-1,0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	Button1 = new wxButton(this, wxID_OK, _("&Ok"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("wxID_OK"));
	BoxSizer3->Add(Button1, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer3->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	BoxSizer2->Add(BoxSizer3, 2, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_TOP|wxALIGN_CENTER_HORIZONTAL, 5);
	BoxSizer1->Add(BoxSizer2, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	SetSizer(BoxSizer1);
	BoxSizer1->SetSizeHints(this);
	Center();

	Connect(ID_BITMAPBUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&AboutDlg::OnBtnBMWClick);
	Connect(wxID_OK,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&AboutDlg::OnButton1Click);
	//*)

	// Set link to boomworks.org
	m_pLinkBMW = new wxHyperLink(this, ID_TXT_BMW, _("http://www.boomworks.org"));
	BoxSizer4->Add(m_pLinkBMW, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
	// Set Version by AutoVersioning tool
	wxString strVersion(AutoVersion::FULLVERSION_STRING, wxConvUTF8);
	wxString strStatus(AutoVersion::STATUS, wxConvUTF8);

	StaticText2->SetLabel(_T("Version ") + strVersion + _T(" ") + strStatus);

	// Get wx version infomation//
	wxString msg = wxbuildinfo(long_f);
	StaticText4->SetLabel(msg);
}
void
CZPAssetsPanelObserver::Initialize()
{
	LogFunctionEnterExit;
	
	do
	{
		// Clear User Name
		this->SetTextControlData( kZPUIAssetsPanelUsernameWidgetID, kNullString );
		
#ifdef DEBUG
		char version[30] = {0};
		char svnRev [10];
		strcpy(svnRev, kIZPSVNNumberStr+11 );
		sprintf(version, "%d.%02d.%02d.%sD", kIZPMajorVersion, kIZPMinorVersion, kIZPBuildNumber, endPtrAtSpace(svnRev));
#else
		char version[20] = {0};
		sprintf(version, "%d.%02d.%02d", kIZPMajorVersion, kIZPMinorVersion, kIZPBuildNumber);
#endif
		PMString strVersion(version);
		strVersion.SetTranslatable(kFalse);

		this->SetTextControlData( kZPUIAssetsPanelVersionWidgetID, strVersion );
		this->EnableDisableControls( false );	//Controls comes as enabled after app crash.
	}while(kFalse);
}
void
JabberProtocol::ProcessVersionRequest(BString req_id, BString req_from)
{
	XMLEntity   *entity_iq, *entity_query;
	char **atts_iq    = CreateAttributeMemory(6);
	char **atts_query = CreateAttributeMemory(2);

	// assemble attributes;
	strcpy(atts_iq[0], "id");
	strcpy(atts_iq[1], req_id.String());

	strcpy(atts_iq[2], "to");
	strcpy(atts_iq[3], req_from.String());

	strcpy(atts_iq[4], "type");
	strcpy(atts_iq[5], "result");

	strcpy(atts_query[0], "xmlns");
	strcpy(atts_query[1], "jabber:iq:version");

	// construct XML tagset
	entity_iq    = new XMLEntity("iq", (const char **)atts_iq);
	entity_query = new XMLEntity("query", (const char **)atts_query);

	entity_iq->AddChild(entity_query);
	
	entity_query->AddChild("name", NULL, "Dengon");
	entity_query->AddChild("version", NULL, "1.0 (rev: "DENGON_SVNVERSION")");

	BString strVersion("Haiku");
	
	BString os_info;
	utsname uname_info;
	if (uname(&uname_info) == 0) {
		os_info = uname_info.sysname;
		long revision = 0;
		if (sscanf(uname_info.version, "r%ld", &revision) == 1) {
			char version[16];
			snprintf(version, sizeof(version), "%ld", revision);
			os_info += " (rev: ";
			os_info += version;
			os_info += ")";
		}
	}

	entity_query->AddChild("os", NULL, os_info.String());

	// send XML command
	char *str = entity_iq->ToString();
	socketAdapter->SendData(BString(str));
	free(str);

	DestroyAttributeMemory(atts_iq, 6);
	DestroyAttributeMemory(atts_query, 2);
	
	delete entity_iq;
}
Esempio n. 5
0
void KPrWebPresentation::writeStartOfHeader(QTextStream& streamOut, QTextCodec *codec, const QString& subtitle, const QString& next)
{
    QString mimeName ( codec->mimeName() );
    if ( isXML() )
    {   //Write out the XML declaration
        streamOut << "<?xml version=\"1.0\" encoding=\""
                  << mimeName << "\"?>\n";
    }
    // write <!DOCTYPE
    streamOut << "<!DOCTYPE ";
    if ( isXML() )
    {
        streamOut << "html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"";
        streamOut << " \"DTD/xhtml1-transitional.dtd\">\n";
    }
    else
    {
        streamOut << "HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"";
        streamOut << " \"http://www.w3.org/TR/html4/loose.dtd\">\n";
    }
    streamOut << "<html";
    if ( isXML() )
    {
        // XHTML has an extra attribute defining its namespace (in the <html> opening tag)
        streamOut << " xmlns=\"http://www.w3.org/1999/xhtml\"";
    }
    streamOut << ">\n" << "<head>\n";

    // Declare what charset we are using
    streamOut << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
    streamOut << mimeName << '"' << ( isXML() ?" /":"") << ">\n" ;

    // Tell who we are (with the CVS revision number) in case we have a bug in our output!
    QString strVersion("$Revision: 508787 $");
    // Eliminate the dollar signs
    //  (We don't want that the version number changes if the HTML file is itself put in a CVS storage.)
    streamOut << "<meta name=\"Generator\" content=\"KPresenter's Web Presentation "
              << strVersion.mid(10).replace("$","")
              << "\""<< ( isXML() ?" /":"") // X(HT)ML closes empty elements, HTML not!
              << ">\n";

    // Load the next slide after time elapsed
    if ( (timeBetweenSlides > 0) && ( ! next.isNull() ) )
    {
        streamOut << "<meta http-equiv=\"refresh\" content=\""
                  << timeBetweenSlides
                  << ";url=" << next
                  << "\">\n";
    }

    streamOut << "<title>"<< escapeHtmlText( codec, title ) << " - " << escapeHtmlText( codec, subtitle ) << "</title>\n";

    // ### TODO: transform documentinfo.xml into many <META> elements (at least the author!)
}
Esempio n. 6
0
CString CPEFileInfo::GetDesc()
{
    if(!m_strDesc.IsEmpty())
        return m_strDesc;

    DWORD dwVersionLength = 0;
    LPCTSTR szVersion = GetDescFromFile(_T("FileDescription"), &dwVersionLength);
    if(szVersion != NULL)
    {
        CString strVersion(szVersion, dwVersionLength);
        m_strDesc = strVersion;
    }
    return m_strDesc;
}
bool	CPackageToolDoc::SetGameVersion(string& strGameVersion)
{
	string strVersion(strGameVersion);

	strupr((char*)strVersion.c_str());
	bool bFlag = true;
	if(strVersion.length()==10)
	{
		for(int i=0;i < 10; i++)
		{
			if(i==2 || i == 5)
			{
				if(strVersion[i] != '.')
				{
					bFlag=false;
					break;
				}
			}
			else
			{
				if( !(strVersion[i] >= '0' && strVersion[i] <= '9' ) && 
					!(strVersion[i] >= 'A' && strVersion[i] <= 'Z' ) )
				{
					bFlag=false;
					break;
				}
			}
		}
	}
	else
	{
		bFlag=false;
	}

	if(bFlag==false)
	{
		string strTempt("此版本号错误:\n");
		strTempt += strVersion;
		::AfxMessageBox(strTempt.c_str());
		return false;
	}
	else
	{
		m_strGameVersion=strGameVersion;
		return true;
	}
	return false;
}
CCGlesVersion CCConfiguration::getGlesVersion()
{
	// To get the Opengl ES version
	std::string strVersion((char *)glGetString(GL_VERSION));
	if ((int)strVersion.find("1.0") != -1)
	{
		return GLES_VER_1_0;
	}
	else if ((int)strVersion.find("1.1") != -1)
	{
		return GLES_VER_1_1;
	}
	else if ((int)strVersion.find("2.0") != -1)
	{
		return GLES_VER_2_0;
	}

	return GLES_VER_INVALID;
}
Esempio n. 9
0
// CUpdataDownload 消息处理程序
BOOL CUpdataDownload::OnInitDialog()
{
	CDialog::OnInitDialog();
	if(!LinkService(CGlobalData::m_strServiceIP,CGlobalData::m_nServicePort))
	{
		CGlobalData::PrintLogInfo("CUpdataDownload","连接服务程序错误或服务程序没有启动!",'E');
		MessageBox(_T("连接服务程序错误或服务器没有启动!"));
	}

	int   nSendLeng = 0;
	Package(m_pStrData,'V',"",nSendLeng);
	SendData(m_pStrData,nSendLeng);

	CString strVersion(_T("客户端当前版本号为: "));
	strVersion += CGlobalData::m_strClientVersionNum;
	GetDlgItem(IDC_STATIC_CLIENT_ID)->SetWindowText(strVersion);
	GetDlgItem(ID_BUTTON_UPDATA)->EnableWindow(FALSE);
	return TRUE;
}
Esempio n. 10
0
void  CUpdataDownload::RecvData(char *pPackData)
{
	int nDataHeadLen   = sizeof(DataPackHead);
	pDataPackHead pDH  = (pDataPackHead)pPackData;
	char *pData        = pPackData+nDataHeadLen;

	if(pDH->nContentLen <RECV_DATA && 0 == memcmp(pData+(pDH->nContentLen),m_strPackEnd,m_nPackEndLen))  //Xt: 包的结束标志是否正确
	{ 
		switch(pDH->cType)
		{
		case ('V'):                                                                                      //Xt: 路径节点接收
			{
				CGlobalData::PrintLogInfo("CDownloadDlg","接收服务器服务类型V",'O');
				int nRecvContentLen = strlen(pData);
				if(pData[0] != '\0' && nRecvContentLen<10)
				{
					memcpy(CGlobalData::m_strServerVersionNum,pData,nRecvContentLen);
					CString strVersion(_T("服务器当前版本号为: "));
					strVersion += CGlobalData::m_strServerVersionNum;
					CUpdataDownload::m_pThis->GetDlgItem(IDC_STATIC_SERVER_ID)->SetWindowText(strVersion);
					//Xt: 检测当前版本和服务器版本是否一致
					if(memcmp(CGlobalData::m_strClientVersionNum,CGlobalData::m_strServerVersionNum,strlen(CGlobalData::m_strClientVersionNum)))
					{
						GetDlgItem(ID_BUTTON_UPDATA)->EnableWindow(TRUE);
					}
				}
				break;
			}
		case ('U'):                                                       //Xt:  下载文件接收
			{
				CGlobalData::PrintLogInfo("CDownloadDlg","接收服务器服务类型U",'O');
				int nPackLen = atoi(pData);
				m_bRun = true;
				ResetEvent(m_hEvent);
				UpdataFile(m_strDownloadName,nPackLen);
				m_bRun = false;
				break;
			}
		}
	}	
}
Esempio n. 11
0
CCGlesVersion CCConfiguration::getGlesVersion()
{
	// To get the Opengl ES version
	std::string strVersion((char *)glGetString(GL_VERSION));
	if ((int)strVersion.find("1.0") != -1)
	{
		return GLES_VER_1_0;
	}
	else if ((int)strVersion.find("1.1") != -1)
	{
		return GLES_VER_1_1;
	}
	else if ((int)strVersion.find("2.0") != -1)
	{
		return GLES_VER_2_0;
	}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_UNIX)
	return GLES_VER_2_0;
#else


	return GLES_VER_INVALID;
#endif
}
Esempio n. 12
0
void SemVersion::set(const char *version)
{
    std::string strVersion(version);

    this->set(strVersion);
}