gimp r25910 - in trunk: . plug-ins/help
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25910 - in trunk: . plug-ins/help
- Date: Tue, 10 Jun 2008 10:25:56 +0000 (UTC)
Author: neo
Date: Tue Jun 10 10:25:56 2008
New Revision: 25910
URL: http://svn.gnome.org/viewvc/gimp?rev=25910&view=rev
Log:
2008-06-10 Sven Neumann <sven gimp org>
* plug-ins/help/help.c (load_help_idle): show progress while
loading the help index.
Modified:
trunk/ChangeLog
trunk/plug-ins/help/help.c
Modified: trunk/plug-ins/help/help.c
==============================================================================
--- trunk/plug-ins/help/help.c (original)
+++ trunk/plug-ins/help/help.c Tue Jun 10 10:25:56 2008
@@ -71,6 +71,8 @@
const gchar *help_id);
static gboolean load_help_idle (gpointer data);
+static GimpHelpProgress * load_help_progress_new (void);
+
/* local variables */
@@ -263,13 +265,14 @@
if (domain)
{
- GList *locales;
- gchar *full_uri;
- gboolean fatal_error;
+ GimpHelpProgress *progress = load_help_progress_new ();
+ GList *locales;
+ gchar *full_uri;
+ gboolean fatal_error;
locales = gimp_help_parse_locales (idle_help->help_locales);
full_uri = gimp_help_domain_map (domain, locales, idle_help->help_id,
- NULL, NULL, &fatal_error);
+ progress, NULL, &fatal_error);
g_list_foreach (locales, (GFunc) g_free, NULL);
g_list_free (locales);
@@ -297,6 +300,8 @@
{
g_main_loop_quit (main_loop);
}
+
+ gimp_help_progress_free (progress);
}
g_free (idle_help->procedure);
@@ -308,3 +313,37 @@
return FALSE;
}
+
+static void
+load_help_progress_start (const gchar *message,
+ gboolean cancelable,
+ gpointer user_data)
+{
+ gimp_progress_init (message);
+}
+
+static void
+load_help_progress_update (gdouble value,
+ gpointer user_data)
+{
+ gimp_progress_update (value);
+}
+
+static void
+load_help_progress_end (gpointer user_data)
+{
+ gimp_progress_end ();
+}
+
+static GimpHelpProgress *
+load_help_progress_new (void)
+{
+ static const GimpHelpProgressVTable vtable =
+ {
+ load_help_progress_start,
+ load_help_progress_end,
+ load_help_progress_update
+ };
+
+ return gimp_help_progress_new (&vtable, NULL);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]