From b1a39f47f8e4e9662ecdecab8f38fca1342202a7 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 2 Mar 1999 08:56:59 +0000 Subject: [PATCH] Removed warnings from tbarsimpl Now wxSlider also works for negative values. wx-config reports 2.0.1 made wxUSE_SOCKET default forgot to run autoconf git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/gtk/copy_src | 20 ++++++++++---------- docs/gtk/readme.txt | 4 ++-- src/common/tbarsmpl.cpp | 6 ++++-- src/gtk/slider.cpp | 10 +++++----- src/gtk1/slider.cpp | 10 +++++----- wx-config.in | 2 +- wxGTK.spec | 4 ++-- 7 files changed, 29 insertions(+), 27 deletions(-) diff --git a/distrib/gtk/copy_src b/distrib/gtk/copy_src index 1233b6aa07..7b8de3ba0e 100755 --- a/distrib/gtk/copy_src +++ b/distrib/gtk/copy_src @@ -327,16 +327,16 @@ cp *.h ~/wxgtk_dist/wxGTK/samples/db cp *.xpm ~/wxgtk_dist/wxGTK/samples/db cd .. -echo DDE sample.. - -cd dde -mkdir ~/wxgtk_dist/wxGTK/samples/dde -cp Makefile ~/wxgtk_dist/wxGTK/samples/dde -cp Makefile.in ~/wxgtk_dist/wxGTK/samples/dde -cp *.cpp ~/wxgtk_dist/wxGTK/samples/dde -cp *.h ~/wxgtk_dist/wxGTK/samples/dde -cp *.xpm ~/wxgtk_dist/wxGTK/samples/dde -cd .. +#echo DDE sample.. +# +#cd dde +#mkdir ~/wxgtk_dist/wxGTK/samples/dde +#cp Makefile ~/wxgtk_dist/wxGTK/samples/dde +#cp Makefile.in ~/wxgtk_dist/wxGTK/samples/dde +#cp *.cpp ~/wxgtk_dist/wxGTK/samples/dde +#cp *.h ~/wxgtk_dist/wxGTK/samples/dde +#cp *.xpm ~/wxgtk_dist/wxGTK/samples/dde +#cd .. echo Dialogs sample.. diff --git a/docs/gtk/readme.txt b/docs/gtk/readme.txt index ab707deb85..ca749bbb3f 100644 --- a/docs/gtk/readme.txt +++ b/docs/gtk/readme.txt @@ -1,7 +1,7 @@ - Welcome to wxWindows/Gtk 2.01 (beta 5), + Welcome to wxWindows/Gtk 2.0.1, -you have downloaded version 2.01 of the GTK+ 1.0 port of +you have downloaded version 2.0.1 of the GTK+ 1.0 port of the wxWindows GUI library. More information is available from my homepage at: diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp index 45b1eb74a9..e973cfdedb 100644 --- a/src/common/tbarsmpl.cpp +++ b/src/common/tbarsmpl.cpp @@ -319,7 +319,8 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) void wxToolBarSimple::ToggleTool(int index, bool toggle) { - wxNode *node = m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node = m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); @@ -344,7 +345,8 @@ void wxToolBarSimple::ToggleTool(int index, bool toggle) // void wxToolBarSimple::SpringUpButton(int index) { - wxNode *node=m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node=m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); if (tool && !tool->m_isToggle && tool->m_toggleState){ diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 08a4da1d19..a9a4e9a7d3 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -50,7 +50,7 @@ static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; else command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_adjust->value+0.5); + int value = (int)ceil(win->m_adjust->value); int orient = wxHORIZONTAL; if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxVERTICAL; @@ -157,12 +157,12 @@ void wxSlider::SetRange( int minValue, int maxValue ) int wxSlider::GetMin(void) const { - return (int)(m_adjust->lower+0.5); + return (int)ceil(m_adjust->lower); } int wxSlider::GetMax(void) const { - return (int)(m_adjust->upper+0.5); + return (int)ceil(m_adjust->upper); } void wxSlider::SetPageSize( int pageSize ) @@ -178,7 +178,7 @@ void wxSlider::SetPageSize( int pageSize ) int wxSlider::GetPageSize(void) const { - return (int)(m_adjust->page_increment+0.5); + return (int)ceil(m_adjust->page_increment); } void wxSlider::SetThumbLength( int len ) @@ -194,7 +194,7 @@ void wxSlider::SetThumbLength( int len ) int wxSlider::GetThumbLength(void) const { - return (int)(m_adjust->page_size+0.5); + return (int)ceil(m_adjust->page_size); } void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 08a4da1d19..a9a4e9a7d3 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -50,7 +50,7 @@ static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP; else command = wxEVT_SCROLL_THUMBTRACK; - int value = (int)(win->m_adjust->value+0.5); + int value = (int)ceil(win->m_adjust->value); int orient = wxHORIZONTAL; if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxVERTICAL; @@ -157,12 +157,12 @@ void wxSlider::SetRange( int minValue, int maxValue ) int wxSlider::GetMin(void) const { - return (int)(m_adjust->lower+0.5); + return (int)ceil(m_adjust->lower); } int wxSlider::GetMax(void) const { - return (int)(m_adjust->upper+0.5); + return (int)ceil(m_adjust->upper); } void wxSlider::SetPageSize( int pageSize ) @@ -178,7 +178,7 @@ void wxSlider::SetPageSize( int pageSize ) int wxSlider::GetPageSize(void) const { - return (int)(m_adjust->page_increment+0.5); + return (int)ceil(m_adjust->page_increment); } void wxSlider::SetThumbLength( int len ) @@ -194,7 +194,7 @@ void wxSlider::SetThumbLength( int len ) int wxSlider::GetThumbLength(void) const { - return (int)(m_adjust->page_size+0.5); + return (int)ceil(m_adjust->page_size); } void wxSlider::SetLineSize( int WXUNUSED(lineSize) ) diff --git a/wx-config.in b/wx-config.in index 5d3313d394..19ec9ce98f 100755 --- a/wx-config.in +++ b/wx-config.in @@ -36,7 +36,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo 2.01 + echo 2.0.1 ;; --cflags) if test @includedir@ != /usr/include ; then diff --git a/wxGTK.spec b/wxGTK.spec index b518cac93d..a0590f9822 100644 --- a/wxGTK.spec +++ b/wxGTK.spec @@ -1,10 +1,10 @@ Summary: The GTK+ 1.0 port of wxWindows library Name: wxGTK -Version: 1.99.5 +Version: 2.0.1 Release: 1 Copyright: wxWindows Licence Group: X11/Libraries -Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK2b5.tgz +Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK201.tgz URL: http://www.freiburg.linux.de/~wxxt/docs.html Packager: Robert Roebling Requires: gtk+ >= 1.0.4