summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-01 14:20:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-02 15:23:52 +0100
commitb0ab6825869c173d536dc95d433c54c6a5589c3f (patch)
tree7956ab72d777f97504fc453489250d0edfbe20a9 /vcl/unx
parent3432a61030910b9bcad706ea8ef889ec8c28e3d4 (diff)
require at least gtk3 3.12.0 to build gtk3 bits
Change-Id: I608fa4075eadd0b3ed038c26aba5d9383a99b314 Reviewed-on: https://gerrit.libreoffice.org/45669 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx3
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx21
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx2
3 files changed, 0 insertions, 26 deletions
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<sal_uIntPtr>(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<GtkWidget*>(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<GtkWidget*>(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;