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 );
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;
}
// 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 );
{
m_dialogStyle = style;
-#if wxUSE_STATIC_BITMAP
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
-#endif
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
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 );
#include "wx/dcclient.h"
#include "wx/gtk/private.h"
#include "wx/timer.h"
+#include "wx/settings.h"
#include <glib.h>
#include <gdk/gdk.h>
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;
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;
#include "wx/dcclient.h"
#include "wx/gtk/private.h"
#include "wx/timer.h"
+#include "wx/settings.h"
#include <glib.h>
#include <gdk/gdk.h>
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;
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;
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 );