From 27db6b86363b9e7260992c82803662ce4f5bc946 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sun, 9 Jan 2000 21:19:46 +0000 Subject: [PATCH] got rid of an old gtk-bug workaround that surely has never worked as it should --Sven --- ChangeLog | 5 +++ plug-ins/script-fu/script-fu-console.c | 59 ++++++++++++++------------ 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3d9e768c6..1789cfe259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jan 9 23:47:35 CET 2000 Sven Neumann + + * plug-ins/script-fu/script-fu-console.c: fixed a problem that + occured when applying a command with no parameters from the dbbrowser + Sun Jan 9 19:59:38 CET 2000 Sven Neumann * app/gdisplay.c diff --git a/plug-ins/script-fu/script-fu-console.c b/plug-ins/script-fu/script-fu-console.c index 657e64a3bc..77a4f7965e 100644 --- a/plug-ins/script-fu/script-fu-console.c +++ b/plug-ins/script-fu/script-fu-console.c @@ -169,7 +169,7 @@ script_fu_console_run (char *name, } static void -script_fu_console_interface () +script_fu_console_interface (void) { GtkWidget *dlg; GtkWidget *button; @@ -344,37 +344,42 @@ script_fu_close_callback (GtkWidget *widget, gtk_main_quit (); } -void apply_callback( gchar *proc_name, - gchar *scheme_proc_name, - gchar *proc_blurb, - gchar *proc_help, - gchar *proc_author, - gchar *proc_copyright, - gchar *proc_date, - int proc_type, - int nparams, - int nreturn_vals, - GParamDef *params, - GParamDef *return_vals ) +void +apply_callback (gchar *proc_name, + gchar *scheme_proc_name, + gchar *proc_blurb, + gchar *proc_help, + gchar *proc_author, + gchar *proc_copyright, + gchar *proc_date, + int proc_type, + int nparams, + int nreturn_vals, + GParamDef *params, + GParamDef *return_vals ) { gint i; + GString *text; - if (proc_name==NULL) return; - gtk_widget_hide(cint.cc); - gtk_entry_set_text( GTK_ENTRY(cint.cc), "(" ); - gtk_entry_append_text( GTK_ENTRY(cint.cc), scheme_proc_name ); - if ((nparams==0) || (params==NULL)) return; - for (i=0;istr); + g_string_free (text, TRUE); } static void -script_fu_browse_callback(GtkWidget *widget, - gpointer data) +script_fu_browse_callback (GtkWidget *widget, + gpointer data) { gtk_quit_add_destroy (1, (GtkObject*) gimp_db_browser (apply_callback)); } @@ -430,7 +435,7 @@ script_fu_siod_read (gpointer data, } static gint -script_fu_cc_is_empty () +script_fu_cc_is_empty (void) { char *str;