changeset 775:c1144630c4f4

2006-7-19 Brian Masney <masneyb@gftp.org> * src/gtk/gtkui.c src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpui.h - change the cursor to a busy cursor when the protocol functions are used (from Scott Reeves <sreeves@novell.com>) (closes #305927)
author masneyb
date Thu, 20 Jul 2006 02:24:50 +0000
parents 2adc6b8b3197
children 26d6b4b53345
files ChangeLog src/gtk/gtkui.c src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpui.h
diffstat 5 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jul 20 02:20:49 2006 +0000
+++ b/ChangeLog	Thu Jul 20 02:24:50 2006 +0000
@@ -1,4 +1,9 @@
 2006-7-19 Brian Masney <masneyb@gftp.org>
+	* src/gtk/gtkui.c src/text/textui.c src/uicommon/gftpui.c
+	src/uicommon/gftpui.h - change the cursor to a busy cursor when 
+	the protocol functions are used (from Scott Reeves <sreeves@novell.com>)
+	(closes #305927)
+
 	* src/uicommon/gftpui.c - make sure the directories have the proper
 	permissions when "preserve file permissions" is enabled
 	(from Aurelien Jarno <aurelien@aurel32.net>) (closes #312722)
@@ -3436,7 +3441,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.446 2006/07/20 02:20:48 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.447 2006/07/20 02:24:48 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/src/gtk/gtkui.c	Thu Jul 20 02:20:49 2006 +0000
+++ b/src/gtk/gtkui.c	Thu Jul 20 02:24:50 2006 +0000
@@ -89,6 +89,20 @@
   request->stopable = 0;
 }
 
+void
+gftpui_show_busy (gboolean busy)
+{
+  GtkWidget * toplevel = gtk_widget_get_toplevel (openurl_btn);
+  GdkDisplay * display = gtk_widget_get_display (toplevel);
+
+  GdkCursor * busyCursor = 
+    (busy) ? (gdk_cursor_new_for_display (display, GDK_WATCH)) : NULL;
+
+  gdk_window_set_cursor (toplevel->window, busyCursor);
+
+  if (busy)
+    gdk_cursor_unref (busyCursor);
+}
 
 void
 gftpui_prompt_username (void *uidata, gftp_request * request)
--- a/src/text/textui.c	Thu Jul 20 02:20:49 2006 +0000
+++ b/src/text/textui.c	Thu Jul 20 02:24:50 2006 +0000
@@ -64,6 +64,11 @@
   return (1);
 }
 
+void
+gftpui_show_busy (gboolean busy)
+{
+  /* do nothing for text based */
+}
 
 void
 gftpui_prompt_username (void *uidata, gftp_request * request)
--- a/src/uicommon/gftpui.c	Thu Jul 20 02:20:49 2006 +0000
+++ b/src/uicommon/gftpui.c	Thu Jul 20 02:24:50 2006 +0000
@@ -682,7 +682,9 @@
   cdata->retries = retries;
   cdata->dont_check_connection = 1;
 
+  gftpui_show_busy (TRUE);
   gftpui_common_run_callback_function (cdata);
+  gftpui_show_busy (FALSE);
 
   g_free (cdata);
 
--- a/src/uicommon/gftpui.h	Thu Jul 20 02:20:49 2006 +0000
+++ b/src/uicommon/gftpui.h	Thu Jul 20 02:24:50 2006 +0000
@@ -167,6 +167,8 @@
 void *gftpui_generic_thread 		( void *(*run_function)(void *data),
 					  void *data);
 
+void gftpui_show_busy           (gboolean busy);
+
 void gftpui_prompt_username		( void *uidata,
 					  gftp_request * request );