libegg r920 - in trunk: . libegg/print-operation libegg/print-operation/modules/printbackends/cups libegg/recent-files libegg/recentchooser libegg/smclient libegg/tray



Author: pwithnall
Date: Thu Dec 11 18:50:06 2008
New Revision: 920
URL: http://svn.gnome.org/viewvc/libegg?rev=920&view=rev

Log:
2008-12-11  Philip Withnall  <philip tecnocode co uk>

	* libegg/smclient/eggdesktopfile.c 
	(set_startup_notification_timeout):
	* libegg/print-operation/modules/printbackends/cups/eggprintbackendcups.c
	(cups_get_printer_list):
	* libegg/recent-files/egg-recent-model.c
	(egg_recent_model_monitor):
	* libegg/recentchooser/eggrecentmanager.c
	(egg_recent_manager_init):
	* libegg/tray/teststatusicon.c (main): Use g_timeout_add_seconds
	where possible to allow for event grouping. Bug #564156.



Modified:
   trunk/ChangeLog
   trunk/libegg/print-operation/ChangeLog
   trunk/libegg/print-operation/modules/printbackends/cups/eggprintbackendcups.c
   trunk/libegg/recent-files/egg-recent-model.c
   trunk/libegg/recentchooser/eggrecentmanager.c
   trunk/libegg/smclient/ChangeLog
   trunk/libegg/smclient/eggdesktopfile.c
   trunk/libegg/tray/teststatusicon.c

Modified: trunk/libegg/print-operation/modules/printbackends/cups/eggprintbackendcups.c
==============================================================================
--- trunk/libegg/print-operation/modules/printbackends/cups/eggprintbackendcups.c	(original)
+++ trunk/libegg/print-operation/modules/printbackends/cups/eggprintbackendcups.c	Thu Dec 11 18:50:06 2008
@@ -953,9 +953,9 @@
   if (cups_backend->list_printers_poll == 0)
     {
       cups_request_printer_list (cups_backend);
-      cups_backend->list_printers_poll = g_timeout_add (3000,
-                                                        (GSourceFunc) cups_request_printer_list,
-                                                        print_backend);
+      cups_backend->list_printers_poll = g_timeout_add_seconds (3,
+                                                                (GSourceFunc) cups_request_printer_list,
+                                                                print_backend);
     }
  
   return result;

Modified: trunk/libegg/recent-files/egg-recent-model.c
==============================================================================
--- trunk/libegg/recent-files/egg-recent-model.c	(original)
+++ trunk/libegg/recent-files/egg-recent-model.c	Thu Dec 11 18:50:06 2008
@@ -801,8 +801,8 @@
 			if (model->priv->poll_timeout > 0)
 				g_source_remove (model->priv->poll_timeout);
 			
-			model->priv->poll_timeout = g_timeout_add (
-				EGG_RECENT_MODEL_POLL_TIME * 1000,
+			model->priv->poll_timeout = g_timeout_add_seconds (
+				EGG_RECENT_MODEL_POLL_TIME,
 				egg_recent_model_poll_timeout,
 				model);
 		}

Modified: trunk/libegg/recentchooser/eggrecentmanager.c
==============================================================================
--- trunk/libegg/recentchooser/eggrecentmanager.c	(original)
+++ trunk/libegg/recentchooser/eggrecentmanager.c	Thu Dec 11 18:50:06 2008
@@ -53,7 +53,7 @@
 #define EGG_RECENTLY_USED_FILE	".recently-used.xbel"
 
 /* a poll per second should be enough */
-#define POLL_DELTA	1000
+#define POLL_DELTA	1
 
 /* return all items by default */
 #define DEFAULT_LIMIT	-1
@@ -247,9 +247,9 @@
   
   build_recent_items_list (manager);
   
-  priv->poll_timeout = g_timeout_add (POLL_DELTA,
-  				      egg_recent_manager_poll_timeout,
-  				      manager);
+  priv->poll_timeout = g_timeout_add_seconds (POLL_DELTA,
+  					      egg_recent_manager_poll_timeout,
+  					      manager);
   
   priv->is_dirty = FALSE;
   priv->write_in_progress = FALSE;

Modified: trunk/libegg/smclient/eggdesktopfile.c
==============================================================================
--- trunk/libegg/smclient/eggdesktopfile.c	(original)
+++ trunk/libegg/smclient/eggdesktopfile.c	Thu Dec 11 18:50:06 2008
@@ -987,7 +987,7 @@
 					     NULL);
 }
 
-#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 /* seconds */ * 1000)
+#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 /* seconds */)
 
 typedef struct {
   GdkDisplay *display;
@@ -1017,8 +1017,8 @@
   sn_data->display = g_object_ref (display);
   sn_data->startup_id = g_strdup (startup_id);
 
-  g_timeout_add (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH,
-		 startup_notification_timeout, sn_data);
+  g_timeout_add_seconds (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH,
+			 startup_notification_timeout, sn_data);
 }
 #endif /* GTK 2.12 */
 

Modified: trunk/libegg/tray/teststatusicon.c
==============================================================================
--- trunk/libegg/tray/teststatusicon.c	(original)
+++ trunk/libegg/tray/teststatusicon.c	Thu Dec 11 18:50:06 2008
@@ -129,7 +129,7 @@
   g_signal_connect (icon, "activate",
 		    G_CALLBACK (icon_activated), NULL);
 
-  g_timeout_add (2000, timeout_handler, icon);
+  g_timeout_add_seconds (2, timeout_handler, icon);
 
   gtk_main ();
 



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