diff --git a/src/common/settcmn.cpp b/src/common/settcmn.cpp index be4269cd9b..d8d68f8de0 100644 --- a/src/common/settcmn.cpp +++ b/src/common/settcmn.cpp @@ -44,12 +44,6 @@ wxSystemScreenType wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE; wxSystemScreenType wxSystemSettings::GetScreenType() { if (ms_screen == wxSYS_SCREEN_NONE) -#ifndef __WXUNIVERSAL__ - { - // As a start, all GUI are desktops. - ms_screen = wxSYS_SCREEN_DESKTOP; - } -#else { // wxUniv will be used on small devices, too. int x = GetMetric( wxSYS_SCREEN_X ); @@ -64,8 +58,11 @@ wxSystemScreenType wxSystemSettings::GetScreenType() if (x < 200) ms_screen = wxSYS_SCREEN_TINY; + + // This is probably a bug, but VNC seems to report 0 + if (x < 10) + ms_screen = wxSYS_SCREEN_DESKTOP; } -#endif return ms_screen; } diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 835bd1ea3b..8c44509055 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -982,19 +982,14 @@ wxGenericFileDialog::wxGenericFileDialog(wxWindow *parent, // PDAs have a different screen layout mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); - wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL ); - m_choice = new wxChoice( this, ID_CHOICE ); - choicesizer->Add( m_choice, 1, wxCENTER|wxALL, 5 ); - mainsizer->Add( choicesizer, 0, wxEXPAND ); - wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL ); m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER ); textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 ); mainsizer->Add( textsizer, 0, wxEXPAND ); - m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden files") ); - m_check->SetValue( ms_lastShowHidden ); - textsizer->Add( m_check, 0, wxCENTER|wxALL, 5 ); + m_check = NULL; + m_choice = new wxChoice( this, ID_CHOICE ); + textsizer->Add( m_choice, 1, wxCENTER|wxALL, 5 ); buttonsizer = new wxBoxSizer( wxHORIZONTAL ); buttonsizer->Add( new wxButton( this, wxID_OK, _("OK") ), 0, wxCENTER | wxALL, 5 ); diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index 6359bd9317..4fd8c800d6 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -67,9 +67,7 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, { m_dialogStyle = style; -#if wxUSE_STATIC_BITMAP bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); -#endif wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); @@ -101,32 +99,24 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, bitmap = wxArtProvider::GetIcon(wxART_QUESTION, wxART_MESSAGE_BOX); break; } -#if wxUSE_STATIC_BITMAP wxStaticBitmap *icon = new wxStaticBitmap(this, -1, bitmap); if (is_pda) topsizer->Add( icon, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 ); else icon_text->Add( icon, 0, wxCENTER ); -#endif } // 2) text -#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL icon_text->Add( CreateTextSizer( message ), 0, wxCENTER | wxLEFT, 10 ); -#endif topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 ); -#if wxUSE_STATLINE // 3) static line topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 ); -#endif // 4) buttons -#if wxUSE_BUTTON topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ), 0, wxCENTRE | wxALL, 10 ); - #endif SetAutoLayout( TRUE ); SetSizer( topsizer ); diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 9660e9d30e..f5f5b12e73 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -35,6 +35,7 @@ #include "wx/dcclient.h" #include "wx/gtk/private.h" #include "wx/timer.h" +#include "wx/settings.h" #include #include @@ -652,6 +653,17 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); + if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) + { + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; + } + if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth; @@ -733,6 +745,17 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); + if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) + { + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; + } + if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth; diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 9660e9d30e..f5f5b12e73 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -35,6 +35,7 @@ #include "wx/dcclient.h" #include "wx/gtk/private.h" #include "wx/timer.h" +#include "wx/settings.h" #include #include @@ -652,6 +653,17 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); + if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) + { + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; + } + if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth; @@ -733,6 +745,17 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); + if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) + { + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; + } + if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth; diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 6d031b36ef..316e8b0dd8 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -776,7 +776,13 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir( wxString strDesc; if ( !wxDir::Exists(dirname) ) - return; + { + // Jst test for default GPE dir also + dirname = wxT("/usr/share/gpe/pixmaps/default/filemanager/document-icons"); + + if ( !wxDir::Exists(dirname) ) + return; + } wxDir dir2( dirname );