diff options
author | Carsten Driesner <cd@openoffice.org> | 2010-03-30 17:08:27 +0200 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2010-03-30 17:08:27 +0200 |
commit | e9b1c40f268cc259c82ea499977bb2576b3bc98f (patch) | |
tree | 251a5f6658e5b729524422a814499a25ef17c408 | |
parent | f2be66c43b4ccccfa33e57bf20f9a8bdeccfe86d (diff) | |
parent | 9449109491fbc00c091673bc4c2c8143c211c464 (diff) |
nativea: Merge changes
-rw-r--r-- | desktop/util/ooverinfo.rc | 2 | ||||
-rw-r--r-- | desktop/util/verinfo.rc | 2 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 40 | ||||
-rw-r--r-- | sysui/desktop/icons/makefile.mk | 2 | ||||
-rwxr-xr-x | sysui/desktop/icons/ooo3_open.ico | bin | 0 -> 295606 bytes | |||
-rwxr-xr-x | sysui/desktop/icons/so9_open.ico | bin | 0 -> 295606 bytes |
6 files changed, 31 insertions, 15 deletions
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc index 4603278ba4..7fa252b168 100644 --- a/desktop/util/ooverinfo.rc +++ b/desktop/util/ooverinfo.rc @@ -113,7 +113,7 @@ VS_VERSION_INFO versioninfo 16 ICON "icons\\empty-template.ico" 17 ICON "icons\\empty-document.ico" 18 ICON "icons\\ooo-configuration.ico" -19 ICON "icons\\ooo-open.ico" +19 ICON "icons\\ooo3_open.ico" 20 ICON "icons\\empty-document.ico" 21 ICON "icons\\ooo3_writer_app.ico" 22 ICON "icons\\ooo3_calc_app.ico" diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc index dda8c8d046..494f9f700e 100644 --- a/desktop/util/verinfo.rc +++ b/desktop/util/verinfo.rc @@ -118,7 +118,7 @@ VS_VERSION_INFO versioninfo 16 ICON "icons\\empty-template.ico" 17 ICON "icons\\empty-document.ico" 18 ICON "icons\\so8-configuration.ico" -19 ICON "icons\\so8-open.ico" +19 ICON "icons\\so9_open.ico" 20 ICON "icons\\empty-document.ico" 21 ICON "icons\\so9_writer_app.ico" 22 ICON "icons\\so9_calc_app.ico" diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 01ef550aa2..292aaac063 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -109,7 +109,7 @@ using namespace ::osl; #define ICON_TEMPLATE 16 #define ICON_MACROLIBRARY 17 #define ICON_CONFIGURATION 18 -#define ICON_OPEN 19 +#define ICON_OPEN 5 // See index of open folder icon in shell32.dll #define ICON_SETUP 500 #define SFX_TASKBAR_NOTIFICATION WM_USER+1 @@ -124,6 +124,7 @@ static void OnDrawItem(HWND hwnd, LPDRAWITEMSTRUCT lpdis); typedef struct tagMYITEM { OUString text; + OUString module; UINT iconId; } MYITEM; @@ -152,7 +153,7 @@ static bool isNT() // ------------------------------- -static void addMenuItem( HMENU hMenu, UINT id, UINT iconId, const OUString& text, int& pos, int bOwnerdraw ) +static void addMenuItem( HMENU hMenu, UINT id, UINT iconId, const OUString& text, int& pos, int bOwnerdraw, const OUString& module ) { MENUITEMINFOW mi; memset( &mi, 0, sizeof( MENUITEMINFOW ) ); @@ -175,6 +176,7 @@ static void addMenuItem( HMENU hMenu, UINT id, UINT iconId, const OUString& text MYITEM *pMyItem = new MYITEM; pMyItem->text = text; pMyItem->iconId = iconId; + pMyItem->module = module; mi.dwItemData = (DWORD) pMyItem; } else @@ -245,6 +247,8 @@ static HMENU createSystrayMenu( ) { SvtModuleOptions::E_SMATH, IDM_MATH, ICON_MATH_DOCUMENT, MATH_URL }, }; + OUString aEmpty; + // insert the menu entries for launching the applications for ( size_t i = 0; i < sizeof( aMenuItems ) / sizeof( aMenuItems[0] ); ++i ) { @@ -260,19 +264,21 @@ static HMENU createSystrayMenu( ) continue; addMenuItem( hMenu, aMenuItems[i].nMenuItemID, aMenuItems[i].nMenuIconID, - pShutdownIcon->GetUrlDescription( sURL ), pos, true ); + pShutdownIcon->GetUrlDescription( sURL ), pos, true, aEmpty ); } + + // insert the remaining menu entries addMenuItem( hMenu, IDM_TEMPLATE, ICON_TEMPLATE, - pShutdownIcon->GetResString( STR_QUICKSTART_FROMTEMPLATE ), pos, true); - addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false ); - addMenuItem( hMenu, IDM_OPEN, ICON_OPEN, pShutdownIcon->GetResString( STR_QUICKSTART_FILEOPEN ), pos, true ); - addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false ); + pShutdownIcon->GetResString( STR_QUICKSTART_FROMTEMPLATE ), pos, true, aEmpty); + addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false, aEmpty ); + addMenuItem( hMenu, IDM_OPEN, ICON_OPEN, pShutdownIcon->GetResString( STR_QUICKSTART_FILEOPEN ), pos, true, OUString::createFromAscii( "shell32" )); + addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false, aEmpty ); #endif - addMenuItem( hMenu, IDM_INSTALL,0, pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH ), pos, false ); - addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false ); - addMenuItem( hMenu, IDM_EXIT, 0, pShutdownIcon->GetResString( STR_QUICKSTART_EXIT ), pos, false ); + addMenuItem( hMenu, IDM_INSTALL,0, pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH ), pos, false, aEmpty ); + addMenuItem( hMenu, static_cast< UINT >( -1 ), 0, OUString(), pos, false, aEmpty ); + addMenuItem( hMenu, IDM_EXIT, 0, pShutdownIcon->GetResString( STR_QUICKSTART_EXIT ), pos, false, aEmpty ); // indicate status of autostart folder CheckMenuItem( hMenu, IDM_INSTALL, MF_BYCOMMAND | (ShutdownIcon::GetAutostart() ? MF_CHECKED : MF_UNCHECKED) ); @@ -738,9 +744,17 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis) int cx = GetSystemMetrics( SM_CXSMICON ); int cy = GetSystemMetrics( SM_CYSMICON ); - HICON hIcon = (HICON) LoadImageA( GetModuleHandle( NULL ), MAKEINTRESOURCE( pMyItem->iconId ), - IMAGE_ICON, cx, cy, - LR_DEFAULTCOLOR | LR_SHARED ); + HICON hIcon( 0 ); + + if ( pMyItem->module.getLength() > 0 ) + hIcon = (HICON) LoadImageA( GetModuleHandleW( reinterpret_cast<LPCWSTR>( pMyItem->module.getStr() )), + MAKEINTRESOURCE( pMyItem->iconId ), + IMAGE_ICON, cx, cy, + LR_DEFAULTCOLOR | LR_SHARED ); + else + hIcon = (HICON) LoadImageA( GetModuleHandle( NULL ), MAKEINTRESOURCE( pMyItem->iconId ), + IMAGE_ICON, cx, cy, + LR_DEFAULTCOLOR | LR_SHARED ); // DrawIconEx( lpdis->hDC, x, y+(height-cy)/2, hIcon, cx, cy, 0, NULL, DI_NORMAL ); diff --git a/sysui/desktop/icons/makefile.mk b/sysui/desktop/icons/makefile.mk index c0668665e1..13ca8be567 100644 --- a/sysui/desktop/icons/makefile.mk +++ b/sysui/desktop/icons/makefile.mk @@ -114,6 +114,7 @@ all: \ $(MISC)$/ooo3_math_doc.ico \ $(MISC)$/ooo3_writer_tem.ico \ $(MISC)$/ooo3_empty_tem.ico \ + $(MISC)$/ooo3_open.ico \ $(MISC)$/ooo11-base-doc.ico \ $(MISC)$/ooo11-calc-doc.ico \ $(MISC)$/ooo11-calc-tem.ico \ @@ -176,6 +177,7 @@ all: \ $(MISC)$/so9_chart_doc.ico \ $(MISC)$/so9_writer_app.ico \ $(MISC)$/so9_draw_app.ico \ + $(MISC)$/so9_open.ico \ $(MISC)$/so7-base-doc.ico \ $(MISC)$/so7-calc-doc.ico \ $(MISC)$/so7-calc-tem.ico \ diff --git a/sysui/desktop/icons/ooo3_open.ico b/sysui/desktop/icons/ooo3_open.ico Binary files differnew file mode 100755 index 0000000000..98fcea3748 --- /dev/null +++ b/sysui/desktop/icons/ooo3_open.ico diff --git a/sysui/desktop/icons/so9_open.ico b/sysui/desktop/icons/so9_open.ico Binary files differnew file mode 100755 index 0000000000..90f193d80d --- /dev/null +++ b/sysui/desktop/icons/so9_open.ico |