1. wxTimer::Start() returns bool in wxGTK too (other minor corrections
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 1998 13:09:15 +0000 (13:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 1998 13:09:15 +0000 (13:09 +0000)
   to this class, such as "const" addition, Notify() is = 0 now...)

2. wxGTK::wxTextCtrl::Delete renamed to Clear for consistency

3. wx/wx_prec.h now includes wx/setup.h even if !wxUSE_PRECOMP because
   otherwise (recently added) tests "#if wxUSE_IOSTREAMH" donb't work.

4. Other compilation fixes for wxGTK (now it compiles again)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

23 files changed:
include/wx/gtk/textctrl.h
include/wx/gtk/timer.h
include/wx/gtk1/textctrl.h
include/wx/gtk1/timer.h
include/wx/icon.h
include/wx/log.h
include/wx/msw/timer.h
include/wx/qt/timer.h
include/wx/stubs/timer.h
include/wx/treectrl.h
include/wx/wxprec.h
src/common/log.cpp
src/common/resource.cpp
src/common/variant.cpp
src/gtk.inc
src/gtk/tbargtk.cpp
src/gtk/textctrl.cpp
src/gtk/timer.cpp
src/gtk/utilsgtk.cpp
src/gtk1/tbargtk.cpp
src/gtk1/textctrl.cpp
src/gtk1/timer.cpp
src/gtk1/utilsgtk.cpp

index 29663cf0d07e0b9be9d5ada92b9d9df04a74ea84..2dc37d8181f987a2059061a91d034feb2812fcec 100644 (file)
@@ -86,7 +86,7 @@ class wxTextCtrl: public wxControl, public streambuf
     void Cut();
     void Copy();
     void Paste();
-    void Delete();
+    void Clear();
 
     void OnChar( wxKeyEvent &event );
 
index 821c03b30d6961c9aff00dd04392d102d30bee56..9a1abc11c272ac1ae0156a988bbd73df851ea5a0 100644 (file)
@@ -31,23 +31,26 @@ class wxTimer;
 
 class wxTimer: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxTimer)
-
-  public:
-
-    wxTimer(void);
-    ~wxTimer(void);
-    int Interval(void);
-    bool OneShot(void);
-    virtual void Notify(void);
-    void Start( int millisecs = -1, bool oneShot = FALSE );
-    void Stop(void);
-    
-  private:
-  
+public:
+    wxTimer();
+    ~wxTimer();
+
+    int Interval() const { return m_time; }
+
+    bool OneShot() const { return m_oneShot; }
+
+    virtual bool Start( int millisecs = -1, bool oneShot = FALSE );
+    virtual void Stop();
+
+    virtual void Notify() = 0;  // override this
+
+protected:
     int  m_tag;
     int  m_time;
     bool m_oneShot;
+
+private:
+    DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
 #endif // __GTKTIMERH__
index 29663cf0d07e0b9be9d5ada92b9d9df04a74ea84..2dc37d8181f987a2059061a91d034feb2812fcec 100644 (file)
@@ -86,7 +86,7 @@ class wxTextCtrl: public wxControl, public streambuf
     void Cut();
     void Copy();
     void Paste();
-    void Delete();
+    void Clear();
 
     void OnChar( wxKeyEvent &event );
 
index 821c03b30d6961c9aff00dd04392d102d30bee56..9a1abc11c272ac1ae0156a988bbd73df851ea5a0 100644 (file)
@@ -31,23 +31,26 @@ class wxTimer;
 
 class wxTimer: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxTimer)
-
-  public:
-
-    wxTimer(void);
-    ~wxTimer(void);
-    int Interval(void);
-    bool OneShot(void);
-    virtual void Notify(void);
-    void Start( int millisecs = -1, bool oneShot = FALSE );
-    void Stop(void);
-    
-  private:
-  
+public:
+    wxTimer();
+    ~wxTimer();
+
+    int Interval() const { return m_time; }
+
+    bool OneShot() const { return m_oneShot; }
+
+    virtual bool Start( int millisecs = -1, bool oneShot = FALSE );
+    virtual void Stop();
+
+    virtual void Notify() = 0;  // override this
+
+protected:
     int  m_tag;
     int  m_time;
     bool m_oneShot;
+
+private:
+    DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
 #endif // __GTKTIMERH__
index 2baded96c354999b57f7189a263b64314144d708..4de7f27e5d1b423b4914dfe7f41d5570748abdce 100644 (file)
@@ -1,18 +1,26 @@
 #ifndef _WX_ICON_H_BASE_
 #define _WX_ICON_H_BASE_
 
+// this is for Unix (i.e. now for anything other than MSW)
+#undef  wxICON
+#define wxICON(icon_name)   wxIcon(icon_name##_xpm)
+
 #if defined(__WXMSW__)
-#include "wx/msw/icon.h"
+  // under Windows, icon name is the ressource id (string)
+  #undef wxICON
+  #define wxICON(icon_name)   wxIcon(#icon_name)
+
+  #include "wx/msw/icon.h"
 #elif defined(__WXMOTIF__)
-#include "wx/motif/icon.h"
+  #include "wx/motif/icon.h"
 #elif defined(__WXGTK__)
-#include "wx/gtk/icon.h"
+  #include "wx/gtk/icon.h"
 #elif defined(__WXQT__)
-#include "wx/qt/icon.h"
+  #include "wx/qt/icon.h"
 #elif defined(__WXMAC__)
-#include "wx/mac/icon.h"
+  #include "wx/mac/icon.h"
 #elif defined(__WXSTUBS__)
-#include "wx/stubs/icon.h"
+  #include "wx/stubs/icon.h"
 #endif
 
 #endif
index 1b78ba5b04e7c1b9ad7526f52a6e4ca1dcd3a43f..afabcbac84e913e360b0a0f23dd5080effe7d0f4 100644 (file)
@@ -188,6 +188,8 @@ protected:
   ostream *m_ostr;
 };
 
+#ifndef wxUSE_NOGUI
+
 // log everything to a text window (GUI only of course)
 class WXDLLEXPORT wxLogTextCtrl : public wxLogStream
 {
@@ -269,6 +271,8 @@ private:
   wxLogFrame *m_pLogFrame;      // the log frame
 };
 
+#endif // wxUSE_NOGUI
+
 // ----------------------------------------------------------------------------
 // /dev/null log target: suppress logging until this object goes out of scope
 // ----------------------------------------------------------------------------
index 42287be447cc1a645c50323944a37588b4a6c7f6..eb65f217953c1f7314e7282e880ef1ae50ea6e38 100644 (file)
 
 #include "wx/object.h"
 
-class WXDLLEXPORT wxTimer: public wxObject
+class WXDLLEXPORT wxTimer : public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxTimer)
-
- public:
-  bool oneShot ;
-  int  milli ;
-  int  lastMilli ;
-
-  long id;
- public:
-  wxTimer(void);
-  ~wxTimer(void);
-  virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
-  virtual void Stop(void);                   // Stop timer
-  virtual void Notify(void) = 0;             // Override this member
-  inline int Interval(void) { return milli ; }; // Returns the current interval time (0 if stop)
+public:
+    wxTimer();
+    ~wxTimer();
+
+    virtual bool Start(int milliseconds = -1,
+                       bool one_shot = FALSE); // Start timer
+    virtual void Stop();                       // Stop timer
+
+    virtual void Notify() = 0;                 // Override this member
+
+    // Returns the current interval time (0 if stop)
+    int Interval() const { return milli; };
+    bool OneShot() const { return oneShot; }
+
+protected:
+    bool oneShot ;
+    int  milli ;
+    int  lastMilli ;
+
+    long id;
+
+private:
+    DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
 // Timer functions (milliseconds)
-void WXDLLEXPORT wxStartTimer(void);
+void WXDLLEXPORT wxStartTimer();
 // Gets time since last wxStartTimer or wxGetElapsedTime
 long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
 
@@ -46,7 +54,7 @@ long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE);
 bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved);
 
 // Get number of seconds since 00:00:00 GMT, Jan 1st 1970.
-long WXDLLEXPORT wxGetCurrentTime(void);
+long WXDLLEXPORT wxGetCurrentTime();
 
 #endif
     // _WX_TIMERH_
index 22fa2eed598f7370b359e73fc0728ae91fd79477..2dc0c5b48687e66e5a15d2bebf8452fec91ae045 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     ??/??/98
 // RCS-ID:      $Id$
 // Copyright:   (c) AUTHOR
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_TIMER_H_
 
 class WXDLLEXPORT wxTimer: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxTimer)
+public:
+    wxTimer();
+    ~wxTimer();
 
- public:
-  wxTimer();
-  ~wxTimer();
-  virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
-  virtual void Stop();                   // Stop timer
-  virtual void Notify() = 0;             // Override this member
-  inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop)
+    virtual bool Start(int milliseconds = -1,
+                       bool one_shot = FALSE); // Start timer
+    virtual void Stop();                       // Stop timer
+
+    virtual void Notify() = 0;                 // Override this member
+
+    // Returns the current interval time (0 if stop)
+    int Interval() const { return milli; };
+    bool OneShot() const { return oneShot; }
 
 protected:
-  bool      m_oneShot ;
-  int       m_milli ;
-  int       m_lastMilli ;
-  long      m_id;
+    bool oneShot ;
+    int  milli ;
+    int  lastMilli ;
+
+    long id;
 
+private:
+    DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
 /* Note: these are implemented in common/timercmn.cpp, so need to implement them separately.
index 22fa2eed598f7370b359e73fc0728ae91fd79477..2e0e85010f9472bef591ec2261c48bb811ae012d 100644 (file)
 
 class WXDLLEXPORT wxTimer: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxTimer)
+public:
+    wxTimer();
+    ~wxTimer();
 
- public:
-  wxTimer();
-  ~wxTimer();
-  virtual bool Start(int milliseconds = -1,bool one_shot = FALSE); // Start timer
-  virtual void Stop();                   // Stop timer
-  virtual void Notify() = 0;             // Override this member
-  inline int Interval() { return m_milli ; }; // Returns the current interval time (0 if stop)
+    virtual bool Start(int milliseconds = -1,
+                       bool one_shot = FALSE); // Start timer
+    virtual void Stop();                       // Stop timer
+
+    virtual void Notify() = 0;                 // Override this member
+
+    // Returns the current interval time (0 if stop)
+    int Interval() const { return milli; }; 
+    bool OneShot() const { return oneShot; }
 
 protected:
-  bool      m_oneShot ;
-  int       m_milli ;
-  int       m_lastMilli ;
-  long      m_id;
+    bool oneShot ;
+    int  milli ;
+    int  lastMilli ;
+
+    long id;
 
+private:
+    DECLARE_ABSTRACT_CLASS(wxTimer)
 };
 
 /* Note: these are implemented in common/timercmn.cpp, so need to implement them separately.
index 8d6928b669a46fde9046bee44a62f5a556de35c6..0fce45a8a2ee0dfc6e8f5ec582d2681e6a56ed13 100644 (file)
@@ -6,7 +6,7 @@
 #elif defined(__WXMOTIF__)
 #include "wx/generic/treectrl.h"
 #elif defined(__WXGTK__)
-#include "wx/gtk/treectrl.h"
+#include "wx/generic/treectrl.h"
 #elif defined(__WXQT__)
 #include "wx/qt/treectrl.h"
 #elif defined(__WXMAC__)
index 9e12d8f875b7291a33bd827b80c42399d1befd21..f51d04c60bb5e3a3309324e009912afb965145d1 100644 (file)
@@ -57,5 +57,8 @@
 #undef FindResource
 #endif
 
+#else
+  // always include this file (under Unix it's generated by configure)
+  #include "wx/setup.h"
 #endif
 
index 30b8258870b09ee3dfdca3a9089d09dc66b5cb10..d890f0b882ab8bd96b96fee5b777adfcdd3195c9 100644 (file)
@@ -387,6 +387,7 @@ void wxLogStream::DoLogString(const char *szString)
   (*m_ostr) << szString << endl << flush;
 }
 
+#ifndef   wxUSE_NOGUI
 // ----------------------------------------------------------------------------
 // wxLogTextCtrl implementation
 // ----------------------------------------------------------------------------
@@ -410,8 +411,6 @@ wxLogTextCtrl::~wxLogTextCtrl()
 // wxLogGui implementation
 // ----------------------------------------------------------------------------
 
-#ifndef   wxUSE_NOGUI
-
 wxLogGui::wxLogGui()
 {
   m_bErrors = FALSE;
@@ -960,22 +959,26 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
     // send it to the normal log destination
     wxLogDebug(szBuf);
 
-    strcat(szBuf, _("\nDo you want to stop the program?"
-                    "\nYou can also choose [Cancel] to suppress "
-                    "further warnings."));
+    #ifdef wxUSE_NOGUI
+      Trap();
+    #else
+      strcat(szBuf, _("\nDo you want to stop the program?"
+                      "\nYou can also choose [Cancel] to suppress "
+                      "further warnings."));
 
-    switch ( wxMessageBox(szBuf, _("Debug"),
-                          wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
-      case wxYES:
-        Trap();
-        break;
+      switch ( wxMessageBox(szBuf, _("Debug"),
+                            wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
+        case wxYES:
+          Trap();
+          break;
 
-      case wxCANCEL:
-        s_bNoAsserts = TRUE;
-        break;
+        case wxCANCEL:
+          s_bNoAsserts = TRUE;
+          break;
 
-      //case wxNO: nothing to do
-    }
+        //case wxNO: nothing to do
+      }
+    #endif // USE_NOGUI
   }
 
   s_bInAssert = FALSE;
index 9198586a1f5a01fcdc7cd612f51889de8d67c138..c98144c14b68c71329487d2549190cd479b583d7 100644 (file)
@@ -69,6 +69,8 @@
 #include "wx/string.h"
 #include "wx/wxexpr.h"
 
+#include "wx/settings.h"
+
 // Forward (private) declarations
 bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db);
 wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr, bool isPanel = FALSE);
index b514bf1cd9236aca63729fc3a72dc5c3e9845791..068e13b22fa66ba1129ba5355d8f0dd2253cfa11 100644 (file)
 #endif
 
 #if wxUSE_IOSTREAMH
-#include <fstream.h>
+#   include <fstream.h>
 #else
-#include <fstream>
-#  ifdef _MSC_VER
-      using namespace std;
-#  endif
+#   include <fstream>
+#   ifdef _MSC_VER
+        using namespace std;
+#   endif
 #endif
 
 #include "wx/string.h"
index ad7ef598949c606764816bd469c813cb9978b2f6..063d5cca2fe9c944b2a326230f413ff38f8d9504 100644 (file)
@@ -108,7 +108,7 @@ LIB_CPP_SRC=\
  gtk/tbargtk.cpp \
  gtk/textctrl.cpp \
  gtk/timer.cpp \
- gtk/treectrl.cpp \
+ generic/treectrl.cpp \
  gtk/utilsgtk.cpp \
  gtk/utilsres.cpp \
  gtk/window.cpp \
index 57bd59292ebfd74daad9eb3ca7993587c618aa32..29c954eca51e08ce18a79e1a108739cd8f892ffa 100644 (file)
@@ -14,7 +14,6 @@
 #endif
 
 #include "wx/toolbar.h"
-#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -29,10 +28,12 @@ extern bool   g_blockEventsOnDrag;
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject)
 
 wxToolBarTool::wxToolBarTool( wxToolBar *owner, int theIndex,
-      const wxBitmap& bitmap1, const  wxBitmap& bitmap2,
-      bool toggle, wxObject *clientData,
-      const wxString& shortHelpString, const wxString& longHelpString,
-      GtkWidget *item  )
+                              const wxBitmap& bitmap1, const  wxBitmap& bitmap2,
+                              bool toggle, 
+                              wxObject *clientData,
+                              const wxString& shortHelpString,
+                              const wxString& longHelpString,
+                              GtkWidget *item  )
 {
   m_owner = owner;
   m_index = theIndex;
@@ -115,6 +116,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
   m_widget = gtk_handle_box_new();
 
   m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) );
+  gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
 
   gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
 
@@ -162,18 +164,22 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
   float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData,
   const wxString& helpString1, const wxString& helpString2 )
 {
-  if (!bitmap.Ok()) return (wxToolBarTool *) NULL;
+  wxCHECK_MSG( bitmap.Ok(), (wxToolBarTool *)NULL,
+               "invalid bitmap for wxToolBar icon" );
 
-  wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle,
-    clientData, helpString1, helpString2 );
+  wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap,
+                                           toggle, clientData,
+                                           helpString1, helpString2 );
 
-  GtkWidget *tool_pixmap = (GtkWidget *) NULL;
-  
-  wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" )
+  wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL,
+               "wxToolBar doesn't support GdkBitmap" );
+
+  wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL,
+               "wxToolBar::Add needs a wxBitmap" );
   
-  wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL, "wxToolBar::Add needs a wxBitmap" )
+  GtkWidget *tool_pixmap = (GtkWidget *) NULL;
   
-  if (TRUE)
+  if (TRUE) // FIXME huh?
   {
     GdkPixmap *pixmap = bitmap.GetPixmap();
 
@@ -185,32 +191,56 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
   
   gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
 
-  GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
-  if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
-
-  tool->m_item = gtk_toolbar_append_element( 
-    m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL,  helpString1, "",  
-    tool_pixmap,  (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
-
-  gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", 
-      GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool );
+#if 0
+  GtkToolbarChildType ctype = toggle ? GTK_TOOLBAR_CHILD_TOGGLEBUTTON
+                                     : GTK_TOOLBAR_CHILD_BUTTON;
+
+  tool->m_item = gtk_toolbar_append_element
+                 (
+                  GTK_TOOLBAR(m_toolbar),
+                  ctype,
+                  (GtkWidget *)NULL,
+                  (const char *)NULL,
+                  helpString1,
+                  "",
+                  tool_pixmap,
+                  (GtkSignalFunc)gtk_toolbar_callback,
+                  (gpointer)tool
+                 );
+
+  gtk_signal_connect( GTK_OBJECT(tool->m_item),
+                      "enter_notify_event", 
+                      GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback),
+                      (gpointer)tool );
+#else
+  tool->m_item = gtk_toolbar_append_item 
+                 (
+                  GTK_TOOLBAR(m_toolbar),
+                  (const char *)NULL,
+                  helpString1,
+                  "",
+                  tool_pixmap,
+                  (GtkSignalFunc)gtk_toolbar_callback,
+                  (gpointer)tool
+                 );
+#endif
 
   m_tools.Append( tool );
 
   return tool;
 }
 
-void wxToolBar::AddSeparator(void)
+void wxToolBar::AddSeparator()
 {
   gtk_toolbar_append_space( m_toolbar );
 }
 
-void wxToolBar::ClearTools(void)
+void wxToolBar::ClearTools()
 {
   wxFAIL_MSG( "wxToolBar::ClearTools not implemented" );
 }
 
-void wxToolBar::Realize(void)
+void wxToolBar::Realize()
 {
   m_x = 0;
   m_y = 0;
@@ -316,10 +346,12 @@ bool wxToolBar::GetToolEnabled(int toolIndex) const
 
 void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) )
 {
+  wxFAIL_MSG( "wxToolBar::SetMargins not implemented" );
 }
 
 void wxToolBar::SetToolPacking( int WXUNUSED(packing) )
 {
+  wxFAIL_MSG( "wxToolBar::SetToolPacking not implemented" );
 }
 
 void wxToolBar::SetToolSeparation( int separation )
index 44c3429337f1a184ec398f1eb6a3713193812341..51ecbbf56a526dedc6c5179198bc423fc5d97836 100644 (file)
@@ -41,7 +41,7 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
   EVT_CHAR(wxTextCtrl::OnChar)
 END_EVENT_TABLE()
 
-wxTextCtrl::wxTextCtrl(void) : streambuf()
+wxTextCtrl::wxTextCtrl() : streambuf()
 {
   if (allocate()) setp(base(),ebuf());
 
@@ -149,7 +149,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
   return TRUE;
 }
 
-wxString wxTextCtrl::GetValue(void) const
+wxString wxTextCtrl::GetValue() const
 {
   wxString tmp;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -228,7 +228,7 @@ long wxTextCtrl::XYToPosition( long x, long y )
 {
 }
 
-int wxTextCtrl::GetNumberOfLines(void)
+int wxTextCtrl::GetNumberOfLines()
 {
 }
 
@@ -242,7 +242,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
     gtk_entry_set_position( GTK_ENTRY(m_text), tmp );
 }
 
-void wxTextCtrl::SetInsertionPointEnd(void)
+void wxTextCtrl::SetInsertionPointEnd()
 {
   int pos = 0;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -270,12 +270,12 @@ void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
   wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
 }
 
-long wxTextCtrl::GetInsertionPoint(void) const
+long wxTextCtrl::GetInsertionPoint() const
 {
   return (long) GTK_EDITABLE(m_text)->current_pos;
 }
 
-long wxTextCtrl::GetLastPosition(void) const
+long wxTextCtrl::GetLastPosition() const
 {
   int pos = 0;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -298,22 +298,22 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
   gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
 }
 
-void wxTextCtrl::Cut(void)
+void wxTextCtrl::Cut()
 {
   gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Copy(void)
+void wxTextCtrl::Copy()
 {
   gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Paste(void)
+void wxTextCtrl::Paste()
 {
   gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Delete(void)
+void wxTextCtrl::Clear()
 {
   SetValue( "" );
 }
@@ -350,7 +350,7 @@ int wxTextCtrl::overflow( int WXUNUSED(c) )
   return EOF;
 }
 
-int wxTextCtrl::sync(void)
+int wxTextCtrl::sync()
 {
   int len = pptr() - pbase();
   char *txt = new char[len+1];
@@ -362,7 +362,7 @@ int wxTextCtrl::sync(void)
   return 0;
 }
 
-int wxTextCtrl::underflow(void)
+int wxTextCtrl::underflow()
 {
   return EOF;
 }
@@ -415,7 +415,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c)
   return *this;
 }
 
-GtkWidget* wxTextCtrl::GetConnectWidget(void)
+GtkWidget* wxTextCtrl::GetConnectWidget()
 {
   return GTK_WIDGET(m_text);
 }
index cf9d2c64a3ac5a34010b879749ba99b6c284984c..4e36a67f1447dc978ce61c33a361ef179d54811b 100644 (file)
 // wxTimer
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
 
 gint timeout_callback( gpointer data )
 {
   wxTimer *timer = (wxTimer*)data;
   timer->Notify();
-  if (timer->OneShot()) timer->Stop();
+
+  if ( timer->OneShot() )
+    timer->Stop();
+
   return TRUE;
 }
 
-wxTimer::wxTimer(void)
+wxTimer::wxTimer()
 {
   m_tag = -1;
   m_time = 1000;
   m_oneShot = FALSE;
 }
 
-wxTimer::~wxTimer(void)
+wxTimer::~wxTimer()
 {
   Stop();
 }
 
-int wxTimer::Interval(void)
-{
-  return m_time;
-}
-
-bool wxTimer::OneShot(void)
+bool wxTimer::Start( int millisecs, bool oneShot )
 {
-  return m_oneShot;
-}
+  if ( millisecs != -1 )
+    m_time = millisecs;
 
-void wxTimer::Notify(void)
-{
-}
-
-void wxTimer::Start( int millisecs, bool oneShot )
-{
-  if (millisecs != -1) m_time = millisecs;
   m_oneShot = oneShot;
+
   m_tag = gtk_timeout_add( millisecs, timeout_callback, this );
+
+  return TRUE;
 }
 
-void wxTimer::Stop(void)
+void wxTimer::Stop()
 {
-  if (m_tag != -1)
+  if ( m_tag != -1 )
+  {
     gtk_timeout_remove( m_tag );
-  m_tag = -1;
+
+    m_tag = -1;
+  }
 }
 
index 0f9aa9547af567cea7d478c8517666af372e8574..56a3f820cb5e32b707dc1ac3322285db14dd1d7c 100644 (file)
@@ -5,7 +5,7 @@
 // Created:     01/02/97
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
-// Licence:    wxWindows licence
+// Licence:           wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -92,23 +92,23 @@ char *wxGetUserHome( const wxString &user )
 {
   struct passwd *who = (struct passwd *) NULL;
 
-  if (user.IsNull() || (user== "")) 
+  if (user.IsNull() || (user== ""))
   {
-       register char *ptr;
-
-       if ((ptr = getenv("HOME")) != NULL) 
-           return ptr;
-       if ((ptr = getenv("USER")) != NULL
-       || (ptr = getenv("LOGNAME")) != NULL) {
-           who = getpwnam(ptr);
-       }
-       // We now make sure the the user exists!
-       if (who == NULL)
-           who = getpwuid(getuid());
-  } 
+        register char *ptr;
+
+        if ((ptr = getenv("HOME")) != NULL)
+            return ptr;
+        if ((ptr = getenv("USER")) != NULL
+        || (ptr = getenv("LOGNAME")) != NULL) {
+            who = getpwnam(ptr);
+        }
+        // We now make sure the the user exists!
+        if (who == NULL)
+            who = getpwuid(getuid());
+  }
   else
     who = getpwnam (user);
-    
+
   return who ? who->pw_dir : (char*)NULL;
 };
 
@@ -127,9 +127,9 @@ bool wxGetHostName(char *buf, int sz)
     //struct hostent *h;
     // Get hostname
     if (gethostname(name, sizeof(name)/sizeof(char)-1) == -1)
-       return FALSE;
+        return FALSE;
     if (getdomainname(domain, sizeof(domain)/sizeof(char)-1) == -1)
-       return FALSE;
+        return FALSE;
     // Get official full name of host
     // doesn't return the full qualified name, replaced by following
     // code (KB)
@@ -155,8 +155,8 @@ bool wxGetUserId(char *buf, int sz)
 
     *buf = '\0';
     if ((who = getpwuid(getuid ())) != NULL) {
-       strncpy (buf, who->pw_name, sz-1);
-       return TRUE;
+        strncpy (buf, who->pw_name, sz-1);
+        return TRUE;
     }
     return FALSE;
 }
@@ -165,13 +165,13 @@ bool wxGetUserName(char *buf, int sz)
 {
     struct passwd *who;
     char *comma;
-    
+
     *buf = '\0';
     if ((who = getpwuid (getuid ())) != NULL) {
        comma = strchr(who->pw_gecos,'c');
        if(comma) *comma = '\0'; // cut off non-name comment fields
        strncpy (buf, who->pw_gecos, sz - 1);
-       return TRUE;
+        return TRUE;
     }
     return FALSE;
 }
@@ -184,7 +184,7 @@ void wxDebugMsg( const char *format, ... )
 {
   va_list ap;
   va_start( ap, format );
-  vfprintf( stderr, format, ap ); 
+  vfprintf( stderr, format, ap );
   fflush( stderr );
   va_end(ap);
 };
@@ -235,7 +235,7 @@ static void GTK_EndProcessDetector(gpointer data, gint source,
 
   pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid);
 
-  /* wait4 is not part of any standard, use at own risk 
+  /* wait4 is not part of any standard, use at own risk
    * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
    * --- offer@sgi.com */
 #if !defined(__sgi)
@@ -262,7 +262,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
     int end_proc_detect[2];
 
     if (*argv == NULL)
-       return 0;
+        return 0;
 
     /* Create pipes */
     if (pipe(end_proc_detect) == -1) {
@@ -277,24 +277,24 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
     pid_t pid = fork();
 #endif
     if (pid == -1) {
-       perror ("fork failed");
-       return 0;
+        perror ("fork failed");
+        return 0;
     } else if (pid == 0) {
         /* Close fd not useful */
         close(end_proc_detect[0]); // close reading side
 
-       /* child */
+        /* child */
 #ifdef _AIX
-       execvp ((const char *)*argv, (const char **)argv);
+        execvp ((const char *)*argv, (const char **)argv);
 #else
-       execvp (*argv, argv);
+        execvp (*argv, argv);
 #endif
-       if (errno == ENOENT)
-           wxError("command not found", *argv);
-       else
-           perror (*argv);
-       wxError("could not execute", *argv);
-       _exit (-1);
+        if (errno == ENOENT)
+            wxError("command not found", *argv);
+        else
+            perror (*argv);
+        wxError("could not execute", *argv);
+        _exit (-1);
     }
 
     close(end_proc_detect[1]); // close writing side
@@ -329,7 +329,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process )
     tmp[sizeof (tmp) / sizeof (char) - 1] = '\0';
     argv[argc++] = strtok (tmp, IFS);
     while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL)
-       /* loop */ ;
+        /* loop */ ;
     return wxExecute(argv, sync, process);
 };
 
index 57bd59292ebfd74daad9eb3ca7993587c618aa32..29c954eca51e08ce18a79e1a108739cd8f892ffa 100644 (file)
@@ -14,7 +14,6 @@
 #endif
 
 #include "wx/toolbar.h"
-#include <wx/intl.h>
 
 //-----------------------------------------------------------------------------
 // data
@@ -29,10 +28,12 @@ extern bool   g_blockEventsOnDrag;
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool,wxObject)
 
 wxToolBarTool::wxToolBarTool( wxToolBar *owner, int theIndex,
-      const wxBitmap& bitmap1, const  wxBitmap& bitmap2,
-      bool toggle, wxObject *clientData,
-      const wxString& shortHelpString, const wxString& longHelpString,
-      GtkWidget *item  )
+                              const wxBitmap& bitmap1, const  wxBitmap& bitmap2,
+                              bool toggle, 
+                              wxObject *clientData,
+                              const wxString& shortHelpString,
+                              const wxString& longHelpString,
+                              GtkWidget *item  )
 {
   m_owner = owner;
   m_index = theIndex;
@@ -115,6 +116,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
   m_widget = gtk_handle_box_new();
 
   m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) );
+  gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
 
   gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
 
@@ -162,18 +164,22 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
   float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData,
   const wxString& helpString1, const wxString& helpString2 )
 {
-  if (!bitmap.Ok()) return (wxToolBarTool *) NULL;
+  wxCHECK_MSG( bitmap.Ok(), (wxToolBarTool *)NULL,
+               "invalid bitmap for wxToolBar icon" );
 
-  wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle,
-    clientData, helpString1, helpString2 );
+  wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap,
+                                           toggle, clientData,
+                                           helpString1, helpString2 );
 
-  GtkWidget *tool_pixmap = (GtkWidget *) NULL;
-  
-  wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" )
+  wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL,
+               "wxToolBar doesn't support GdkBitmap" );
+
+  wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL,
+               "wxToolBar::Add needs a wxBitmap" );
   
-  wxCHECK_MSG( bitmap.GetPixmap() != NULL, (wxToolBarTool *)NULL, "wxToolBar::Add needs a wxBitmap" )
+  GtkWidget *tool_pixmap = (GtkWidget *) NULL;
   
-  if (TRUE)
+  if (TRUE) // FIXME huh?
   {
     GdkPixmap *pixmap = bitmap.GetPixmap();
 
@@ -185,32 +191,56 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
   
   gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
 
-  GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
-  if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
-
-  tool->m_item = gtk_toolbar_append_element( 
-    m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL,  helpString1, "",  
-    tool_pixmap,  (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
-
-  gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", 
-      GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback), (gpointer)tool );
+#if 0
+  GtkToolbarChildType ctype = toggle ? GTK_TOOLBAR_CHILD_TOGGLEBUTTON
+                                     : GTK_TOOLBAR_CHILD_BUTTON;
+
+  tool->m_item = gtk_toolbar_append_element
+                 (
+                  GTK_TOOLBAR(m_toolbar),
+                  ctype,
+                  (GtkWidget *)NULL,
+                  (const char *)NULL,
+                  helpString1,
+                  "",
+                  tool_pixmap,
+                  (GtkSignalFunc)gtk_toolbar_callback,
+                  (gpointer)tool
+                 );
+
+  gtk_signal_connect( GTK_OBJECT(tool->m_item),
+                      "enter_notify_event", 
+                      GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback),
+                      (gpointer)tool );
+#else
+  tool->m_item = gtk_toolbar_append_item 
+                 (
+                  GTK_TOOLBAR(m_toolbar),
+                  (const char *)NULL,
+                  helpString1,
+                  "",
+                  tool_pixmap,
+                  (GtkSignalFunc)gtk_toolbar_callback,
+                  (gpointer)tool
+                 );
+#endif
 
   m_tools.Append( tool );
 
   return tool;
 }
 
-void wxToolBar::AddSeparator(void)
+void wxToolBar::AddSeparator()
 {
   gtk_toolbar_append_space( m_toolbar );
 }
 
-void wxToolBar::ClearTools(void)
+void wxToolBar::ClearTools()
 {
   wxFAIL_MSG( "wxToolBar::ClearTools not implemented" );
 }
 
-void wxToolBar::Realize(void)
+void wxToolBar::Realize()
 {
   m_x = 0;
   m_y = 0;
@@ -316,10 +346,12 @@ bool wxToolBar::GetToolEnabled(int toolIndex) const
 
 void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) )
 {
+  wxFAIL_MSG( "wxToolBar::SetMargins not implemented" );
 }
 
 void wxToolBar::SetToolPacking( int WXUNUSED(packing) )
 {
+  wxFAIL_MSG( "wxToolBar::SetToolPacking not implemented" );
 }
 
 void wxToolBar::SetToolSeparation( int separation )
index 44c3429337f1a184ec398f1eb6a3713193812341..51ecbbf56a526dedc6c5179198bc423fc5d97836 100644 (file)
@@ -41,7 +41,7 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
   EVT_CHAR(wxTextCtrl::OnChar)
 END_EVENT_TABLE()
 
-wxTextCtrl::wxTextCtrl(void) : streambuf()
+wxTextCtrl::wxTextCtrl() : streambuf()
 {
   if (allocate()) setp(base(),ebuf());
 
@@ -149,7 +149,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
   return TRUE;
 }
 
-wxString wxTextCtrl::GetValue(void) const
+wxString wxTextCtrl::GetValue() const
 {
   wxString tmp;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -228,7 +228,7 @@ long wxTextCtrl::XYToPosition( long x, long y )
 {
 }
 
-int wxTextCtrl::GetNumberOfLines(void)
+int wxTextCtrl::GetNumberOfLines()
 {
 }
 
@@ -242,7 +242,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
     gtk_entry_set_position( GTK_ENTRY(m_text), tmp );
 }
 
-void wxTextCtrl::SetInsertionPointEnd(void)
+void wxTextCtrl::SetInsertionPointEnd()
 {
   int pos = 0;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -270,12 +270,12 @@ void wxTextCtrl::ShowPosition( long WXUNUSED(pos) )
   wxFAIL_MSG(_("wxTextCtrl::ShowPosition not implemented"));
 }
 
-long wxTextCtrl::GetInsertionPoint(void) const
+long wxTextCtrl::GetInsertionPoint() const
 {
   return (long) GTK_EDITABLE(m_text)->current_pos;
 }
 
-long wxTextCtrl::GetLastPosition(void) const
+long wxTextCtrl::GetLastPosition() const
 {
   int pos = 0;
   if (m_windowStyle & wxTE_MULTILINE)
@@ -298,22 +298,22 @@ void wxTextCtrl::Replace( long from, long to, const wxString &value )
   gtk_editable_insert_text( GTK_EDITABLE(m_text), value, value.Length(), &pos );
 }
 
-void wxTextCtrl::Cut(void)
+void wxTextCtrl::Cut()
 {
   gtk_editable_cut_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Copy(void)
+void wxTextCtrl::Copy()
 {
   gtk_editable_copy_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Paste(void)
+void wxTextCtrl::Paste()
 {
   gtk_editable_paste_clipboard( GTK_EDITABLE(m_text), 0 );
 }
 
-void wxTextCtrl::Delete(void)
+void wxTextCtrl::Clear()
 {
   SetValue( "" );
 }
@@ -350,7 +350,7 @@ int wxTextCtrl::overflow( int WXUNUSED(c) )
   return EOF;
 }
 
-int wxTextCtrl::sync(void)
+int wxTextCtrl::sync()
 {
   int len = pptr() - pbase();
   char *txt = new char[len+1];
@@ -362,7 +362,7 @@ int wxTextCtrl::sync(void)
   return 0;
 }
 
-int wxTextCtrl::underflow(void)
+int wxTextCtrl::underflow()
 {
   return EOF;
 }
@@ -415,7 +415,7 @@ wxTextCtrl& wxTextCtrl::operator<<(const char c)
   return *this;
 }
 
-GtkWidget* wxTextCtrl::GetConnectWidget(void)
+GtkWidget* wxTextCtrl::GetConnectWidget()
 {
   return GTK_WIDGET(m_text);
 }
index cf9d2c64a3ac5a34010b879749ba99b6c284984c..4e36a67f1447dc978ce61c33a361ef179d54811b 100644 (file)
 // wxTimer
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
 
 gint timeout_callback( gpointer data )
 {
   wxTimer *timer = (wxTimer*)data;
   timer->Notify();
-  if (timer->OneShot()) timer->Stop();
+
+  if ( timer->OneShot() )
+    timer->Stop();
+
   return TRUE;
 }
 
-wxTimer::wxTimer(void)
+wxTimer::wxTimer()
 {
   m_tag = -1;
   m_time = 1000;
   m_oneShot = FALSE;
 }
 
-wxTimer::~wxTimer(void)
+wxTimer::~wxTimer()
 {
   Stop();
 }
 
-int wxTimer::Interval(void)
-{
-  return m_time;
-}
-
-bool wxTimer::OneShot(void)
+bool wxTimer::Start( int millisecs, bool oneShot )
 {
-  return m_oneShot;
-}
+  if ( millisecs != -1 )
+    m_time = millisecs;
 
-void wxTimer::Notify(void)
-{
-}
-
-void wxTimer::Start( int millisecs, bool oneShot )
-{
-  if (millisecs != -1) m_time = millisecs;
   m_oneShot = oneShot;
+
   m_tag = gtk_timeout_add( millisecs, timeout_callback, this );
+
+  return TRUE;
 }
 
-void wxTimer::Stop(void)
+void wxTimer::Stop()
 {
-  if (m_tag != -1)
+  if ( m_tag != -1 )
+  {
     gtk_timeout_remove( m_tag );
-  m_tag = -1;
+
+    m_tag = -1;
+  }
 }
 
index 0f9aa9547af567cea7d478c8517666af372e8574..56a3f820cb5e32b707dc1ac3322285db14dd1d7c 100644 (file)
@@ -5,7 +5,7 @@
 // Created:     01/02/97
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
-// Licence:    wxWindows licence
+// Licence:           wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -92,23 +92,23 @@ char *wxGetUserHome( const wxString &user )
 {
   struct passwd *who = (struct passwd *) NULL;
 
-  if (user.IsNull() || (user== "")) 
+  if (user.IsNull() || (user== ""))
   {
-       register char *ptr;
-
-       if ((ptr = getenv("HOME")) != NULL) 
-           return ptr;
-       if ((ptr = getenv("USER")) != NULL
-       || (ptr = getenv("LOGNAME")) != NULL) {
-           who = getpwnam(ptr);
-       }
-       // We now make sure the the user exists!
-       if (who == NULL)
-           who = getpwuid(getuid());
-  } 
+        register char *ptr;
+
+        if ((ptr = getenv("HOME")) != NULL)
+            return ptr;
+        if ((ptr = getenv("USER")) != NULL
+        || (ptr = getenv("LOGNAME")) != NULL) {
+            who = getpwnam(ptr);
+        }
+        // We now make sure the the user exists!
+        if (who == NULL)
+            who = getpwuid(getuid());
+  }
   else
     who = getpwnam (user);
-    
+
   return who ? who->pw_dir : (char*)NULL;
 };
 
@@ -127,9 +127,9 @@ bool wxGetHostName(char *buf, int sz)
     //struct hostent *h;
     // Get hostname
     if (gethostname(name, sizeof(name)/sizeof(char)-1) == -1)
-       return FALSE;
+        return FALSE;
     if (getdomainname(domain, sizeof(domain)/sizeof(char)-1) == -1)
-       return FALSE;
+        return FALSE;
     // Get official full name of host
     // doesn't return the full qualified name, replaced by following
     // code (KB)
@@ -155,8 +155,8 @@ bool wxGetUserId(char *buf, int sz)
 
     *buf = '\0';
     if ((who = getpwuid(getuid ())) != NULL) {
-       strncpy (buf, who->pw_name, sz-1);
-       return TRUE;
+        strncpy (buf, who->pw_name, sz-1);
+        return TRUE;
     }
     return FALSE;
 }
@@ -165,13 +165,13 @@ bool wxGetUserName(char *buf, int sz)
 {
     struct passwd *who;
     char *comma;
-    
+
     *buf = '\0';
     if ((who = getpwuid (getuid ())) != NULL) {
        comma = strchr(who->pw_gecos,'c');
        if(comma) *comma = '\0'; // cut off non-name comment fields
        strncpy (buf, who->pw_gecos, sz - 1);
-       return TRUE;
+        return TRUE;
     }
     return FALSE;
 }
@@ -184,7 +184,7 @@ void wxDebugMsg( const char *format, ... )
 {
   va_list ap;
   va_start( ap, format );
-  vfprintf( stderr, format, ap ); 
+  vfprintf( stderr, format, ap );
   fflush( stderr );
   va_end(ap);
 };
@@ -235,7 +235,7 @@ static void GTK_EndProcessDetector(gpointer data, gint source,
 
   pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid);
 
-  /* wait4 is not part of any standard, use at own risk 
+  /* wait4 is not part of any standard, use at own risk
    * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
    * --- offer@sgi.com */
 #if !defined(__sgi)
@@ -262,7 +262,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
     int end_proc_detect[2];
 
     if (*argv == NULL)
-       return 0;
+        return 0;
 
     /* Create pipes */
     if (pipe(end_proc_detect) == -1) {
@@ -277,24 +277,24 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
     pid_t pid = fork();
 #endif
     if (pid == -1) {
-       perror ("fork failed");
-       return 0;
+        perror ("fork failed");
+        return 0;
     } else if (pid == 0) {
         /* Close fd not useful */
         close(end_proc_detect[0]); // close reading side
 
-       /* child */
+        /* child */
 #ifdef _AIX
-       execvp ((const char *)*argv, (const char **)argv);
+        execvp ((const char *)*argv, (const char **)argv);
 #else
-       execvp (*argv, argv);
+        execvp (*argv, argv);
 #endif
-       if (errno == ENOENT)
-           wxError("command not found", *argv);
-       else
-           perror (*argv);
-       wxError("could not execute", *argv);
-       _exit (-1);
+        if (errno == ENOENT)
+            wxError("command not found", *argv);
+        else
+            perror (*argv);
+        wxError("could not execute", *argv);
+        _exit (-1);
     }
 
     close(end_proc_detect[1]); // close writing side
@@ -329,7 +329,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process )
     tmp[sizeof (tmp) / sizeof (char) - 1] = '\0';
     argv[argc++] = strtok (tmp, IFS);
     while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL)
-       /* loop */ ;
+        /* loop */ ;
     return wxExecute(argv, sync, process);
 };