diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-11-14 11:49:08 +0000 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-11-14 13:53:03 +0100 |
commit | 349fa28a5998d10b110da1a7fcc6b5b24d5940b1 (patch) | |
tree | 04311dfa3546eb1a657e6ee984950a125fa5de10 /vcl/unx | |
parent | dc3ada4db5f6311aaf3154aed0bba17d96c2af9a (diff) |
cleanup gmenu conditionals, remove redundant casts.
Change-Id: I51ee0f6c8671c914626cf4332408b4e2b4918b47
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/app/gtkinst.cxx | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 38786f7ccce7..294fd1a8116e 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -510,49 +510,37 @@ SalBitmap* GtkInstance::CreateSalBitmap() #endif } -#if defined(ENABLE_DBUS) && defined(ENABLE_GIO) +#ifdef ENABLE_GMENU_INTEGRATION + SalMenu* GtkInstance::CreateMenu( sal_Bool bMenuBar, Menu* pVCLMenu ) { GtkSalMenu* pSalMenu = new GtkSalMenu( bMenuBar ); pSalMenu->SetMenu( pVCLMenu ); - - return static_cast<SalMenu*>( pSalMenu ); + return pSalMenu; } -#else -SalMenu* GtkInstance::CreateMenu( sal_Bool, Menu* ) { return NULL; } -#endif -#if defined(ENABLE_DBUS) && defined(ENABLE_GIO) void GtkInstance::DestroyMenu( SalMenu* pMenu ) { - (void)pMenu; delete pMenu; -// OSL_ENSURE( pMenu == 0, "DestroyMenu called with non-native menus" ); } -#else -void GtkInstance::DestroyMenu( SalMenu* ) {} -#endif -#if defined(ENABLE_DBUS) && defined(ENABLE_GIO) SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* pItemData ) { - GtkSalMenuItem* pMenuItem = new GtkSalMenuItem( pItemData ); - - return static_cast<SalMenuItem*>( pMenuItem ); + return new GtkSalMenuItem( pItemData ); } -#else -SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return NULL; } -#endif -#if defined(ENABLE_DBUS) && defined(ENABLE_GIO) void GtkInstance::DestroyMenuItem( SalMenuItem* pItem ) { - (void)pItem; delete pItem; -// OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" ); } -#else -void GtkInstance::DestroyMenuItem( SalMenuItem* ) {} + +#else // not ENABLE_GMENU_INTEGRATION + +SalMenu* GtkInstance::CreateMenu( sal_Bool, Menu* ) { return NULL; } +void GtkInstance::DestroyMenu( SalMenu* ) {} +SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return NULL; } +void GtkInstance::DestroyMenuItem( SalMenuItem* ) {} + #endif SalTimer* GtkInstance::CreateSalTimer() |