зеркало из https://github.com/mozilla/gecko-dev.git
Bug 877409 - Remove old GTK_CHECK_VERSION/gtk_check_version for versions of GTK already covered by the minimum GTK build requirement 2.10. r=karlt
This commit is contained in:
Родитель
92aa9f3122
Коммит
32ec2d3fb8
|
@ -2610,24 +2610,6 @@ static void MOZ_gdk_display_close(GdkDisplay *display)
|
|||
g_free(theme_name);
|
||||
}
|
||||
|
||||
// gdk_display_close was broken prior to gtk+-2.10.0.
|
||||
// (http://bugzilla.gnome.org/show_bug.cgi?id=85715)
|
||||
// gdk_display_manager_set_default_display (gdk_display_manager_get(), NULL)
|
||||
// was also broken.
|
||||
if (gtk_check_version(2,10,0) != NULL) {
|
||||
#ifdef MOZ_X11
|
||||
// Version check failed - broken gdk_display_close.
|
||||
//
|
||||
// Let the gdk structures leak but at least close the Display,
|
||||
// assuming that gdk will not use it again.
|
||||
Display* dpy = GDK_DISPLAY_XDISPLAY(display);
|
||||
if (!theme_is_qt)
|
||||
XCloseDisplay(dpy);
|
||||
#else
|
||||
gdk_display_close(display);
|
||||
#endif /* MOZ_X11 */
|
||||
}
|
||||
else {
|
||||
#if CLEANUP_MEMORY
|
||||
// Get a (new) Pango context that holds a reference to the fontmap that
|
||||
// GTK has been using. gdk_pango_context_get() must be called while GTK
|
||||
|
@ -2663,14 +2645,12 @@ static void MOZ_gdk_display_close(GdkDisplay *display)
|
|||
// pango_cairo_font_map_set_default(NULL), which would release the
|
||||
// reference on the old fontmap.
|
||||
|
||||
#if GTK_CHECK_VERSION(2,8,0)
|
||||
// cairo_debug_reset_static_data() is prototyped through cairo.h included
|
||||
// by gtk.h.
|
||||
#ifdef cairo_debug_reset_static_data
|
||||
#error "Looks like we're including Mozilla's cairo instead of system cairo"
|
||||
#endif
|
||||
cairo_debug_reset_static_data();
|
||||
#endif // 2.8.0
|
||||
#endif // CLEANUP_MEMORY
|
||||
|
||||
if (buggyCairoShutdown) {
|
||||
|
@ -2678,7 +2658,6 @@ static void MOZ_gdk_display_close(GdkDisplay *display)
|
|||
gdk_display_close(display);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // MOZ_WIDGET_GTK2
|
||||
|
||||
/**
|
||||
|
|
|
@ -470,15 +470,10 @@ nsNativeThemeGTK::GetGtkWidgetAndState(uint8_t aWidgetType, nsIFrame* aFrame,
|
|||
break;
|
||||
case eTreeSortDirection_Natural:
|
||||
default:
|
||||
/* GTK_ARROW_NONE is implemented since GTK 2.10
|
||||
* This prevents the treecolums from getting smaller
|
||||
/* This prevents the treecolums from getting smaller
|
||||
* and wider when switching sort direction off and on
|
||||
* */
|
||||
#if GTK_CHECK_VERSION(2,10,0)
|
||||
*aWidgetFlags = GTK_ARROW_NONE;
|
||||
#else
|
||||
return false; // Don't draw when we shouldn't
|
||||
#endif // GTK_CHECK_VERSION(2,10,0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,11 +93,7 @@ nsScreenGtk :: Init (GdkWindow *aRootWindow)
|
|||
int format_returned;
|
||||
int length_returned;
|
||||
|
||||
#if GTK_CHECK_VERSION(2,0,0)
|
||||
GdkAtom cardinal_atom = gdk_x11_xatom_to_atom(XA_CARDINAL);
|
||||
#else
|
||||
GdkAtom cardinal_atom = (GdkAtom) XA_CARDINAL;
|
||||
#endif
|
||||
|
||||
gdk_error_trap_push();
|
||||
|
||||
|
|
|
@ -89,11 +89,7 @@ nsScreenManagerGtk :: EnsureInit()
|
|||
if (mCachedScreenArray.Count() > 0)
|
||||
return NS_OK;
|
||||
|
||||
#if GTK_CHECK_VERSION(2,2,0)
|
||||
mRootWindow = gdk_get_default_root_window();
|
||||
#else
|
||||
mRootWindow = GDK_ROOT_PARENT();
|
||||
#endif // GTK_CHECK_VERSION(2,2,0)
|
||||
g_object_ref(mRootWindow);
|
||||
|
||||
// GDK_STRUCTURE_MASK ==> StructureNotifyMask, for ConfigureNotify
|
||||
|
|
|
@ -139,7 +139,7 @@ nsFilePickerConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|||
Preferences::GetBool("ui.allow_platform_file_picker", true);
|
||||
|
||||
nsCOMPtr<nsIFilePicker> picker;
|
||||
if (allowPlatformPicker && gtk_check_version(2,6,3) == NULL) {
|
||||
if (allowPlatformPicker) {
|
||||
picker = new nsFilePicker;
|
||||
} else {
|
||||
picker = do_CreateInstance(kXULFilePickerCID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче