require GTK+ 3.22 and GLib 2.50

and drop additional checks for min/max GLib versions, it's not needed
master-1.22
monsta 2018-01-28 19:57:20 +03:00 committed by raveit65
parent 2b454bbabc
commit 2611e01e64
5 changed files with 5 additions and 62 deletions

View File

@ -36,17 +36,11 @@ MATE_DEBUG_CHECK
MATE_COMPILE_WARNINGS([maximum])
#MATE_MAINTAINER_MODE_DEFINES
# GLib min/max required versions
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_36],
[Warn on use of APIs added after GLib 2.36])
AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_36],
[Warn on use of APIs deprecated before GLib 2.36])
AM_GLIB_GNU_GETTEXT
GLIB_REQUIRED=2.36.0
GIO_REQUIRED=2.25.12
GTK_REQUIRED=3.14.0
GLIB_REQUIRED=2.50.0
GIO_REQUIRED=2.50.0
GTK_REQUIRED=3.22.0
VTE_REQUIRED=0.46
DCONF_REQUIRED=0.13.4

View File

@ -113,12 +113,8 @@ terminal_info_bar_format_text (TerminalInfoBar *bar,
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.0);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
#endif
gtk_box_pack_start (GTK_BOX (priv->content_box), label, FALSE, FALSE, 0);
gtk_widget_show_all (priv->content_box);

View File

@ -121,13 +121,8 @@ terminal_tab_label_constructor (GType type,
priv->label = label = gtk_label_new (NULL);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
#endif
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);

View File

@ -123,26 +123,6 @@ terminal_util_show_error_dialog (GtkWindow *transient_parent,
g_free (message);
}
static gboolean
open_url (GtkWindow *parent,
const char *uri,
guint32 user_time,
GError **error)
{
#if GTK_CHECK_VERSION (3, 22, 0)
return gtk_show_uri_on_window (parent, uri, user_time, error);
#else
GdkScreen *screen;
if (parent)
screen = gtk_widget_get_screen (GTK_WIDGET (parent));
else
screen = gdk_screen_get_default ();
return gtk_show_uri (screen, uri, user_time, error);
#endif
}
void
terminal_util_show_help (const char *topic,
GtkWindow *parent)
@ -159,7 +139,7 @@ terminal_util_show_help (const char *topic,
url = g_strdup ("help:mate-terminal");
}
if (!open_url (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
if (!gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
{
terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
_("There was an error displaying help"));
@ -231,7 +211,7 @@ terminal_util_open_url (GtkWidget *parent,
g_assert_not_reached ();
}
if (!open_url (GTK_WINDOW (parent), uri, user_time, &error))
if (!gtk_show_uri_on_window (GTK_WINDOW (parent), uri, user_time, &error))
{
terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
_("Could not open the address “%s”"),

View File

@ -577,13 +577,8 @@ position_menu_under_widget (GtkMenu *menu,
GtkRequisition req;
GtkRequisition menu_req;
GdkRectangle monitor;
#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor_num;
GdkDisplay *display;
#else
int monitor_num;
GdkScreen *screen;
#endif
GtkAllocation widget_allocation;
widget_window = gtk_widget_get_window (widget);
@ -593,19 +588,11 @@ position_menu_under_widget (GtkMenu *menu,
gtk_widget_get_preferred_size (widget, &req, NULL);
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
#if GTK_CHECK_VERSION (3, 22, 0)
display = gtk_widget_get_display (GTK_WIDGET (menu));
monitor_num = gdk_display_get_monitor_at_window (display, widget_window);
if (monitor_num == NULL)
monitor_num = gdk_display_get_monitor (display, 0);
gdk_monitor_get_geometry (monitor_num, &monitor);
#else
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
monitor_num = gdk_screen_get_monitor_at_window (screen, widget_window);
if (monitor_num < 0)
monitor_num = 0;
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
#endif
gdk_window_get_origin (widget_window, x, y);
if (!gtk_widget_get_has_window (widget))
@ -2656,7 +2643,6 @@ terminal_window_remove_screen (TerminalWindow *window,
update_tab_visibility (window, -1);
screen_container = terminal_screen_container_get_from_screen (screen);
#if GTK_CHECK_VERSION(3, 16, 0)
if (detach_tab)
{
gtk_notebook_detach_tab (GTK_NOTEBOOK (priv->notebook),
@ -2666,10 +2652,6 @@ terminal_window_remove_screen (TerminalWindow *window,
else
gtk_container_remove (GTK_CONTAINER (priv->notebook),
GTK_WIDGET (screen_container));
#else
gtk_container_remove (GTK_CONTAINER (priv->notebook),
GTK_WIDGET (screen_container));
#endif
}
void
@ -4242,12 +4224,8 @@ terminal_set_title_callback (GtkAction *action,
gtk_box_pack_start (GTK_BOX (message_area), hbox, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Title:"));
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
entry = gtk_entry_new ();