From c058d771426b4843f9096f68f919f5630b6f5879 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 8 Sep 1998 18:21:16 +0000 Subject: [PATCH] It's now possible to drag a listbox filled with entries Removed #ifdef 0 from resource.cpp around reading code for wxRadioBox #ifdeffed a Refresh call that causes DialogEd to dump code in wxGTK when deleting an item Suppressed some warnings Readded socket stuffto gtk.inc git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/gtk/install.txt | 21 ++++++--------------- include/wx/gtk/listbox.h | 1 + include/wx/gtk1/listbox.h | 1 + include/wx/protocol/protocol.h | 8 ++++---- include/wx/tokenzr.h | 1 + src/Makefile.in | 7 +++++++ src/common/resource.cpp | 2 +- src/gtk.inc | 5 +++++ src/gtk/listbox.cpp | 15 +++++++++++++++ src/gtk1/listbox.cpp | 15 +++++++++++++++ utils/dialoged/src/reseditr.cpp | 2 ++ 11 files changed, 58 insertions(+), 20 deletions(-) diff --git a/docs/gtk/install.txt b/docs/gtk/install.txt index 05daf515a8..32b44fe053 100644 --- a/docs/gtk/install.txt +++ b/docs/gtk/install.txt @@ -188,15 +188,11 @@ The following options handle the kind of library you want to build. * Feature Options ------------------- -When using the Windows version of wxWindows, it is possible -to edit the file /include/wx/msw/setup.h in order to enable -or disable some features of wxWindows so that the resulting -binaries get smaller. - As I don't yet care for binary size and target mainly at producing a shared library, wxWindows's configure system auto- matically enables all features, as long as they are already -implemented. +implemented. It is currently NOT possible to disable these +options (in contrast to what configure tells you). * Compiling ------------- @@ -204,19 +200,14 @@ implemented. The following must be done in the base directory (e.g. ~/wxGTK or ~/wxWin or whatever) -Dependencies are generated automatically using - - make depend - -(For some reason, this doesn't seem to work.) - -Now the makefiles are created you can compile everything is as simple -as typing: +Now the makefiles are created and you can compile everything +by typing: make make yourself some coffee, as it will try to compile ALL the -files in this distribution. +files in this distribution. During compilation, you'll get +a few warning messages. if you want to be more selective: diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index 637b87e6ab..ade4af225a 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -90,6 +90,7 @@ class wxListBox: public wxControl int GetIndex( GtkWidget *item ) const; GtkWidget *GetConnectWidget(void); + bool IsOwnGtkWindow( GdkWindow *window ); private: diff --git a/include/wx/gtk1/listbox.h b/include/wx/gtk1/listbox.h index 637b87e6ab..ade4af225a 100644 --- a/include/wx/gtk1/listbox.h +++ b/include/wx/gtk1/listbox.h @@ -90,6 +90,7 @@ class wxListBox: public wxControl int GetIndex( GtkWidget *item ) const; GtkWidget *GetConnectWidget(void); + bool IsOwnGtkWindow( GdkWindow *window ); private: diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h index c3773a750d..d0126a922b 100644 --- a/include/wx/protocol/protocol.h +++ b/include/wx/protocol/protocol.h @@ -63,15 +63,15 @@ public: wxProtocol(); bool Reconnect(); - virtual bool Connect(const wxString& host) { return FALSE; } - virtual bool Connect(wxSockAddress& addr) { return wxSocketClient::Connect(addr); } + virtual bool Connect( const wxString& WXUNUSED(host) ) { return FALSE; } + virtual bool Connect( wxSockAddress& addr) { return wxSocketClient::Connect(addr); } virtual bool Abort() = 0; virtual wxInputStream *GetInputStream(const wxString& path) = 0; virtual wxProtocolError GetError() = 0; virtual wxString GetContentType() { return (char *)NULL; } - virtual void SetUser(const wxString& user) {} - virtual void SetPassword(const wxString& passwd) {} + virtual void SetUser(const wxString& WXUNUSED(user)) {} + virtual void SetPassword(const wxString& WXUNUSED(passwd) ) {} }; wxProtocolError WXDLLEXPORT GetLine(wxSocketBase *sock, wxString& result); diff --git a/include/wx/tokenzr.h b/include/wx/tokenzr.h index 7942996e29..7de58feed3 100644 --- a/include/wx/tokenzr.h +++ b/include/wx/tokenzr.h @@ -18,6 +18,7 @@ #include "wx/object.h" #include "wx/string.h" +#include "wx/filefn.h" class wxStringTokenizer : wxObject { public: diff --git a/src/Makefile.in b/src/Makefile.in index 02b147b133..d2fb1fd750 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -51,6 +51,7 @@ install:: /usr/local/include/wx \ /usr/local/include/wx/gtk \ /usr/local/include/wx/common \ + /usr/local/include/wx/protocol \ /usr/local/include/wx/generic @echo " Copying headers from /include/wx" @cd $(WXBASEDIR)/include/wx ; \ @@ -70,6 +71,12 @@ install:: rm -f $(includedir)/wx/generic/$$f ; \ $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ done + @echo " Copying headers from /include/wx/protocol" + @cd $(WXBASEDIR)/include/wx/protocol ; \ + for f in *.h ; do \ + rm -f $(includedir)/wx/protocol/$$f ; \ + $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ + done @echo " Copying wx-config" @cd $(WXBASEDIR) ; \ rm -f $(bindir)/wx-config ; \ diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 5cda920f99..10da526e29 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -1127,7 +1127,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e } } #endif -#if 0 +#if 1 else if (controlType == "wxRadioBox") { PrologExpr *valueList = (PrologExpr *) NULL; diff --git a/src/gtk.inc b/src/gtk.inc index dd40309ee0..7cffd5077b 100644 --- a/src/gtk.inc +++ b/src/gtk.inc @@ -58,6 +58,11 @@ LIB_CPP_SRC=\ common/socket.cpp \ common/sckaddr.cpp \ common/sckipc.cpp \ + common/protocol.cpp \ + common/ftp.cpp \ + common/http.cpp \ + common/url.cpp \ + common/tokenzr.cpp \ \ gtk/accel.cpp \ gtk/app.cpp \ diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index fdd21a83ee..4732b2814d 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -426,4 +426,19 @@ void wxListBox::SetFont( const wxFont &font ) } } +bool wxListBox::IsOwnGtkWindow( GdkWindow *window ) +{ + if (wxWindow::IsOwnGtkWindow( window )) return TRUE; + + GList *child = m_list->children; + while (child) + { + GtkBin *bin = (GtkBin*) child->data; + if (bin->child->window == window) return TRUE; + child = child->next; + } + + return FALSE; +} + diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index fdd21a83ee..4732b2814d 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -426,4 +426,19 @@ void wxListBox::SetFont( const wxFont &font ) } } +bool wxListBox::IsOwnGtkWindow( GdkWindow *window ) +{ + if (wxWindow::IsOwnGtkWindow( window )) return TRUE; + + GList *child = m_list->children; + while (child) + { + GtkBin *bin = (GtkBin*) child->data; + if (bin->child->window == window) return TRUE; + child = child->next; + } + + return FALSE; +} + diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 6dd1d8987d..b371ebfb92 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -1451,7 +1451,9 @@ bool wxResourceManager::DeleteResource(wxWindow *win) { RemoveSelection(item); childHandler->SelectItem(FALSE); +#ifndef __WXGTK__ item->GetParent()->Refresh(); +#endif } } -- 2.45.2