wxGPE updates to HEAD.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
31414f4c19
commit
ca06ee0df7
@ -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;
|
||||
}
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gdk/gdk.h>
|
||||
@ -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;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gdk/gdk.h>
|
||||
@ -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;
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user