From cc9ffc23f3742943c8d71ddb025d2d2539266e65 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 8 Mar 2007 04:28:09 +0000 Subject: [PATCH] minor cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/hyperlink.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gtk/hyperlink.cpp b/src/gtk/hyperlink.cpp index b06d5963ac..665dba4c4f 100644 --- a/src/gtk/hyperlink.cpp +++ b/src/gtk/hyperlink.cpp @@ -37,7 +37,7 @@ // local functions // ---------------------------------------------------------------------------- -inline bool UseNative() +static inline bool UseNative() { // native gtk_link_button widget is only available in GTK+ 2.10 and later return !gtk_check_version(2, 10, 0); @@ -172,21 +172,21 @@ void wxHyperlinkCtrl::SetNormalColour(const wxColour &colour) wxColour wxHyperlinkCtrl::GetNormalColour() const { + wxColour ret; if ( UseNative() ) { GdkColor *link_color = NULL; - wxColour ret = wxNullColour; // convert GdkColor in wxColour gtk_widget_style_get(m_widget, "link-color", &link_color, NULL); if (link_color) - ret.Set(link_color->red, link_color->green, link_color->blue); + ret = wxColour(*link_color); gdk_color_free (link_color); - - return ret; } else - return wxGenericHyperlinkCtrl::GetNormalColour(); + ret = wxGenericHyperlinkCtrl::GetNormalColour(); + + return ret; } void wxHyperlinkCtrl::SetVisitedColour(const wxColour &colour) @@ -201,21 +201,21 @@ void wxHyperlinkCtrl::SetVisitedColour(const wxColour &colour) wxColour wxHyperlinkCtrl::GetVisitedColour() const { + wxColour ret; if ( UseNative() ) { GdkColor *link_color = NULL; - wxColour ret = wxNullColour; // convert GdkColor in wxColour gtk_widget_style_get(m_widget, "visited-link-color", &link_color, NULL); if (link_color) - ret.Set(link_color->red, link_color->green, link_color->blue); + ret = wxColour(*link_color); gdk_color_free (link_color); - - return ret; } else return wxGenericHyperlinkCtrl::GetVisitedColour(); + + return ret; } void wxHyperlinkCtrl::SetHoverColour(const wxColour &colour) -- 2.45.2