// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __VMS
-// vms_jackets.h should for proper working be included before anything else
-# include <vms_jackets.h>
-#undef ConnectionNumber
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include <gpe/init.h>
#endif
-#include "wx/gtk/win_gtk.h"
#include "wx/gtk/private.h"
#include "wx/apptrait.h"
+#if wxUSE_LIBHILDON
+ #include <hildon-widgets/hildon-program.h>
+#endif // wxUSE_LIBHILDON
+
#include <gdk/gdkx.h>
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
-BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
- EVT_IDLE(wxAppBase::OnIdle)
-END_EVENT_TABLE()
-
wxApp::wxApp()
{
#ifdef __WXDEBUG__
}
}
+#if wxUSE_LIBHILDON
+ m_hildonProgram = hildon_program_get_instance();
+ if ( !m_hildonProgram )
+ {
+ wxLogError(_("Unable to initialize Hildon program"));
+ return false;
+ }
+#endif // wxUSE_LIBHILDON
+
return true;
}
bool init_result;
+ int i;
#if wxUSE_UNICODE
// gtk_init() wants UTF-8, not wchar_t, so convert
- int i;
char **argvGTK = new char *[argc_ + 1];
for ( i = 0; i < argc_; i++ )
{
wxArrayString opt, desc;
m_traits->GetStandardCmdLineOptions(opt, desc);
- for ( int i = 0; i < argc_; i++ )
+ for ( i = 0; i < argc_; i++ )
{
// leave just the names of the options with values
const wxString str = wxString(argv_[i]).BeforeFirst('=');
{
if (m_idleSourceId != 0)
g_source_remove(m_idleSourceId);
-#if wxUSE_THREADS
- delete m_idleMutex;
- m_idleMutex = NULL;
-#endif
+
// release reference acquired by Initialize()
g_type_class_unref(g_type_class_peek(GTK_TYPE_WIDGET));
gdk_threads_leave();
wxAppBase::CleanUp();
+
+ // delete this mutex as late as possible as it's used from WakeUpIdle(), in
+ // particular do it after calling the base class CleanUp() which can result
+ // in it being called
+#if wxUSE_THREADS
+ delete m_idleMutex;
+ m_idleMutex = NULL;
+#endif
}
void wxApp::WakeUpIdle()