[gedit] Removed unneeded version checks



commit a2fdaefbe99fb787efb31d6e0a66a36f8a2d0eec
Author: Garrett Regier <alias301 gmail com>
Date:   Sun Jun 13 09:27:37 2010 -0700

    Removed unneeded version checks

 gedit/gedit-commands-file-print.c |   17 -----------------
 gedit/gedit-commands.h            |    6 ------
 gedit/gedit-print-job.c           |    2 --
 gedit/gedit-tab.h                 |    3 ---
 gedit/gedit-ui.h                  |    4 ----
 gedit/gedit-window.c              |   31 -------------------------------
 6 files changed, 0 insertions(+), 63 deletions(-)
---
diff --git a/gedit/gedit-commands-file-print.c b/gedit/gedit-commands-file-print.c
index 4659959..85a63e3 100644
--- a/gedit/gedit-commands-file-print.c
+++ b/gedit/gedit-commands-file-print.c
@@ -42,23 +42,6 @@
 #include "gedit-tab.h"
 #include "gedit-debug.h"
 
-#if !GTK_CHECK_VERSION (2, 17, 4)
-void
-_gedit_cmd_file_page_setup (GtkAction   *action,
-			    GeditWindow *window)
-{
-	GeditTab *tab;
-
-	gedit_debug (DEBUG_COMMANDS);
-
-	tab = gedit_window_get_active_tab (window);
-	if (tab == NULL)
-		return;
-
-	_gedit_tab_page_setup (tab);
-}
-#endif
-
 void
 _gedit_cmd_file_print_preview (GtkAction   *action,
 			       GeditWindow *window)
diff --git a/gedit/gedit-commands.h b/gedit/gedit-commands.h
index a4c98c2..5fabb92 100644
--- a/gedit/gedit-commands.h
+++ b/gedit/gedit-commands.h
@@ -164,12 +164,6 @@ void		_gedit_cmd_file_save_documents_list	(GeditWindow *window,
 							 GList       *docs);
 
 
-#if !GTK_CHECK_VERSION (2, 17, 4)
-void		_gedit_cmd_file_page_setup		(GtkAction   *action,
-							 GeditWindow *window);
-#endif
-
-
 G_END_DECLS
 
 #endif /* __GEDIT_COMMANDS_H__ */ 
diff --git a/gedit/gedit-print-job.c b/gedit/gedit-print-job.c
index 0ae61b8..6ec966b 100644
--- a/gedit/gedit-print-job.c
+++ b/gedit/gedit-print-job.c
@@ -779,9 +779,7 @@ gedit_print_job_print (GeditPrintJob            *job,
 	gtk_print_operation_set_job_name (priv->operation, job_name);
 	g_free (job_name);
 
-#if GTK_CHECK_VERSION (2, 17, 4)
 	gtk_print_operation_set_embed_page_setup (priv->operation, TRUE);
-#endif
 
 	gtk_print_operation_set_custom_tab_label (priv->operation,
 						  _("Text Editor"));
diff --git a/gedit/gedit-tab.h b/gedit/gedit-tab.h
index ec00729..237dcc8 100644
--- a/gedit/gedit-tab.h
+++ b/gedit/gedit-tab.h
@@ -172,9 +172,6 @@ void		 _gedit_tab_mark_for_closing	(GeditTab	     *tab);
 
 gboolean	 _gedit_tab_can_close		(GeditTab	     *tab);
 
-#if !GTK_CHECK_VERSION (2, 17, 4)
-void		 _gedit_tab_page_setup		(GeditTab            *tab);
-#endif
 
 G_END_DECLS
 
diff --git a/gedit/gedit-ui.h b/gedit/gedit-ui.h
index 1bf01e0..4c94ec1 100644
--- a/gedit/gedit-ui.h
+++ b/gedit/gedit-ui.h
@@ -83,10 +83,6 @@ static const GtkActionEntry gedit_menu_entries[] =
 	  N_("Save the current file with a different name"), G_CALLBACK (_gedit_cmd_file_save_as) },
 	{ "FileRevert", GTK_STOCK_REVERT_TO_SAVED, NULL, NULL,
 	  N_("Revert to a saved version of the file"), G_CALLBACK (_gedit_cmd_file_revert) },
-#if !GTK_CHECK_VERSION (2, 17, 4)
-	{ "FilePageSetup", GTK_STOCK_PAGE_SETUP, N_("Page Set_up..."), NULL,
-	  N_("Set up the page settings"), G_CALLBACK (_gedit_cmd_file_page_setup) },
-#endif
 	{ "FilePrintPreview", GTK_STOCK_PRINT_PREVIEW, N_("Print Previe_w"),"<control><shift>P",
 	  N_("Print preview"), G_CALLBACK (_gedit_cmd_file_print_preview) },
 	 { "FilePrint", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 34974a5..0d43819 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -1695,30 +1695,6 @@ create_menu_bar_and_toolbar (GeditWindow *window,
 	}
 	g_free (ui_file);
 
-#if !GTK_CHECK_VERSION (2, 17, 4)
-	/* merge page setup menu manually since we cannot have conditional
-	 * sections in gedit-ui.xml */
-	{
-		guint merge_id;
-		GeditLockdownMask lockdown;
-
-		merge_id = gtk_ui_manager_new_merge_id (manager);
-		gtk_ui_manager_add_ui (manager,
-				       merge_id,
-				       "/MenuBar/FileMenu/FileOps_5",
-				       "FilePageSetupMenu",
-				       "FilePageSetup",
-				       GTK_UI_MANAGER_MENUITEM,
-				       FALSE);
-
-		lockdown = gedit_app_get_lockdown (gedit_app_get_default ());
-		action = gtk_action_group_get_action (window->priv->action_group,
-						      "FilePageSetup");
-		gtk_action_set_sensitive (action, 
-					  !(lockdown & GEDIT_LOCKDOWN_PRINT_SETUP));
-	}
-#endif
-
 	/* show tooltips in the statusbar */
 	g_signal_connect (manager,
 			  "connect_proxy",
@@ -2855,13 +2831,6 @@ _gedit_window_set_lockdown (GeditWindow       *window,
 	gtk_action_set_sensitive (action, 
 				  !(window->priv->state & GEDIT_WINDOW_STATE_PRINTING) &&
 				  !(lockdown & GEDIT_LOCKDOWN_SAVE_TO_DISK));
-
-#if !GTK_CHECK_VERSION (2, 17, 4)
-	action = gtk_action_group_get_action (window->priv->action_group,
-				              "FilePageSetup");
-	gtk_action_set_sensitive (action, 
-				  !(lockdown & GEDIT_LOCKDOWN_PRINT_SETUP));
-#endif
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]