From 7fc8b9a4fe462ee36b4a120303588a04d1b8e7a1 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 13 Feb 2009 10:10:36 +0000 Subject: [PATCH] GTK prefix for internal tooltip methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/listbox.h | 2 +- include/wx/gtk/radiobox.h | 2 +- include/wx/gtk/tooltip.h | 11 ++++------- include/wx/gtk/window.h | 2 +- src/gtk/listbox.cpp | 2 +- src/gtk/radiobox.cpp | 6 +++--- src/gtk/tooltip.cpp | 10 +++++----- src/gtk/window.cpp | 4 ++-- 8 files changed, 18 insertions(+), 21 deletions(-) diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index 92b6f1b8c6..5479fb030a 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -85,7 +85,7 @@ public: GtkWidget *GetConnectWidget(); #if wxUSE_TOOLTIPS - void ApplyToolTip( GtkTooltips *tips, const gchar *tip ); + void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ); #endif // wxUSE_TOOLTIPS struct _GtkTreeView *m_treeview; diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index 0d3a611b27..1db0f9931a 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -131,7 +131,7 @@ public: void GtkDisableEvents(); void GtkEnableEvents(); #if wxUSE_TOOLTIPS - void ApplyToolTip( GtkTooltips *tips, const gchar *tip ); + void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ); #endif // wxUSE_TOOLTIPS wxRadioBoxButtonsInfoList m_buttonsInfo; diff --git a/include/wx/gtk/tooltip.h b/include/wx/gtk/tooltip.h index de97789e55..db205f5f16 100644 --- a/include/wx/gtk/tooltip.h +++ b/include/wx/gtk/tooltip.h @@ -46,15 +46,12 @@ public: bool IsOk() const { return m_window != NULL; } - // wxGTK-only from now on - - // this forwards back to wxWindow::ApplyToolTip() - void Apply( wxWindow *win ); + // this forwards back to wxWindow::GTKApplyToolTip() + void GTKApply( wxWindow *win ); // this just sets the given tooltip for the specified widget - // - // tip must be already UTF-8 encoded - static void Apply(GtkWidget *w, const gchar *tip); + // tip must be UTF-8 encoded + static void GTKApply(GtkWidget *w, const gchar *tip); private: wxString m_text; diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 206de1e16a..7ee5f596a3 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -217,7 +217,7 @@ public: #if wxUSE_TOOLTIPS // applies tooltip to the widget (tip must be UTF-8 encoded) - virtual void ApplyToolTip( GtkTooltips *tips, const gchar *tip ); + virtual void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ); #endif // wxUSE_TOOLTIPS // Called when a window should delay showing itself diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 1feb343732..ad03aaaea5 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -920,7 +920,7 @@ int wxListBox::DoListHitTest(const wxPoint& point) const // ---------------------------------------------------------------------------- #if wxUSE_TOOLTIPS -void wxListBox::ApplyToolTip( GtkTooltips *tips, const gchar *tip ) +void wxListBox::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ) { // RN: Is this needed anymore? gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, NULL ); diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 13e3c1fc27..18f02bf683 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -571,7 +571,7 @@ void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w) } #if wxUSE_TOOLTIPS -void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) +void wxRadioBox::GTKApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) { // set this tooltip for all radiobuttons which don't have their own tips unsigned n = 0; @@ -581,7 +581,7 @@ void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) { if ( !GetItemToolTip(n) ) { - wxToolTip::Apply(GTK_WIDGET(node->GetData()->button), tip); + wxToolTip::GTKApply(GTK_WIDGET(node->GetData()->button), tip); } } } @@ -594,7 +594,7 @@ void wxRadioBox::DoSetItemToolTip(unsigned int n, wxToolTip *tooltip) if ( tooltip ) buf = wxGTK_CONV(tooltip->GetTip()); - wxToolTip::Apply(GTK_WIDGET(m_buttonsInfo[n]->button), buf); + wxToolTip::GTKApply(GTK_WIDGET(m_buttonsInfo[n]->button), buf); } #endif // wxUSE_TOOLTIPS diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index 8053dca29b..801ae68eed 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -41,10 +41,10 @@ wxToolTip::wxToolTip( const wxString &tip ) void wxToolTip::SetTip( const wxString &tip ) { m_text = tip; - Apply( m_window ); + GTKApply( m_window ); } -void wxToolTip::Apply( wxWindow *win ) +void wxToolTip::GTKApply( wxWindow *win ) { if (!win) return; @@ -55,13 +55,13 @@ void wxToolTip::Apply( wxWindow *win ) m_window = win; if (m_text.empty()) - m_window->ApplyToolTip( gs_tooltips, NULL ); + m_window->GTKApplyToolTip( gs_tooltips, NULL ); else - m_window->ApplyToolTip( gs_tooltips, wxGTK_CONV_SYS(m_text) ); + m_window->GTKApplyToolTip( gs_tooltips, wxGTK_CONV_SYS(m_text) ); } /* static */ -void wxToolTip::Apply(GtkWidget *w, const gchar *tip) +void wxToolTip::GTKApply(GtkWidget *w, const gchar *tip) { if ( !gs_tooltips ) gs_tooltips = gtk_tooltips_new(); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e7b494437a..e88df950cb 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3716,10 +3716,10 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip ) wxWindowBase::DoSetToolTip(tip); if (m_tooltip) - m_tooltip->Apply( (wxWindow *)this ); + m_tooltip->GTKApply( (wxWindow *)this ); } -void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const gchar *tip ) +void wxWindowGTK::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ) { gtk_tooltips_set_tip(tips, GetConnectWidget(), tip, NULL); } -- 2.45.2