\r
/* XPM */\r
static char *pulldown_xpm[] = {\r
-/* columns rows colors chars-per-pixel */\r
-"16 15 2 1",\r
+"16 16 2 1",\r
". c Black",\r
" c None",\r
/* pixels */\r
" ",\r
" ",\r
" ",\r
+" ....... ",\r
" ..... ",\r
" ... ",\r
" . ",\r
wxSize pulldownSize;\r
\r
#ifdef __WXMSW__\r
- pulldownSize.Set(12,15);\r
+ pulldownSize.Set(12,16);\r
#else\r
#ifdef __WXGTK__\r
- pulldownSize.Set(18,15);\r
+ pulldownSize.Set(18,16);\r
+#else\r
+// The pulldown doesn't currently work on wxMac under AUI with native toolbars.\r
+// This should be revisited when the long-awaited wxAuiToolbar arrives. See\r
+// wxWidgets bug no. 1742682\r
+#if (wxMAC_USE_NATIVE_TOOLBAR == 0)\r
+ pulldownSize.Set(10,16);\r
#else\r
-// pulldownSize.Set(16,15);\r
-// The pulldown doesn't currently work on wxMac.\r
pulldownSize.Set(0,0);\r
#endif\r
+#endif\r
#endif\r
\r
m_toolBar = toolBar;\r
\r
if (toolbar)\r
{\r
+ // The pulldown doesn't currently work on wxMac under AUI with native toolbars.\r
+ // This should be revisited when the long-awaited wxAuiToolbar arrives. See\r
+ // wxWidgets bug no. 1742682\r
+ // In the Mac case, use appropriately modified text for the button.\r
+#if defined(__WXMAC__) && (wxMAC_USE_NATIVE_TOOLBAR == 1)\r
+ toolbar->AddTool(id, _("Execute Plugin"), wxBitmap(plugins_xpm), _("Select a plugin."));\r
+ pulldownButton = toolbar->AddMenuPulldownTool(MNU_PLUGINBUTTONLIST, wxT("Execute Plugin"), wxT("Select a plugin."), popupmenu); \r
+#else\r
toolbar->AddTool(id, _("Plugins"), wxBitmap(plugins_xpm), _("Execute the last used plugin."));\r
pulldownButton = toolbar->AddMenuPulldownTool(MNU_PLUGINBUTTONLIST, wxT("Execute Plugin"), wxT("Select a plugin."), popupmenu); \r
+#endif\r
}\r
}\r
\r
// Call the last plugin used, or popup the menu if this is the first time\r
wxWindow *pluginButtonMenuFactory::StartDialog(frmMain *form, pgObject *obj)\r
{\r
+ // The pulldown doesn't currently work on wxMac under AUI with native toolbars.\r
+ // This should be revisited when the long-awaited wxAuiToolbar arrives. See\r
+ // wxWidgets bug no. 1742682\r
+ // In the Mac case we always popup the menu.\r
+#if !(defined(__WXMAC__) && (wxMAC_USE_NATIVE_TOOLBAR == 1))\r
if (form->GetLastPluginUtility())\r
return form->GetLastPluginUtility()->StartDialog(form, obj);\r
else\r
+#endif\r
{\r
wxMouseEvent evt;\r
pulldownButton->DoProcessLeftClick(evt);\r
#error wxWidgets must be compiled with Unicode support to build pgAdmin.
#endif
+#ifdef __WXMAC__
+#if (wxMAC_USE_NATIVE_TOOLBAR == 1)
+#warning *** wxMAC_USE_NATIVE_TOOLBAR is enabled in wxWidgets. Toolbar pulldown menus will be disabled in this build.
+#endif
+#endif
+
const float SERVER_MIN_VERSION = 7.3f;
// Some redefines for modern Microsoft compilers