]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
Removed comment
[wxWidgets.git] / src / gtk / app.cpp
index c510079d6e11e5bca02f5582e1bfa428a6ecf135..5e88bc492d07ab7d6db07dcd58f88bc55385fda7 100644 (file)
     #include <hildon-widgets/hildon-program.h>
 #endif // wxUSE_LIBHILDON
 
+#if wxUSE_LIBHILDON2
+    #include <hildon/hildon.h>
+#endif // wxUSE_LIBHILDON2
+
 #include <gdk/gdkx.h>
 
 //-----------------------------------------------------------------------------
@@ -263,14 +267,13 @@ bool wxApp::OnInitGui()
         }
     }
 
-#if wxUSE_LIBHILDON
-    m_hildonProgram = hildon_program_get_instance();
-    if ( !m_hildonProgram )
+#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
+    if ( !GetHildonProgram() )
     {
         wxLogError(_("Unable to initialize Hildon program"));
         return false;
     }
-#endif // wxUSE_LIBHILDON
+#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
 
     return true;
 }
@@ -311,9 +314,9 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
 
     // (1) this variable exists for the sole purpose of specifying the encoding
     //     of the filenames for GTK+ programs, so use it if it is set
-    wxString encName(wxGetenv(_T("G_FILENAME_ENCODING")));
-    encName = encName.BeforeFirst(_T(','));
-    if (encName.CmpNoCase(_T("@locale")) == 0)
+    wxString encName(wxGetenv(wxT("G_FILENAME_ENCODING")));
+    encName = encName.BeforeFirst(wxT(','));
+    if (encName.CmpNoCase(wxT("@locale")) == 0)
         encName.clear();
     encName.MakeUpper();
 #if wxUSE_INTL
@@ -323,13 +326,13 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
         //     filenames in this locale too
         encName = wxLocale::GetSystemEncodingName().Upper();
         // (3) finally use UTF-8 by default
-        if (encName.empty() || encName == _T("US-ASCII"))
-            encName = _T("UTF-8");
-        wxSetEnv(_T("G_FILENAME_ENCODING"), encName);
+        if (encName.empty() || encName == wxT("US-ASCII"))
+            encName = wxT("UTF-8");
+        wxSetEnv(wxT("G_FILENAME_ENCODING"), encName);
     }
 #else
     if (encName.empty())
-        encName = _T("UTF-8");
+        encName = wxT("UTF-8");
 
     // if wxUSE_INTL==0 it probably indicates that only "C" locale is supported
     // by the program anyhow so prevent GTK+ from calling setlocale(LC_ALL, "")
@@ -438,8 +441,6 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
     // we can not enter threads before gtk_init is done
     gdk_threads_enter();
 
-    wxSetDetectableAutoRepeat( true );
-
 #if wxUSE_INTL
     wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
 #endif
@@ -535,3 +536,12 @@ void wxGUIAppTraits::MutexGuiLeave()
     gdk_threads_leave();
 }
 #endif // wxUSE_THREADS
+
+#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
+// Maemo-specific method: get the main program object
+HildonProgram *wxApp::GetHildonProgram()
+{ 
+    return hildon_program_get_instance(); 
+}
+    
+#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2