Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-03-31 15:51:45 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-03-31 15:51:45 (GMT)
commit764836d36a1391ed0bc03841c68ed768e7ec94b6 (patch)
treeae6ecce071383c03ead7d48f4601d5fa0e89ccd6 /shell
parent615629a95ba70c7c750c3472b36cb4440f2ead84 (diff)
Bump GTK+ requirements to 2.20.0
Remove GTK_CHECK_VERSION macros and unneeded code.
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-properties-license.c5
-rw-r--r--shell/ev-sidebar-attachments.c15
-rw-r--r--shell/ev-window.c53
3 files changed, 2 insertions, 71 deletions
diff --git a/shell/ev-properties-license.c b/shell/ev-properties-license.c
index f7c7233..79c6a19 100644
--- a/shell/ev-properties-license.c
+++ b/shell/ev-properties-license.c
@@ -84,16 +84,15 @@ get_license_uri_widget (const gchar *uri)
"ellipsize", PANGO_ELLIPSIZE_END,
NULL);
-#if GTK_CHECK_VERSION (2, 17, 0)
checked_uri = g_uri_parse_scheme (uri);
if (checked_uri) {
markup = g_markup_printf_escaped ("<a href=\"%s\">%s</a>", uri, uri);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
g_free (checked_uri);
- } else
-#endif
+ } else {
gtk_label_set_text (GTK_LABEL (label), uri);
+ }
return label;
}
diff --git a/shell/ev-sidebar-attachments.c b/shell/ev-sidebar-attachments.c
index aaaea31..60c7ae0 100644
--- a/shell/ev-sidebar-attachments.c
+++ b/shell/ev-sidebar-attachments.c
@@ -534,12 +534,6 @@ ev_sidebar_attachments_class_init (EvSidebarAttachmentsClass *ev_attachbar_class
static void
ev_sidebar_attachments_init (EvSidebarAttachments *ev_attachbar)
{
-#if !GTK_CHECK_VERSION (2, 15, 0)
- const GtkTargetEntry drag_targets[] = {
- { "text/uri-list", 0, 0 }
- };
-#endif
-
GtkWidget *swindow;
ev_attachbar->priv = EV_SIDEBAR_ATTACHMENTS_GET_PRIVATE (ev_attachbar);
@@ -589,21 +583,12 @@ ev_sidebar_attachments_init (EvSidebarAttachments *ev_attachbar)
g_object_unref);
/* Drag and Drop */
-#if GTK_CHECK_VERSION (2, 15, 0)
gtk_icon_view_enable_model_drag_source (
GTK_ICON_VIEW (ev_attachbar->priv->icon_view),
GDK_BUTTON1_MASK,
NULL, 0,
GDK_ACTION_COPY);
gtk_drag_source_add_uri_targets (ev_attachbar->priv->icon_view);
-#else
- gtk_icon_view_enable_model_drag_source (
- GTK_ICON_VIEW (ev_attachbar->priv->icon_view),
- GDK_BUTTON1_MASK,
- drag_targets,
- G_N_ELEMENTS (drag_targets),
- GDK_ACTION_COPY);
-#endif
g_signal_connect (ev_attachbar->priv->icon_view,
"drag-data-get",
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 1f527b5..5f522c1 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -409,9 +409,6 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
/* File menu */
ev_window_set_action_sensitive (ev_window, "FileOpenCopy", has_document);
ev_window_set_action_sensitive (ev_window, "FileSaveAs", has_document && ok_to_copy);
-#if !GTK_CHECK_VERSION (2, 17, 4)
- ev_window_set_action_sensitive (ev_window, "FilePageSetup", has_pages && ok_to_print && ok_to_print_setup);
-#endif
ev_window_set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print);
ev_window_set_action_sensitive (ev_window, "FileProperties", has_document && has_properties);
@@ -2881,43 +2878,6 @@ get_print_page_setup (GKeyFile *key_file)
}
static void
-ev_window_print_page_setup_done_cb (GtkPageSetup *page_setup,
- EvWindow *window)
-{
- /* Dialog was canceled */
- if (!page_setup)
- return;
-
- ev_window_save_print_page_setup (window, page_setup);
-}
-
-static void
-ev_window_cmd_file_print_setup (GtkAction *action,
- EvWindow *ev_window)
-{
- GKeyFile *print_settings_file;
- GtkPrintSettings *print_settings;
- GtkPageSetup *print_page_setup;
-
- print_settings_file = get_print_settings_file ();
-
- print_settings = get_print_settings (print_settings_file);
- ev_window_load_print_settings_from_metadata (ev_window, print_settings);
-
- print_page_setup = get_print_page_setup (print_settings_file);
- ev_window_load_print_page_setup_from_metadata (ev_window, print_page_setup);
-
- gtk_print_run_page_setup_dialog_async (GTK_WINDOW (ev_window),
- print_page_setup,
- print_settings,
- (GtkPageSetupDoneFunc)ev_window_print_page_setup_done_cb,
- ev_window);
- g_object_unref (print_settings);
- g_object_unref (print_page_setup);
- g_key_file_free (print_settings_file);
-}
-
-static void
ev_window_print_cancel (EvWindow *ev_window)
{
EvPrintOperation *op;
@@ -5041,9 +5001,6 @@ static const GtkActionEntry entries[] = {
{ "FileSaveAs", GTK_STOCK_SAVE_AS, N_("_Save a Copy…"), "<control>S",
N_("Save a copy of the current document"),
G_CALLBACK (ev_window_cmd_save_as) },
- { "FilePageSetup", GTK_STOCK_PAGE_SETUP, N_("Page Set_up…"), NULL,
- N_("Set up the page settings for printing"),
- G_CALLBACK (ev_window_cmd_file_print_setup) },
{ "FilePrint", GTK_STOCK_PRINT, N_("_Print…"), "<control>P",
N_("Print this document"),
G_CALLBACK (ev_window_cmd_file_print) },
@@ -6164,16 +6121,6 @@ ev_window_init (EvWindow *ev_window)
}
g_free (ui_path);
-#if GTK_CHECK_VERSION (2, 17, 4)
- {
- GtkAction *action;
-
- action = gtk_action_group_get_action (ev_window->priv->action_group,
- "FilePageSetup");
- g_object_set (action, "visible", FALSE, "sensitive", FALSE, NULL);
- }
-#endif
-
ev_window->priv->recent_manager = gtk_recent_manager_get_default ();
ev_window->priv->recent_action_group = NULL;
ev_window->priv->recent_ui_id = 0;