File gftp-show-busy-cursor.patch of Package gftp
Index: src/gtk/gtkui.c
===================================================================
RCS file: /cvs/gnome/gftp/src/gtk/gtkui.c,v
retrieving revision 1.23
diff -u -p -r1.23 gtkui.c
--- src/gtk/gtkui.c 26 Jan 2005 03:22:05 -0000 1.23
+++ src/gtk/gtkui.c 10 Jun 2005 17:21:47 -0000
@@ -89,6 +89,20 @@ _gftpui_gtk_abort (gftp_request * reques
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)
Index: src/text/textui.c
===================================================================
RCS file: /cvs/gnome/gftp/src/text/textui.c,v
retrieving revision 1.13
diff -u -p -r1.13 textui.c
--- src/text/textui.c 28 Jul 2004 02:47:24 -0000 1.13
+++ src/text/textui.c 10 Jun 2005 17:21:47 -0000
@@ -64,6 +64,11 @@ gftpui_check_reconnect (gftpui_callback_
return (1);
}
+void
+gftpui_show_busy (gboolean busy)
+{
+ /* do nothing for text based */
+}
void
gftpui_prompt_username (void *uidata, gftp_request * request)
Index: src/uicommon/gftpui.c
===================================================================
RCS file: /cvs/gnome/gftp/src/uicommon/gftpui.c,v
retrieving revision 1.36
diff -u -p -r1.36 gftpui.c
--- src/uicommon/gftpui.c 25 Jan 2005 02:34:19 -0000 1.36
+++ src/uicommon/gftpui.c 10 Jun 2005 17:21:48 -0000
@@ -682,7 +682,9 @@ gftpui_common_cmd_open (void *uidata, gf
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);
Index: src/uicommon/gftpui.h
===================================================================
RCS file: /cvs/gnome/gftp/src/uicommon/gftpui.h,v
retrieving revision 1.17
diff -u -p -r1.17 gftpui.h
--- src/uicommon/gftpui.h 2 Dec 2004 23:19:31 -0000 1.17
+++ src/uicommon/gftpui.h 10 Jun 2005 17:21:48 -0000
@@ -167,6 +167,8 @@ void gftpui_refresh ( void *uidata,
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 );