]> git.sesse.net Git - vlc/commitdiff
wxwindows update for WIN32 wxSpinCtrl, restrict range to valid integer (-32768, 32767)
authorMark Moriarty <markfm@videolan.org>
Sun, 30 Jan 2005 14:26:47 +0000 (14:26 +0000)
committerMark Moriarty <markfm@videolan.org>
Sun, 30 Jan 2005 14:26:47 +0000 (14:26 +0000)
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/preferences_widgets.cpp

index 656884beb98ac3d55d54c7bbc1ea5c04217c0a1a..d1d0d5fdce0f96be508cf1644298d17be49682c3 100644 (file)
@@ -447,7 +447,11 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
     common_opt_sizer->Add( caching_checkbox, 0,
                            wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
     caching_value = new wxSpinCtrl( panel, CachingChange_Event );
+#ifdef WIN32  /* WIN32 uses 16 bit integer */
+    caching_value->SetRange( 0, 32767 );
+#else
     caching_value->SetRange( 0, 1000000 );
+#endif
     caching_value->Disable();
     common_opt_sizer->Add( caching_value, 0,
                            wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
index 731b90b4f45f6b390ce379897769eff08b41c80c..2a0a27638771d04e4ff0fe6276cffce3cd66e8fa 100644 (file)
@@ -695,14 +695,13 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this,
   : ConfigControl( p_this, p_item, parent )
 {
     label = new wxStaticText(this, -1, wxU(p_item->psz_text));
-// FIXME -- Hack for nonstandard wxwin wxSpinCtrl operation under WIN32
-#ifdef WIN32
+#ifdef WIN32 //WIN32 only uses a 16 bit integer
     spin = new wxSpinCtrl( this, -1,
                            wxString::Format(wxT("%d"),
                                             p_item->i_value),
                            wxDefaultPosition, wxDefaultSize,
                            wxSP_ARROW_KEYS,
-                           100000000, -100000000, p_item->i_value);
+                           -32768,32767, p_item->i_value);
 #else
     spin = new wxSpinCtrl( this, -1,
                            wxString::Format(wxT("%d"),