suppress progress popups by installing progress handlers that do nothing
2006-05-29 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/script-fu-server.c: suppress progress popups by installing progress handlers that do nothing (bug #317498). * plug-ins/script-fu/script-fu-interface.c: formatting.
This commit is contained in:

committed by
Sven Neumann

parent
6072b0991d
commit
8e39085306
@ -1,3 +1,10 @@
|
||||
2006-05-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/script-fu-server.c: suppress progress popups
|
||||
by installing progress handlers that do nothing (bug #317498).
|
||||
|
||||
* plug-ins/script-fu/script-fu-interface.c: formatting.
|
||||
|
||||
2006-05-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* tools/pdbgen/pdb/channel.pdb (channel_combine_masks): push a
|
||||
|
@ -136,7 +136,8 @@ script_fu_interface_report_cc (gchar *command)
|
||||
|
||||
new_command = g_strdup_printf ("%s <%d>",
|
||||
command, sf_interface->command_count);
|
||||
gtk_label_set_text (GTK_LABEL (sf_interface->progress_label), new_command);
|
||||
gtk_label_set_text (GTK_LABEL (sf_interface->progress_label),
|
||||
new_command);
|
||||
g_free (new_command);
|
||||
}
|
||||
else
|
||||
|
@ -334,10 +334,63 @@ script_fu_server_listen (gint timeout)
|
||||
g_hash_table_foreach_remove (clients, script_fu_server_read_fd, &fds);
|
||||
}
|
||||
|
||||
static void
|
||||
server_progress_start (const gchar *message,
|
||||
gboolean cancelable,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
static void
|
||||
server_progress_end (gpointer user_data)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
static void
|
||||
server_progress_set_text (const gchar *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
static void
|
||||
server_progress_set_value (gdouble percentage,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Suppress progress popups by installing progress handlers that do nothing.
|
||||
*/
|
||||
static const gchar *
|
||||
server_progress_install (void)
|
||||
{
|
||||
GimpProgressVtable vtable = { 0, };
|
||||
|
||||
vtable.start = server_progress_start;
|
||||
vtable.end = server_progress_end;
|
||||
vtable.set_text = server_progress_set_text;
|
||||
vtable.set_value = server_progress_set_value;
|
||||
|
||||
return gimp_progress_install_vtable (&vtable, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
server_progress_uninstall (const gchar *progress)
|
||||
{
|
||||
gimp_progress_uninstall (progress);
|
||||
}
|
||||
|
||||
static void
|
||||
server_start (gint port,
|
||||
const gchar *logfile)
|
||||
{
|
||||
const gchar *progress;
|
||||
|
||||
/* First of all, create the socket and set it up to accept connections. */
|
||||
/* This may fail if there's a server running on this port already. */
|
||||
server_sock = make_socket (port);
|
||||
@ -361,6 +414,8 @@ server_start (gint port,
|
||||
clients = g_hash_table_new_full (g_direct_hash, NULL,
|
||||
NULL, (GDestroyNotify) g_free);
|
||||
|
||||
progress = server_progress_install ();
|
||||
|
||||
server_log ("Script-fu server initialized and listening...\n");
|
||||
|
||||
/* Loop until the server is finished */
|
||||
@ -385,6 +440,8 @@ server_start (gint port,
|
||||
}
|
||||
}
|
||||
|
||||
server_progress_uninstall (progress);
|
||||
|
||||
server_quit ();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user