summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/eggfindbar.c4
-rw-r--r--shell/ev-annotation-properties-dialog.c20
-rw-r--r--shell/ev-message-area.c8
-rw-r--r--shell/ev-navigation-action-widget.c16
-rw-r--r--shell/ev-password-view.c8
-rw-r--r--shell/ev-progress-message-area.c4
-rw-r--r--shell/ev-properties-license.c4
-rw-r--r--shell/ev-utils.c13
-rw-r--r--shell/ev-window.c17
9 files changed, 2 insertions, 92 deletions
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index ce0cf8ad..94a2b8d9 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -354,11 +354,7 @@ egg_find_bar_init (EggFindBar *find_bar)
priv->status_label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (priv->status_label),
PANGO_ELLIPSIZE_END);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->status_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->status_label), 0.0, 0.5);
-#endif
g_signal_connect (priv->find_entry, "changed",
G_CALLBACK (entry_changed_callback),
diff --git a/shell/ev-annotation-properties-dialog.c b/shell/ev-annotation-properties-dialog.c
index a2815030..dc51feea 100644
--- a/shell/ev-annotation-properties-dialog.c
+++ b/shell/ev-annotation-properties-dialog.c
@@ -94,11 +94,7 @@ ev_annotation_properties_dialog_constructed (GObject *object)
switch (dialog->annot_type) {
case EV_ANNOTATION_TYPE_TEXT:
label = gtk_label_new (_("Icon:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1);
gtk_widget_show (label);
@@ -158,11 +154,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (grid);
label = gtk_label_new (_("Author:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
gtk_widget_show (label);
@@ -173,11 +165,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->author);
label = gtk_label_new (_("Color:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_widget_show (label);
@@ -187,11 +175,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->color);
label = gtk_label_new (_("Style:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
gtk_widget_show (label);
@@ -222,11 +206,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (hbox);
label = gtk_label_new (_("Initial window state:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
gtk_widget_show (label);
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c
index ba0e86f8..2824ada5 100644
--- a/shell/ev-message-area.c
+++ b/shell/ev-message-area.c
@@ -105,11 +105,7 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
-#endif
gtk_widget_set_can_focus (area->priv->label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
@@ -118,11 +114,7 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->secondary_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->secondary_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->secondary_label), 0.0, 0.5);
-#endif
gtk_widget_set_can_focus (area->priv->secondary_label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->secondary_label, TRUE, TRUE, 0);
diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c
index 97bd0da5..d618e9a0 100644
--- a/shell/ev-navigation-action-widget.c
+++ b/shell/ev-navigation-action-widget.c
@@ -131,34 +131,18 @@ menu_position_func (GtkMenu *menu,
GtkTextDirection direction;
GdkWindow *gdk_window;
GdkRectangle monitor;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor_num;
GdkDisplay *display;
-#else
- gint monitor_num;
- GdkScreen *screen;
-#endif
gtk_widget_get_preferred_size (GTK_WIDGET (button->menu), &menu_req, NULL);
direction = gtk_widget_get_direction (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gtk_widget_get_display (GTK_WIDGET (menu));
-#else
- screen = gtk_widget_get_screen (GTK_WIDGET (menu));
-#endif
gdk_window = gtk_widget_get_window (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_window (display, gdk_window);
if (monitor_num == NULL)
monitor_num = gdk_display_get_monitor (display, 0);
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_window (screen, gdk_window);
- if (monitor_num < 0)
- monitor_num = 0;
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
gdk_window_get_origin (gdk_window, x, y);
gtk_widget_get_allocation (widget, &allocation);
diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c
index d0bf4417..eada87a7 100644
--- a/shell/ev-password-view.c
+++ b/shell/ev-password-view.c
@@ -287,11 +287,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_widget_show (main_vbox);
label = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
file_name = g_file_get_basename (password_view->priv->uri_file);
text = g_markup_printf_escaped (_("The document ā€œ%sā€ is locked and requires a password before it can be opened."),
@@ -328,11 +324,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Password:"));
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
password_view->priv->password_entry = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (password_view->priv->password_entry), FALSE);
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index 4c972e7c..6ac9f245 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -91,11 +91,7 @@ ev_progress_message_area_init (EvProgressMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label),
PANGO_ELLIPSIZE_END);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
diff --git a/shell/ev-properties-license.c b/shell/ev-properties-license.c
index f9f11b04..e65b4bd1 100644
--- a/shell/ev-properties-license.c
+++ b/shell/ev-properties-license.c
@@ -109,11 +109,7 @@ ev_properties_license_add_section (EvPropertiesLicense *properties,
gchar *markup;
title = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (title), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
-#endif
gtk_label_set_use_markup (GTK_LABEL (title), TRUE);
markup = g_strdup_printf ("<b>%s</b>", title_text);
gtk_label_set_markup (GTK_LABEL (title), markup);
diff --git a/shell/ev-utils.c b/shell/ev-utils.c
index d4a8ff76..342f838e 100644
--- a/shell/ev-utils.c
+++ b/shell/ev-utils.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#if GTK_CHECK_VERSION(3, 22, 0)
static int
_gtk_get_monitor_num (GdkMonitor *monitor)
{
@@ -43,7 +42,6 @@ _gtk_get_monitor_num (GdkMonitor *monitor)
return -1;
}
-#endif
static void
ev_gui_sanitise_popup_position (GtkMenu *menu,
@@ -51,13 +49,8 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gint *x,
gint *y)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display = gtk_widget_get_display (widget);
GdkMonitor *monitor_num;
-#else
- GdkScreen *screen = gtk_widget_get_screen (widget);
- gint monitor_num;
-#endif
GdkRectangle monitor;
GtkRequisition req;
@@ -65,15 +58,9 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_point (display, *x, *y);
gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num));
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
- gtk_menu_set_monitor (menu, monitor_num);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
*x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
*y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/shell/ev-window.c b/shell/ev-window.c
index e6bee902..112cbadb 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -390,20 +390,13 @@ static gdouble
get_screen_dpi (EvWindow *window)
{
GdkScreen *screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
screen = gtk_window_get_screen (GTK_WINDOW (window));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
+
return ev_document_misc_get_screen_dpi (screen, monitor);
}
@@ -4924,17 +4917,11 @@ ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (ev_window),
EV_HELP,
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)),
- EV_HELP,
- gtk_get_current_event_time (),
- &error);
-#endif
+
if (error) {
ev_window_error_message (ev_window, error,
"%s", _("There was an error displaying help"));