[gnome-network][PATCH] netinfo



Hi all,

Sometimes, when you launch a ping or traceroute or any other process, it
seems to do nothing for a while. I propose a patch to change the cursor
to GDK_WATCH when a process is running.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Carlos Garcia Campos a.k.a. KaL
   elkalmail yahoo es
   carlosgc gnome org
 Grupo Linups
   Usuarios de SL/Linux de la UPSAM
 http://www.linups.org
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=		  
PGP key: http://pgp.rediris.es:11371/pks/lookup?op=get&search=0x523E6462
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-network/gnome-netinfo/ChangeLog,v
retrieving revision 1.102
diff -u -u -r1.102 ChangeLog
--- ChangeLog	5 Dec 2003 02:27:22 -0000	1.102
+++ ChangeLog	9 Dec 2003 13:27:54 -0000
@@ -1,3 +1,9 @@
+2003-12-09  Carlos García Campos <carlosgc gnome org>
+
+	* info.c (get_nic_information): removed invalid g_free()
+	* netinfo.c (toggle_state): change the cursor to GDK_WATCH when 
+	a process is running
+	  
 2003-12-01  Bastien Nocera  <hadess hadess net>
                                                                                 
 	* main.c: (load_whois_widgets_from_xml): we don't have a "user"
Index: info.c
===================================================================
RCS file: /cvs/gnome/gnome-network/gnome-netinfo/info.c,v
retrieving revision 1.19
diff -u -u -r1.19 info.c
--- info.c	20 Nov 2003 21:12:42 -0000	1.19
+++ info.c	9 Dec 2003 13:27:55 -0000
@@ -306,7 +306,6 @@
 			break;
 		}
 	}
-	g_free (ifr);
 }
 
 static GList *
Index: netinfo.c
===================================================================
RCS file: /cvs/gnome/gnome-network/gnome-netinfo/netinfo.c,v
retrieving revision 1.17
diff -u -u -r1.17 netinfo.c
--- netinfo.c	20 Nov 2003 21:12:43 -0000	1.17
+++ netinfo.c	9 Dec 2003 13:27:55 -0000
@@ -164,7 +164,7 @@
 netinfo_process_command (Netinfo * netinfo)
 {
 	g_return_if_fail (netinfo != NULL);
-
+	
 	netinfo_toggle_state (netinfo, INACTIVE, NULL);
 
 	netinfo_text_buffer_insert (netinfo);
@@ -174,7 +174,7 @@
 netinfo_text_buffer_insert (Netinfo * netinfo)
 {
 	gchar *dir = g_get_current_dir ();
-	gint child_pid, pout, perr;
+	gint child_pid, pout/*, perr*/;
 	GIOChannel *channel;
 	GError *err = NULL;
 
@@ -306,6 +306,8 @@
 netinfo_toggle_state (Netinfo * netinfo, gboolean state,
 		      gpointer user_data)
 {
+	GdkCursor *cursor;
+	
 	g_assert (netinfo != NULL);
 	g_return_if_fail (netinfo != NULL);
 
@@ -315,8 +317,14 @@
 	}
 
 	if (state) {
+		gdk_window_set_cursor ((netinfo->main_window)->window, NULL);
 		netinfo->child_pid = 0;
+	} else {
+		cursor = gdk_cursor_new (GDK_WATCH);
+		gdk_window_set_cursor ((netinfo->main_window)->window, cursor);
+		gdk_cursor_unref (cursor);
 	}
+	
 	netinfo->running = !state;
 
 	netinfo_toggle_button (netinfo);
Index: ping.c
===================================================================
RCS file: /cvs/gnome/gnome-network/gnome-netinfo/ping.c,v
retrieving revision 1.22
diff -u -u -r1.22 ping.c
--- ping.c	20 Nov 2003 21:12:43 -0000	1.22
+++ ping.c	9 Dec 2003 13:27:55 -0000
@@ -344,7 +344,7 @@
 	if (count != 5 && count != 6) {
 
 	}
-	/*printf ("DBG: bytes: %d, ip: %s, icmp_seq: %d\n", data->bytes, data->ip, data->icmp_seq);*/
+
 	return count;
 }
 

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



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