diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-01 14:20:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-02 15:23:52 +0100 |
commit | b0ab6825869c173d536dc95d433c54c6a5589c3f (patch) | |
tree | 7956ab72d777f97504fc453489250d0edfbe20a9 | |
parent | 3432a61030910b9bcad706ea8ef889ec8c28e3d4 (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>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 21 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 2 |
5 files changed, 1 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index 505aaa768948..75a9d92c999f 100644 --- a/configure.ac +++ b/configure.ac @@ -9724,7 +9724,7 @@ if test "x$enable_gtk3" = "xyes"; then AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo]) fi : ${with_system_cairo:=yes} - PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.10 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") + PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.12 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") if test "x$ENABLE_GTK3" = "xTRUE"; then R="gtk3" dnl Avoid installed by unpackaged files for now. diff --git a/libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx index 2ef07d964f89..ab8f9c4cef8a 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx @@ -82,11 +82,9 @@ gtv_comments_sidebar_init(GtvCommentsSidebar* sidebar) g_object_set(sidebar->commentsgrid, "orientation", GTK_ORIENTATION_VERTICAL, nullptr); sidebar->viewannotationsButton = gtk_button_new_with_label(".uno:ViewAnnotations"); -#if GTK_CHECK_VERSION(3,12,0) // Hack to make sidebar grid wide enough to not need any horizontal scrollbar gtk_widget_set_margin_start(sidebar->viewannotationsButton, 20); gtk_widget_set_margin_end(sidebar->viewannotationsButton, 20); -#endif gtk_container_add(GTK_CONTAINER(sidebar), sidebar->viewannotationsButton); g_signal_connect_swapped(sidebar->viewannotationsButton, "clicked", G_CALLBACK(gtv_comments_sidebar_view_annotations_cb), sidebar); 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; |