Exemplo n.º 1
0
String ColorProfile::GetProfileInfo()
{
//	String name= GetProductName();
	String desc= GetProductDesc();
	String info= GetProductInfo();
	String cpyr= GetCopyrightStr();

	oStringstream ost;
	const TCHAR* space= _T("\r\n");
//	ost << name;
//	if (!name.empty())
//		ost << space;
	if (!desc.empty()) // && desc != name)
		ost << desc << space;
	if (!info.empty() && info != desc)// && info != name)
		ost << info << space;
	if (!cpyr.empty() && cpyr != desc && /*cpyr != name &&*/ cpyr != info)
		ost << cpyr << space;

	String str= ost.str();

	while (str[0] == _T(' '))
		str.erase(0);

//	while (!str.empty() && str[str.size() - 1] == _T(' '))
//		str.erase(str.size() - 1);

	return str;
}
Exemplo n.º 2
0
static install_state carbonui_website(install_info *info)
{
    const char *website_text;
    int do_launch;

    carbon_debug("***carbonui_okay()\n");

    // Set screen to the product website page
    carbon_ShowInstallScreen(MyRes, WEBSITE_PAGE);

    // Set product name
    carbon_SetLabelText(MyRes, WEBSITE_PRODUCT_LABEL_ID, GetProductDesc(info));

    // Set website text if desired
    website_text = GetWebsiteText(info);
    if(website_text)
        carbon_SetLabelText(MyRes, WEBSITE_TEXT_LABEL_ID, website_text);

    // Hide the proper widget based on the auto_url state
    do_launch = 0;
    if(strcmp(GetAutoLaunchURL(info), "true") == 0 )
    {
        do_launch = 1;
        carbon_HideControl(MyRes, WEBSITE_BROWSER_BUTTON_ID);
        //hideme = glade_xml_get_widget(setup_glade, "auto_url_no");
    }
    else
    {
        do_launch = 0;
        carbon_HideControl(MyRes, WEBSITE_BROWSER_TEXT_ID);
        //hideme = glade_xml_get_widget(setup_glade, "auto_url_yes");
    }

    // Automatically launch the browser if necessary
    if(do_launch)
        launch_browser(info, carbon_LaunchURL);

    return carbon_IterateForState(MyRes, &cur_state);
}