evince r2861 - in trunk: . cut-n-paste/totem-screensaver shell



Author: carlosgc
Date: Sat Jan 26 16:31:10 2008
New Revision: 2861
URL: http://svn.gnome.org/viewvc/evince?rev=2861&view=rev

Log:
2008-01-26  Carlos Garcia Campos  <carlosgc gnome org>
	* cut-n-paste/totem-screensaver/totem-scrsaver.c:
	(screensaver_disable_x11):
	* shell/Makefile.am:
	* shell/xdg-user-dir-lookup.c: Removed
	* shell/ev-metadata-manager.c: (ev_metadata_arm_timeout):
	* shell/ev-view.c: (ev_view_presentation_transition_start):
	* shell/ev-window.c: (ev_window_cmd_file_open),
	(ev_window_cmd_save_as), (presentation_set_timeout):
	Remove #ifdefs that are no longer needed.


Removed:
   trunk/shell/xdg-user-dir-lookup.c
Modified:
   trunk/ChangeLog
   trunk/cut-n-paste/totem-screensaver/totem-scrsaver.c
   trunk/shell/Makefile.am
   trunk/shell/ev-metadata-manager.c
   trunk/shell/ev-view.c
   trunk/shell/ev-window.c

Modified: trunk/cut-n-paste/totem-screensaver/totem-scrsaver.c
==============================================================================
--- trunk/cut-n-paste/totem-screensaver/totem-scrsaver.c	(original)
+++ trunk/cut-n-paste/totem-screensaver/totem-scrsaver.c	Sat Jan 26 16:31:10 2008
@@ -294,21 +294,11 @@
 
 		if (scr->priv->timeout != 0)
 		{
-#if GLIB_CHECK_VERSION (2, 13, 0)
 			g_timeout_add_seconds (scr->priv->timeout / 2,
 					       (GSourceFunc) fake_event, scr);
-#else
-			g_timeout_add (scr->priv->timeout / 2 * 1000,
-				       (GSourceFunc) fake_event, scr);
-#endif
 		} else {
-#if GLIB_CHECK_VERSION (2, 13, 0)
 			g_timeout_add_seconds (XSCREENSAVER_MIN_TIMEOUT / 2,
 					(GSourceFunc) fake_event, scr);
-#else
-			g_timeout_add (XSCREENSAVER_MIN_TIMEOUT / 2 * 1000,
-				       (GSourceFunc) fake_event, scr);
-#endif
 		}
 
 		return;

Modified: trunk/shell/Makefile.am
==============================================================================
--- trunk/shell/Makefile.am	(original)
+++ trunk/shell/Makefile.am	Sat Jan 26 16:31:10 2008
@@ -85,9 +85,7 @@
 	ev-tooltip.h			\
 	ev-transition-animation.c	\
 	ev-transition-animation.h	\
-	main.c				\
-	xdg-user-dir-lookup.c
-
+	main.c
 
 if WITH_GNOME_PRINT
 evince_SOURCES+=			\

Modified: trunk/shell/ev-metadata-manager.c
==============================================================================
--- trunk/shell/ev-metadata-manager.c	(original)
+++ trunk/shell/ev-metadata-manager.c	Sat Jan 26 16:31:10 2008
@@ -96,21 +96,13 @@
 {
 	if (ev_metadata_manager->timeout_id)
 		return;
-#if GLIB_CHECK_VERSION (2, 13, 5)
+
 	ev_metadata_manager->timeout_id =
 		g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE,
 					    2,
 					    (GSourceFunc)ev_metadata_manager_save,
 					    NULL,
 					    NULL);
-#else
-	ev_metadata_manager->timeout_id = 
-		g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
-				    2000, /* 2 sec */
-				    (GSourceFunc)ev_metadata_manager_save,
-				    NULL,
-				    NULL);
-#endif
 }
 
 /**

Modified: trunk/shell/ev-view.c
==============================================================================
--- trunk/shell/ev-view.c	(original)
+++ trunk/shell/ev-view.c	Sat Jan 26 16:31:10 2008
@@ -4759,17 +4759,10 @@
 	duration = ev_document_transition_get_page_duration (EV_DOCUMENT_TRANSITION (view->document),
 							     view->current_page);
 	if (duration > 0) {
-#if GLIB_CHECK_VERSION (2, 13, 0)
 		view->trans_timeout_id =
 			g_timeout_add_seconds (duration,
 					       (GSourceFunc) transition_next_page,
 					       view);
-#else
-		view->trans_timeout_id =
-			g_timeout_add (duration * 1000,
-				       (GSourceFunc) transition_next_page,
-				       view);
-#endif
 	}
 }
 

Modified: trunk/shell/ev-window.c
==============================================================================
--- trunk/shell/ev-window.c	(original)
+++ trunk/shell/ev-window.c	Sat Jan 26 16:31:10 2008
@@ -91,10 +91,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#if !GLIB_CHECK_VERSION (2, 13, 3)
-char *xdg_user_dir_lookup (char *type);
-#endif
-
 typedef enum {
 	PAGE_MODE_DOCUMENT,
 	PAGE_MODE_PASSWORD
@@ -1595,20 +1591,11 @@
 		gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (chooser),
 					  window->priv->uri);
 	} else {
-#if GLIB_CHECK_VERSION (2, 13, 3)
 		const gchar *folder;
 
 		folder = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
 		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser),
 						     folder ? folder : g_get_home_dir ());
-#else
-		char *folder;
-		
-		folder = xdg_user_dir_lookup ("DOCUMENTS");
-		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser),
-						     folder);
-		free (folder);
-#endif
 	}
 	
 	g_signal_connect (chooser, "response",
@@ -2012,11 +1999,7 @@
 	GtkWidget *fc;
 	gchar *base_name;
 	GFile *file;
-#if GLIB_CHECK_VERSION (2, 13, 3)
 	const gchar *folder;
-#else
-	gchar *folder;
-#endif
 
 	fc = gtk_file_chooser_dialog_new (
 		_("Save a Copy"),
@@ -2034,15 +2017,9 @@
 	base_name = g_file_get_basename (file);
 	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc), base_name);
 	
-#if GLIB_CHECK_VERSION (2, 13, 3)
 	folder = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
 	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (fc),
 					     folder ? folder : g_get_home_dir ());
-#else
-	folder = xdg_user_dir_lookup ("DOCUMENTS");
-        gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (fc), folder);
-	free (folder);
-#endif
 	
 	g_object_unref (file);
 	g_free (base_name);
@@ -2924,15 +2901,9 @@
 		g_source_remove (window->priv->presentation_timeout_id);
 	}
 
-#if GLIB_CHECK_VERSION (2, 13, 0)
 	window->priv->presentation_timeout_id =
 		g_timeout_add_seconds (PRESENTATION_TIMEOUT,
 				       (GSourceFunc)presentation_timeout_cb, window);
-#else
-	window->priv->presentation_timeout_id = 
-	    g_timeout_add (PRESENTATION_TIMEOUT * 1000,
-			   (GSourceFunc)presentation_timeout_cb, window);
-#endif	
 
 	ev_view_show_cursor (EV_VIEW (window->priv->view));
 }



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