projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace @seealso with @see; as Vaclav pointed out we shouldn't use custom aliases...
[wxWidgets.git]
/
src
/
gtk
/
filectrl.cpp
diff --git
a/src/gtk/filectrl.cpp
b/src/gtk/filectrl.cpp
index c8b852d36dd4fe63b758b7e2a84a25dd9a05b638..b2729ab9e29df020f85df0f39f8d177b50be6e7a 100644
(file)
--- a/
src/gtk/filectrl.cpp
+++ b/
src/gtk/filectrl.cpp
@@
-16,7
+16,7
@@
#include "wx/filectrl.h"
#include "wx/filectrl.h"
-#if
defined(__WXGTK24__)
&& !defined(__WXUNIVERSAL__)
+#if
wxUSE_FILECTRL
&& !defined(__WXUNIVERSAL__)
#ifndef WX_PRECOMP
# include "wx/sizer.h"
#ifndef WX_PRECOMP
# include "wx/sizer.h"
@@
-258,7
+258,6
@@
IMPLEMENT_DYNAMIC_CLASS( wxGtkFileCtrl, wxControl )
void wxGtkFileCtrl::Init()
{
void wxGtkFileCtrl::Init()
{
- m_hasFocus = false;
m_checkNextSelEvent = false;
// ignore the first folder change event which is fired upon startup.
m_checkNextSelEvent = false;
// ignore the first folder change event which is fired upon startup.
@@
-369,18
+368,13
@@
bool wxGtkFileCtrl::SetDirectory( const wxString& dir )
bool wxGtkFileCtrl::SetFilename( const wxString& name )
{
bool wxGtkFileCtrl::SetFilename( const wxString& name )
{
- if (
!gtk_check_version( 2, 4, 0
) )
+ if (
HasFlag( wxFC_SAVE
) )
{
{
- if ( HasFlag( wxFC_SAVE ) )
- {
- gtk_file_chooser_set_current_name( m_fcWidget, wxGTK_CONV( name ) );
- return true;
- }
- else
- return SetPath( wxFileName( GetDirectory(), name ).GetFullPath() );
+ gtk_file_chooser_set_current_name( m_fcWidget, wxGTK_CONV( name ) );
+ return true;
}
}
-
-
return false
;
+ else
+
return SetPath( wxFileName( GetDirectory(), name ).GetFullPath() )
;
}
void wxGtkFileCtrl::SetWildcard( const wxString& wildCard )
}
void wxGtkFileCtrl::SetWildcard( const wxString& wildCard )
@@
-422,11
+416,10
@@
void wxGtkFileCtrl::GetFilenames( wxArrayString& files ) const
void wxGtkFileCtrl::ShowHidden(bool show)
{
void wxGtkFileCtrl::ShowHidden(bool show)
{
- gtk_file_chooser_set_show_hidden(m_fcWidget, show);
+ // gtk_file_chooser_set_show_hidden() is new in 2.6
+ g_object_set (G_OBJECT (m_fcWidget), "show-hidden", show, NULL);
}
}
-#endif
- // wxUSE_FILECTRL
+#endif // wxUSE_FILECTRL
-#endif
- // if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
+#endif // wxUSE_FILECTRL && !defined(__WXUNIVERSAL__)