Commit 27db6b86 authored by Sven Neumann's avatar Sven Neumann
Browse files

got rid of an old gtk-bug workaround that surely has never worked as it should


--Sven
parent 3f76f2bc
Sun Jan 9 23:47:35 CET 2000 Sven Neumann <sven@gimp.org>
* 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 <sven@gimp.org> Sun Jan 9 19:59:38 CET 2000 Sven Neumann <sven@gimp.org>
   
* app/gdisplay.c * app/gdisplay.c
......
...@@ -169,7 +169,7 @@ script_fu_console_run (char *name, ...@@ -169,7 +169,7 @@ script_fu_console_run (char *name,
} }
static void static void
script_fu_console_interface () script_fu_console_interface (void)
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *button; GtkWidget *button;
...@@ -344,37 +344,42 @@ script_fu_close_callback (GtkWidget *widget, ...@@ -344,37 +344,42 @@ script_fu_close_callback (GtkWidget *widget,
gtk_main_quit (); gtk_main_quit ();
} }
void apply_callback( gchar *proc_name, void
gchar *scheme_proc_name, apply_callback (gchar *proc_name,
gchar *proc_blurb, gchar *scheme_proc_name,
gchar *proc_help, gchar *proc_blurb,
gchar *proc_author, gchar *proc_help,
gchar *proc_copyright, gchar *proc_author,
gchar *proc_date, gchar *proc_copyright,
int proc_type, gchar *proc_date,
int nparams, int proc_type,
int nreturn_vals, int nparams,
GParamDef *params, int nreturn_vals,
GParamDef *return_vals ) GParamDef *params,
GParamDef *return_vals )
{ {
gint i; gint i;
GString *text;
if (proc_name==NULL) return; if (proc_name == NULL)
gtk_widget_hide(cint.cc); return;
gtk_entry_set_text( GTK_ENTRY(cint.cc), "(" );
gtk_entry_append_text( GTK_ENTRY(cint.cc), scheme_proc_name ); text = g_string_new ("(");
if ((nparams==0) || (params==NULL)) return; text = g_string_append (text, scheme_proc_name);
for (i=0;i<nparams;i++) { for (i=0; i<nparams; i++)
gtk_entry_append_text( GTK_ENTRY(cint.cc), " " ); {
gtk_entry_append_text( GTK_ENTRY(cint.cc), params[i].name); text = g_string_append_c (text, ' ');
} text = g_string_append (text, params[i].name);
gtk_entry_append_text( GTK_ENTRY(cint.cc), ")" ); }
gtk_widget_show(cint.cc); text = g_string_append_c (text, ')');
gtk_entry_set_text (GTK_ENTRY (cint.cc), text->str);
g_string_free (text, TRUE);
} }
static void static void
script_fu_browse_callback(GtkWidget *widget, script_fu_browse_callback (GtkWidget *widget,
gpointer data) gpointer data)
{ {
gtk_quit_add_destroy (1, (GtkObject*) gimp_db_browser (apply_callback)); gtk_quit_add_destroy (1, (GtkObject*) gimp_db_browser (apply_callback));
} }
...@@ -430,7 +435,7 @@ script_fu_siod_read (gpointer data, ...@@ -430,7 +435,7 @@ script_fu_siod_read (gpointer data,
} }
static gint static gint
script_fu_cc_is_empty () script_fu_cc_is_empty (void)
{ {
char *str; char *str;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment