mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
plug-ins/script-fu/script-fu-interface.[ch] applied a modified patch from
2006-06-06 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/script-fu-interface.[ch] * plug-ins/script-fu/script-fu.c (script_fu_refresh_proc): applied a modified patch from Kevin Cozens. Fixes bug #330981.
This commit is contained in:
parent
540eee2e12
commit
aafaa7def1
|
@ -1,3 +1,9 @@
|
|||
2006-06-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/script-fu-interface.[ch]
|
||||
* plug-ins/script-fu/script-fu.c (script_fu_refresh_proc): applied
|
||||
a modified patch from Kevin Cozens. Fixes bug #330981.
|
||||
|
||||
2006-06-06 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/decompose.c: applied a modified patch from
|
||||
|
|
|
@ -121,8 +121,14 @@ static SFInterface *sf_interface = NULL; /* there can only be at most one
|
|||
* Function definitions
|
||||
*/
|
||||
|
||||
gboolean
|
||||
script_fu_interface_is_active (void)
|
||||
{
|
||||
return (sf_interface != NULL);
|
||||
}
|
||||
|
||||
void
|
||||
script_fu_interface_report_cc (gchar *command)
|
||||
script_fu_interface_report_cc (const gchar *command)
|
||||
{
|
||||
if (sf_interface == NULL)
|
||||
return;
|
||||
|
@ -137,13 +143,14 @@ 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);
|
||||
new_command);
|
||||
g_free (new_command);
|
||||
}
|
||||
else
|
||||
{
|
||||
sf_interface->command_count = 1;
|
||||
gtk_label_set_text (GTK_LABEL (sf_interface->progress_label), command);
|
||||
|
||||
g_free (sf_interface->last_command);
|
||||
sf_interface->last_command = g_strdup (command);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
#define __SCRIPT_FU_INTERFACE_H__
|
||||
|
||||
|
||||
void script_fu_interface (SFScript *script);
|
||||
void script_fu_interface_report_cc (gchar *command);
|
||||
void script_fu_interface (SFScript *script);
|
||||
void script_fu_interface_report_cc (const gchar *command);
|
||||
gboolean script_fu_interface_is_active (void);
|
||||
|
||||
|
||||
#endif /* __SCRIPT_FU_INTERFACE_H__ */
|
||||
|
|
|
@ -21,15 +21,20 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "siod/siod.h"
|
||||
|
||||
#include "siod-wrapper.h"
|
||||
#include "script-fu-types.h"
|
||||
|
||||
#include "script-fu-console.h"
|
||||
#include "script-fu-interface.h"
|
||||
#include "script-fu-scripts.h"
|
||||
#include "script-fu-server.h"
|
||||
#include "script-fu-text-console.h"
|
||||
|
||||
#include "siod-wrapper.h"
|
||||
|
||||
#include "script-fu-intl.h"
|
||||
|
||||
|
||||
|
@ -317,10 +322,23 @@ script_fu_refresh_proc (const gchar *name,
|
|||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpPDBStatusType status;
|
||||
|
||||
/* Reload all of the available scripts */
|
||||
script_fu_find_scripts ();
|
||||
if (script_fu_interface_is_active ())
|
||||
{
|
||||
g_message (_("You can not use \"Refresh Scripts\" while a "
|
||||
"Script-Fu dialog box is open. Please close "
|
||||
"all Script-Fu windows and try again."));
|
||||
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reload all of the available scripts */
|
||||
script_fu_find_scripts ();
|
||||
|
||||
status = GIMP_PDB_SUCCESS;
|
||||
}
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
|
Loading…
Reference in a new issue