Author: post
Date: 2011-03-08 19:55:41 +0100 (Tue, 08 Mar 2011)
New Revision: 3850

Modified:
   trunk/librawstudio/rs-lens-db-editor.c
Log:
Display busy cursor while updating lensfun db.

Modified: trunk/librawstudio/rs-lens-db-editor.c
===================================================================
--- trunk/librawstudio/rs-lens-db-editor.c      2011-03-06 21:25:35 UTC (rev 
3849)
+++ trunk/librawstudio/rs-lens-db-editor.c      2011-03-08 18:55:41 UTC (rev 
3850)
@@ -491,7 +491,12 @@
 void
 update_lensfun(GtkButton *button, gpointer user_data)
 {
+       GtkWidget *window = GTK_WIDGET(user_data);
+       GdkCursor* cursor = gdk_cursor_new(GDK_WATCH);
+       gdk_window_set_cursor(window->window, cursor);
+       GTK_CATCHUP();
        gchar *error = rs_lens_db_editor_update_lensfun();
+       gdk_window_set_cursor(window->window, NULL);
        GtkWidget *dialog = NULL;
 
        if (error)
@@ -643,7 +648,7 @@
         gtk_box_pack_start (GTK_BOX (GTK_DIALOG(editor)->vbox), frame, TRUE, 
TRUE, 0);
 
        GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update 
lensfun database"));
-       g_signal_connect(button_update_lensfun, "clicked", 
G_CALLBACK(update_lensfun), NULL);
+       g_signal_connect(button_update_lensfun, "clicked", 
G_CALLBACK(update_lensfun), editor);
        gtk_dialog_add_action_widget (GTK_DIALOG (editor), 
button_update_lensfun, GTK_RESPONSE_NONE);
 
         GtkWidget *button_close = gtk_button_new_from_stock(GTK_STOCK_CLOSE);


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to