Updated icon (they came from fossy777)

This commit is contained in:
Martin Raiber 2012-09-10 01:38:34 +02:00
parent 19555f6208
commit 0e66d14426
13 changed files with 49 additions and 46 deletions

View File

@ -42,7 +42,7 @@ ConfigPath::ConfigPath(wxWindow* parent)
{
mod=false;
SetIcon(wxIcon(res_path+wxT("backup-ok-big.")+ico_ext, ico_type));
SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type));
dirs=Connector::getSharedPaths();

View File

@ -27,7 +27,7 @@ extern wxBitmapType ico_type;
Logs::Logs(wxWindow* parent) : GUILogfiles(parent)
{
SetIcon(wxIcon(res_path+wxT("backup-ok-big.")+ico_ext, ico_type));
SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type));
logentries=Connector::getLogEntries();
if(Connector::hasError())

View File

@ -117,7 +117,7 @@ wxTextValidator getDigitSlashValidator(void)
Settings::Settings(wxWindow* parent) : GUISettings(parent)
{
SetIcon(wxIcon(res_path+wxT("backup-ok-big.")+ico_ext, ico_type));
SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type));
settings=new CFileSettingsReader("urbackup/data/settings.cfg");
std::wstring t;
@ -671,44 +671,45 @@ void Settings::OnOkClick( wxCommandEvent& event )
std::string ndata;
std::vector<std::wstring> keys=settings->getKeys();
for(size_t i=0;i<keys.size();++i)
{
std::string key=ConvertToUTF8(keys[i]);
ndata+=key+"=";
std::map<std::string, std::string>::iterator iter=n_vals.find(key);
if(iter!=n_vals.end())
{
ndata+=iter->second;
}
else
{
std::wstring val;
if(settings->getValue(keys[i], &val) )
ndata+=ConvertToUTF8(val);
}
ndata+="\n";
}
for(std::map<std::string, std::string>::iterator it=n_vals.begin();it!=n_vals.end();++it)
{
bool found=false;
const std::string &nkey=it->first;
std::string def_value;
bool found_key=false;
std::wstring key_w=ConvertToUnicode(nkey);
for(size_t i=0;i<keys.size();++i)
{
if(ConvertToUTF8(keys[i])==nkey)
if(keys[i]==key_w)
{
found=true;
found_key=true;
break;
}
}
if(!found)
if( found_key || !settings->getValue(it->first+"_def", &def_value) || def_value!=it->second )
{
ndata+=nkey+"="+it->second+"\n";
}
}
for(size_t i=0;i<keys.size();++i)
{
std::string key=ConvertToUTF8(keys[i]);
std::map<std::string, std::string>::iterator iter=n_vals.find(key);
if(iter==n_vals.end())
{
std::wstring val;
if(settings->getValue(keys[i], &val) )
{
ndata+=key+"="+ConvertToUTF8(val)+"\n";
}
}
}
Connector::updateSettings(ndata);
Close();

View File

@ -76,7 +76,7 @@ void TrayIcon::OnPopupClick(wxCommandEvent &evt)
int rc=Connector::startBackup(full);
if(rc==1)
{
SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type), wxT("Warte auf Server..."));
SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), wxT("Warte auf Server..."));
if(timer!=NULL)
timer->Start(1000);
}
@ -99,7 +99,7 @@ void TrayIcon::OnPopupClick(wxCommandEvent &evt)
int rc=Connector::startImage(full);
if(rc==1)
{
SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type), _("Waiting for server..."));
SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), _("Waiting for server..."));
if(timer!=NULL)
timer->Start(1000);
}

View File

@ -34,4 +34,7 @@ public:
private:
int balloon_action;
std::string new_ident;
};
};
#define ICON_WIDTH 16
#define ICON_HEIGHT 16

View File

@ -13,13 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Deutsch (Deutschland) resources
// German (Germany) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@ -54,8 +52,8 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "icon1.ico"
#endif // Deutsch (Deutschland) resources
IDI_ICON1 ICON "icon3.ico"
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////

View File

@ -214,6 +214,7 @@
<ItemGroup>
<None Include="icon1.ico" />
<None Include="icon2.ico" />
<None Include="icon3.ico" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="UrBackupClientGUI.rc" />

View File

@ -112,6 +112,9 @@
<None Include="icon2.ico">
<Filter>Ressourcendateien</Filter>
</None>
<None Include="icon3.ico">
<Filter>Ressourcendateien</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="UrBackupClientGUI.rc">

View File

@ -143,7 +143,7 @@ bool MyApp::OnInit()
//wxInitAllImageHandlers();
tray=new TrayIcon;
bool b=tray->SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type), wxT("UrBackup Client"));
bool b=tray->SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), wxT("UrBackup Client"));
if(!b)
{
std::cout << "Setting icon failed." << std::endl;
@ -245,7 +245,7 @@ void MyTimer::Notify()
{
last_status=_("Cannot connect to backup server");
if(tray!=NULL)
tray->SetIcon(wxIcon(res_path+wxT("backup-bad.")+ico_ext, ico_type), last_status);
tray->SetIcon(wxIcon(res_path+wxT("backup-bad.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), last_status);
icon_type=4;
}
working=false;
@ -348,25 +348,25 @@ void MyTimer::Notify()
{
case 0:
if(tray!=NULL)
tray->SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type), status_text);
tray->SetIcon(wxIcon(res_path+wxT("backup-ok.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), status_text);
if(timer!=NULL)
timer->Start(60000);
break;
case 1:
if(tray!=NULL)
tray->SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type), status_text);
tray->SetIcon(wxIcon(res_path+wxT("backup-progress.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), status_text);
if(timer!=NULL)
timer->Start(10000);
break;
case 2:
if(tray!=NULL)
tray->SetIcon(wxIcon(res_path+wxT("backup-bad.")+ico_ext, ico_type), status_text);
tray->SetIcon(wxIcon(res_path+wxT("backup-bad.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), status_text);
if(timer!=NULL)
timer->Start(60000);
break;
case 3:
if(tray!=NULL)
tray->SetIcon(wxIcon(res_path+wxT("backup-progress-pause.")+ico_ext, ico_type), status_text);
tray->SetIcon(wxIcon(res_path+wxT("backup-progress-pause.")+ico_ext, ico_type, ICON_WIDTH, ICON_HEIGHT), status_text);
if(timer!=NULL)
timer->Start(60000);

View File

@ -8,7 +8,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101

View File

@ -2,7 +2,7 @@
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!include WinVer.nsh
!include "x64.nsh"
!define MUI_ICON "backup-ok.ico"
!define MUI_ICON "icon3.ico"
SetCompressor /FINAL /SOLID lzma
@ -172,7 +172,6 @@ Section "install"
${EndIf}
File "data\backup-bad.ico"
File "data\backup-ok.ico"
File "data\backup-ok-big.ico"
File "data\backup-progress.ico"
File "data\new.txt"
File "data\logo1.png"

View File

@ -2,7 +2,7 @@
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!include WinVer.nsh
!include "x64.nsh"
!define MUI_ICON "backup-ok.ico"
!define MUI_ICON "icon3.ico"
SetCompressor /FINAL /SOLID lzma
@ -166,7 +166,6 @@ Section "install"
${EndIf}
File "data\backup-bad.ico"
File "data\backup-ok.ico"
File "data\backup-ok-big.ico"
File "data\backup-progress.ico"
File "data\new.txt"
File "data\logo1.png"

View File

@ -1,8 +1,8 @@
!define MUI_BRANDINGTEXT "UrBackup Update 0.40.1"
!define MUI_BRANDINGTEXT "UrBackup Update 1.0"
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!include WinVer.nsh
!include "x64.nsh"
!define MUI_ICON "backup-ok.ico"
!define MUI_ICON "icon3.ico"
SetCompressor /FINAL /SOLID lzma
@ -161,7 +161,6 @@ Section "install"
${EndIf}
File "data\backup-bad.ico"
File "data\backup-ok.ico"
File "data\backup-ok-big.ico"
File "data\backup-progress.ico"
File "data\new.txt"
File "data\logo1.png"