Kaydet (Commit) 068c04fb authored tarafından Riccardo Magliocchetti's avatar Riccardo Magliocchetti Kaydeden (comit) Caolán McNamara

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/19330Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a69a786b
...@@ -10125,7 +10125,7 @@ ENABLE_SYSTRAY_GTK="" ...@@ -10125,7 +10125,7 @@ ENABLE_SYSTRAY_GTK=""
if test "$test_gtk" = "yes"; then if test "$test_gtk" = "yes"; then
if test "$ENABLE_GTK" = "TRUE"; then if test "$ENABLE_GTK" = "TRUE"; then
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10.0 gdk-pixbuf-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.18.0 gdk-pixbuf-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
GTK_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") GTK_CFLAGS=$(printf '%s' "$GTK_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages]))
BUILD_TYPE="$BUILD_TYPE GTK" BUILD_TYPE="$BUILD_TYPE GTK"
...@@ -10181,7 +10181,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes"; ...@@ -10181,7 +10181,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_telepathy" = "yes";
ENABLE_TELEPATHY="TRUE" ENABLE_TELEPATHY="TRUE"
AC_DEFINE(ENABLE_TELEPATHY) AC_DEFINE(ENABLE_TELEPATHY)
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
PKG_CHECK_MODULES( TELEPATHY, telepathy-glib >= 0.18.0 glib-2.0 gobject-2.0 gthread-2.0 gio-2.0 gtk+-2.0 >= 2.10 ) PKG_CHECK_MODULES( TELEPATHY, telepathy-glib >= 0.18.0 glib-2.0 gobject-2.0 gthread-2.0 gio-2.0 gtk+-2.0 >= 2.18.0 )
TELEPATHY_CFLAGS=$(printf '%s' "$TELEPATHY_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") TELEPATHY_CFLAGS=$(printf '%s' "$TELEPATHY_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
......
...@@ -102,7 +102,6 @@ const float fZooms[] = { 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 5.0 }; ...@@ -102,7 +102,6 @@ const float fZooms[] = { 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 5.0 };
/// Get the visible area of the scrolled window /// Get the visible area of the scrolled window
static void getVisibleAreaTwips(GtkWidget* pDocView, GdkRectangle* pArea) static void getVisibleAreaTwips(GtkWidget* pDocView, GdkRectangle* pArea)
{ {
#if GTK_CHECK_VERSION(2,14,0) // we need gtk_adjustment_get_page_size()
TiledWindow& rWindow = lcl_getTiledWindow(pDocView); TiledWindow& rWindow = lcl_getTiledWindow(pDocView);
GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(rWindow.m_pScrolledWindow)); GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(rWindow.m_pScrolledWindow));
...@@ -116,7 +115,6 @@ static void getVisibleAreaTwips(GtkWidget* pDocView, GdkRectangle* pArea) ...@@ -116,7 +115,6 @@ static void getVisibleAreaTwips(GtkWidget* pDocView, GdkRectangle* pArea)
gtk_adjustment_get_page_size(pHAdjustment)); gtk_adjustment_get_page_size(pHAdjustment));
pArea->height = lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(pDocView), pArea->height = lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(pDocView),
gtk_adjustment_get_page_size(pVAdjustment)); gtk_adjustment_get_page_size(pVAdjustment));
#endif
} }
static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ ) static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
......
...@@ -370,10 +370,8 @@ void plugin_init_sys_tray() ...@@ -370,10 +370,8 @@ void plugin_init_sys_tray()
{ {
::SolarMutexGuard aGuard; ::SolarMutexGuard aGuard;
if( /* need gtk_status to resolve */ /* we need the vcl plugin and mainloop initialized */
(gtk_check_version( 2, 10, 0 ) != NULL) || if (!g_type_from_name( "GdkDisplay" ))
/* we need the vcl plugin and mainloop initialized */
!g_type_from_name( "GdkDisplay" ) )
return; return;
OString aLabel; OString aLabel;
......
...@@ -763,9 +763,8 @@ void GtkData::Init() ...@@ -763,9 +763,8 @@ void GtkData::Init()
pDisplay->monitorsChanged( pScreen ); pDisplay->monitorsChanged( pScreen );
g_signal_connect( G_OBJECT(pScreen), "size-changed", g_signal_connect( G_OBJECT(pScreen), "size-changed",
G_CALLBACK(signalScreenSizeChanged), pDisplay ); 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_signal_connect( G_OBJECT(pScreen), "monitors-changed", G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() );
G_CALLBACK(signalMonitorsChanged), GetGtkDisplay() );
} }
} }
} }
......
...@@ -89,14 +89,12 @@ extern "C" ...@@ -89,14 +89,12 @@ extern "C"
} }
const gchar* pVersion = gtk_check_version( 3, 2, 0 ); const gchar* pVersion = gtk_check_version( 3, 2, 0 );
#else
const gchar* pVersion = gtk_check_version( 2, 2, 0 );
#endif
if( pVersion ) if( pVersion )
{ {
SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion); SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion);
return NULL; return NULL;
} }
#endif
GtkYieldMutex *pYieldMutex; GtkYieldMutex *pYieldMutex;
......
...@@ -188,7 +188,6 @@ bool GtkSalSystem::IsUnifiedDisplay() ...@@ -188,7 +188,6 @@ bool GtkSalSystem::IsUnifiedDisplay()
} }
namespace { namespace {
#if GTK_CHECK_VERSION(2,14,0)
static int _fallback_get_primary_monitor (GdkScreen *pScreen) static int _fallback_get_primary_monitor (GdkScreen *pScreen)
{ {
// Use monitor name as primacy heuristic // Use monitor name as primacy heuristic
...@@ -203,7 +202,6 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen) ...@@ -203,7 +202,6 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen)
} }
return 0; return 0;
} }
#endif
static int _get_primary_monitor (GdkScreen *pScreen) static int _get_primary_monitor (GdkScreen *pScreen)
{ {
...@@ -217,10 +215,8 @@ 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, get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(NULL,
"gdk_screen_get_primary_monitor")); "gdk_screen_get_primary_monitor"));
} }
#if GTK_CHECK_VERSION(2,14,0)
if (!get_fn) if (!get_fn)
get_fn = _fallback_get_primary_monitor; get_fn = _fallback_get_primary_monitor;
#endif
if (get_fn) if (get_fn)
return get_fn (pScreen); return get_fn (pScreen);
else else
......
...@@ -3155,7 +3155,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar( ...@@ -3155,7 +3155,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
{ {
const double shim = 0.2; const double shim = 0.2;
#if GTK_CHECK_VERSION(2,10,0)
gint separator_height, separator_width, wide_separators = 0; gint separator_height, separator_width, wide_separators = 0;
gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator, gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator,
...@@ -3180,7 +3179,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar( ...@@ -3180,7 +3179,6 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
w * (1 - 2*shim), separator_width); w * (1 - 2*shim), separator_width);
} }
else else
#endif
{ {
if (nPart == PART_SEPARATOR_VERT) if (nPart == PART_SEPARATOR_VERT)
gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable, gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable,
...@@ -4009,23 +4007,20 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) ...@@ -4009,23 +4007,20 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetHighlightColor( aHighlightColor ); aStyleSet.SetHighlightColor( aHighlightColor );
aStyleSet.SetHighlightTextColor( aHighlightTextColor ); 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 aStyleSet.SetLinkColor(getColor(*link_color));
GdkColor *link_color = NULL; gdk_color_free (link_color);
gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL); link_color = NULL;
if (link_color) }
{ gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
aStyleSet.SetLinkColor(getColor(*link_color)); if (link_color)
gdk_color_free (link_color); {
link_color = NULL; aStyleSet.SetVisitedLinkColor(getColor(*link_color));
} gdk_color_free (link_color);
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 // Tab colors
......
...@@ -318,15 +318,9 @@ lcl_setHelpText( ...@@ -318,15 +318,9 @@ lcl_setHelpText(
const uno::Sequence<OUString>& i_rHelpTexts, const uno::Sequence<OUString>& i_rHelpTexts,
const sal_Int32 i_nIndex) const sal_Int32 i_nIndex)
{ {
#if GTK_CHECK_VERSION(2,12,0)
if (i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength()) if (i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength())
gtk_widget_set_tooltip_text(io_pWidget, gtk_widget_set_tooltip_text(io_pWidget,
OUStringToOString(i_rHelpTexts.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8).getStr()); OUStringToOString(i_rHelpTexts.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8).getStr());
#else
(void)io_pWidget;
(void)i_rHelpTexts;
(void)i_nIndex;
#endif
} }
static GtkWidget* static GtkWidget*
...@@ -429,12 +423,8 @@ GtkPrintDialog::impl_initDialog() ...@@ -429,12 +423,8 @@ GtkPrintDialog::impl_initDialog()
| GTK_PRINT_CAPABILITY_COLLATE | GTK_PRINT_CAPABILITY_COLLATE
| GTK_PRINT_CAPABILITY_REVERSE | GTK_PRINT_CAPABILITY_REVERSE
| GTK_PRINT_CAPABILITY_GENERATE_PS | GTK_PRINT_CAPABILITY_GENERATE_PS
#if GTK_CHECK_VERSION(2,12,0)
| GTK_PRINT_CAPABILITY_NUMBER_UP | GTK_PRINT_CAPABILITY_NUMBER_UP
#endif
#if GTK_CHECK_VERSION(2,14,0)
| GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT | GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT
#endif
)); ));
} }
...@@ -787,11 +777,9 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled ...@@ -787,11 +777,9 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled
ePrintPages = GTK_PRINT_PAGES_RANGES; ePrintPages = GTK_PRINT_PAGES_RANGES;
break; break;
case 2: case 2:
#if GTK_CHECK_VERSION(2,14,0)
if (m_xWrapper->supportsPrintSelection()) if (m_xWrapper->supportsPrintSelection())
ePrintPages = GTK_PRINT_PAGES_SELECTION; ePrintPages = GTK_PRINT_PAGES_SELECTION;
else else
#endif
SAL_INFO("vcl.gtk", "the application wants to print a selection, but the present gtk version does not support it"); SAL_INFO("vcl.gtk", "the application wants to print a selection, but the present gtk version does not support it");
break; break;
default: default:
...@@ -999,7 +987,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe ...@@ -999,7 +987,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
} }
catch (...) {} catch (...) {}
} }
#if GTK_CHECK_VERSION(2,17,5)
if (gtk_print_unix_dialog_get_has_selection(GTK_PRINT_UNIX_DIALOG(m_pDialog))) if (gtk_print_unix_dialog_get_has_selection(GTK_PRINT_UNIX_DIALOG(m_pDialog)))
{ {
uno::Any aSelection; uno::Any aSelection;
...@@ -1022,7 +1009,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe ...@@ -1022,7 +1009,6 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe
aFilterData[aFilterData.getLength()-1].Value <<= aSelection; aFilterData[aFilterData.getLength()-1].Value <<= aSelection;
} }
} }
#endif
uno::Sequence<beans::PropertyValue> aArgs(2); uno::Sequence<beans::PropertyValue> aArgs(2);
aArgs[0].Name = "FilterData"; aArgs[0].Name = "FilterData";
aArgs[0].Value <<= aFilterData; aArgs[0].Value <<= aFilterData;
......
...@@ -13,13 +13,7 @@ ...@@ -13,13 +13,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0) #if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(2,14,0)
#include <gtk/gtkunixprint.h> #include <gtk/gtkunixprint.h>
#else
#include <gtk/gtkprintjob.h>
#include <gtk/gtkpagesetupunixdialog.h>
#include <gtk/gtkprintunixdialog.h>
#endif
#include <osl/module.hxx> #include <osl/module.hxx>
#include <sal/types.h> #include <sal/types.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment