diff options
author | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | 2015-10-12 22:13:37 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 08:09:40 +0000 |
commit | 068c04fb06806a9345c0059545d19a416d7e60b7 (patch) | |
tree | 0a0790e03929f9e862baf9347dbe76fc10661c1e /vcl | |
parent | a69a786b91048d69bbb47503e3720de613935e56 (diff) |
Bump gtk+ version to 2.18
2.18 is the version available in RHEL 6 released in 2010.
Change-Id: I4cd4fc89f6b51e6f58ca72b8182f80316b1f4f88
Reviewed-on: https://gerrit.libreoffice.org/19330
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/app/gtkdata.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtkinst.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 31 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salprn-gtk.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/gtk/inc/gtkprintwrapper.hxx | 6 |
6 files changed, 16 insertions, 48 deletions
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index 694d057fdc4a..e20339287c3a 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -763,9 +763,8 @@ void GtkData::Init() pDisplay->monitorsChanged( pScreen ); g_signal_connect( G_OBJECT(pScreen), "size-changed", G_CALLBACK(signalScreenSizeChanged), pDisplay ); - if( ! gtk_check_version( 2, 14, 0 ) ) // monitors-changed came in with 2.14, avoid an assertion - g_signal_connect( G_OBJECT(pScreen), "monitors-changed", - G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() ); + g_signal_connect( G_OBJECT(pScreen), "monitors-changed", + G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() ); } } } diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index c41c4084c58c..6243c92833fc 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -89,14 +89,12 @@ extern "C" } const gchar* pVersion = gtk_check_version( 3, 2, 0 ); -#else - const gchar* pVersion = gtk_check_version( 2, 2, 0 ); -#endif if( pVersion ) { SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion); return NULL; } +#endif GtkYieldMutex *pYieldMutex; diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 7c5e7817a396..b43ac634b376 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -188,7 +188,6 @@ bool GtkSalSystem::IsUnifiedDisplay() } namespace { -#if GTK_CHECK_VERSION(2,14,0) static int _fallback_get_primary_monitor (GdkScreen *pScreen) { // Use monitor name as primacy heuristic @@ -203,7 +202,6 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen) } return 0; } -#endif static int _get_primary_monitor (GdkScreen *pScreen) { @@ -217,10 +215,8 @@ static int _get_primary_monitor (GdkScreen *pScreen) get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(NULL, "gdk_screen_get_primary_monitor")); } -#if GTK_CHECK_VERSION(2,14,0) if (!get_fn) get_fn = _fallback_get_primary_monitor; -#endif if (get_fn) return get_fn (pScreen); else diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 8438e7642131..ff520abbdd36 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -3155,7 +3155,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar( { const double shim = 0.2; -#if GTK_CHECK_VERSION(2,10,0) gint separator_height, separator_width, wide_separators = 0; gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator, @@ -3180,7 +3179,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar( w * (1 - 2*shim), separator_width); } else -#endif { if (nPart == PART_SEPARATOR_VERT) gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable, @@ -4009,23 +4007,20 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) aStyleSet.SetHighlightColor( aHighlightColor ); aStyleSet.SetHighlightTextColor( aHighlightTextColor ); - if( ! gtk_check_version( 2, 10, 0 ) ) // link colors came in with 2.10, avoid an assertion + // hyperlink colors + GdkColor *link_color = NULL; + gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL); + if (link_color) { - // hyperlink colors - GdkColor *link_color = NULL; - gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL); - if (link_color) - { - aStyleSet.SetLinkColor(getColor(*link_color)); - gdk_color_free (link_color); - link_color = NULL; - } - gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL); - if (link_color) - { - aStyleSet.SetVisitedLinkColor(getColor(*link_color)); - gdk_color_free (link_color); - } + aStyleSet.SetLinkColor(getColor(*link_color)); + gdk_color_free (link_color); + link_color = NULL; + } + gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL); + if (link_color) + { + aStyleSet.SetVisitedLinkColor(getColor(*link_color)); + gdk_color_free (link_color); } // Tab colors diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index d05f71b87a63..cf20b2c430eb 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -318,15 +318,9 @@ lcl_setHelpText( const uno::Sequence<OUString>& i_rHelpTexts, const sal_Int32 i_nIndex) { -#if GTK_CHECK_VERSION(2,12,0) if (i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength()) gtk_widget_set_tooltip_text(io_pWidget, OUStringToOString(i_rHelpTexts.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8).getStr()); -#else - (void)io_pWidget; - (void)i_rHelpTexts; - (void)i_nIndex; -#endif } static GtkWidget* @@ -429,12 +423,8 @@ GtkPrintDialog::impl_initDialog() | GTK_PRINT_CAPABILITY_COLLATE | GTK_PRINT_CAPABILITY_REVERSE | GTK_PRINT_CAPABILITY_GENERATE_PS -#if GTK_CHECK_VERSION(2,12,0) | GTK_PRINT_CAPABILITY_NUMBER_UP -#endif -#if GTK_CHECK_VERSION(2,14,0) | GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT -#endif )); } @@ -787,11 +777,9 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled ePrintPages = GTK_PRINT_PAGES_RANGES; break; case 2: -#if GTK_CHECK_VERSION(2,14,0) if (m_xWrapper->supportsPrintSelection()) ePrintPages = GTK_PRINT_PAGES_SELECTION; else -#endif SAL_INFO("vcl.gtk", "the application wants to print a selection, but the present gtk version does not support it"); break; default: @@ -999,7 +987,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe } catch (...) {} } -#if GTK_CHECK_VERSION(2,17,5) if (gtk_print_unix_dialog_get_has_selection(GTK_PRINT_UNIX_DIALOG(m_pDialog))) { uno::Any aSelection; @@ -1022,7 +1009,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe aFilterData[aFilterData.getLength()-1].Value <<= aSelection; } } -#endif uno::Sequence<beans::PropertyValue> aArgs(2); aArgs[0].Name = "FilterData"; aArgs[0].Value <<= aFilterData; diff --git a/vcl/unx/gtk/inc/gtkprintwrapper.hxx b/vcl/unx/gtk/inc/gtkprintwrapper.hxx index 955cd43e68c4..8840d6c3bbc4 100644 --- a/vcl/unx/gtk/inc/gtkprintwrapper.hxx +++ b/vcl/unx/gtk/inc/gtkprintwrapper.hxx @@ -13,13 +13,7 @@ #include <gtk/gtk.h> #if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0) -#if GTK_CHECK_VERSION(2,14,0) #include <gtk/gtkunixprint.h> -#else -#include <gtk/gtkprintjob.h> -#include <gtk/gtkpagesetupunixdialog.h> -#include <gtk/gtkprintunixdialog.h> -#endif #include <osl/module.hxx> #include <sal/types.h> |