From b0ab6825869c173d536dc95d433c54c6a5589c3f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 1 Dec 2017 14:20:14 +0000 Subject: require at least gtk3 3.12.0 to build gtk3 bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I608fa4075eadd0b3ed038c26aba5d9383a99b314 Reviewed-on: https://gerrit.libreoffice.org/45669 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 3 --- vcl/unx/gtk3/gtk3gtkframe.cxx | 21 --------------------- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 2 -- 3 files changed, 26 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 75e87e2eb5c7..8a71c2de712e 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -438,14 +438,11 @@ dialog_remove_buttons( GtkDialog *pDialog ) g_return_if_fail( GTK_IS_DIALOG( pDialog ) ); #if GTK_CHECK_VERSION(3,0,0) -#if GTK_CHECK_VERSION(3,12,0) GtkWidget *pHeaderBar = gtk_dialog_get_header_bar(pDialog); if( pHeaderBar != nullptr ) dialog_remove_buttons( pHeaderBar ); else dialog_remove_buttons(gtk_dialog_get_action_area(pDialog)); -#endif - dialog_remove_buttons(gtk_dialog_get_action_area(pDialog)); #else dialog_remove_buttons(pDialog->action_area); #endif diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 25be18c60384..93accd23da41 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -2452,7 +2452,6 @@ bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const tools::Rectangle& return true; } -#if GTK_CHECK_VERSION(3,12,0) namespace { void set_pointing_to(GtkPopover *pPopOver, const tools::Rectangle& rHelpArea, const SalFrameGeometry& rGeometry) @@ -2482,11 +2481,9 @@ namespace gtk_popover_set_pointing_to(pPopOver, &aRect); } } -#endif sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) { -#if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = gtk_popover_new(getMouseEventWidget()); OString sUTF = OUStringToOString(rHelpText, RTL_TEXTENCODING_UTF8); GtkWidget *pLabel = gtk_label_new(sUTF.getStr()); @@ -2508,17 +2505,10 @@ sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rec gtk_widget_show_all(pWidget); return reinterpret_cast(pWidget); -#else - (void)rHelpText; - (void)rHelpArea; - (void)nFlags; - return 0; -#endif } bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) { -#if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = reinterpret_cast(nId); set_pointing_to(GTK_POPOVER(pWidget), rHelpArea, maGeometry); @@ -2528,24 +2518,13 @@ bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, cons gtk_label_set_text(GTK_LABEL(pLabel), sUTF.getStr()); return true; -#else - (void)nId; - (void)rHelpText; - (void)rHelpArea; - return false; -#endif } bool GtkSalFrame::HidePopover(sal_uIntPtr nId) { -#if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = reinterpret_cast(nId); gtk_widget_destroy(pWidget); return true; -#else - (void)nId; - return false; -#endif } void GtkSalFrame::addGrabLevel() diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 7b4d9da569fc..6a9b4b8a0154 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -3016,7 +3016,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) ::Color aHighlightTextColor = getColor( color ); aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor ); -#if GTK_CHECK_VERSION(3, 12, 0) // hyperlink colors style_context_set_state(mpLinkButtonStyle, GTK_STATE_FLAG_LINK); gtk_style_context_get_color(mpLinkButtonStyle, gtk_style_context_get_state(mpLinkButtonStyle), &text_color); @@ -3024,7 +3023,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) style_context_set_state(mpLinkButtonStyle, GTK_STATE_FLAG_VISITED); gtk_style_context_get_color(mpLinkButtonStyle, gtk_style_context_get_state(mpLinkButtonStyle), &text_color); aStyleSet.SetVisitedLinkColor(getColor(text_color)); -#endif { GtkStyleContext *pCStyle = mpNotebookHeaderTabsTabLabelStyle; -- cgit