mirror of https://github.com/GNOME/gimp.git
app/core/gimp-gui.[ch] app/gui/gui-vtable.c pass displays around as
2006-03-23 Michael Natterer <mitch@gimp.org> * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c * app/plug-in/plug-in-progress.[ch]: pass displays around as GimpObject, not as integer IDs. * tools/pdbgen/pdb/progress.pdb: changed accordingly. * app/pdb/progress_cmds.c * libgimp/gimpprogress_pdb.c: regenerated.
This commit is contained in:
parent
cfa086788a
commit
acdae9b354
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2006-03-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimp-gui.[ch]
|
||||
* app/gui/gui-vtable.c
|
||||
* app/plug-in/plug-in-progress.[ch]: pass displays around as
|
||||
GimpObject, not as integer IDs.
|
||||
|
||||
* tools/pdbgen/pdb/progress.pdb: changed accordingly.
|
||||
|
||||
* app/pdb/progress_cmds.c
|
||||
* libgimp/gimpprogress_pdb.c: regenerated.
|
||||
|
||||
2006-03-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* tools/pdbgen/stddefs.pdb: removed std_image_arg(),
|
||||
|
|
|
@ -346,13 +346,14 @@ gimp_menus_create_branch (Gimp *gimp,
|
|||
}
|
||||
|
||||
GimpProgress *
|
||||
gimp_new_progress (Gimp *gimp,
|
||||
gint display_ID)
|
||||
gimp_new_progress (Gimp *gimp,
|
||||
GimpObject *display)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (display == NULL || GIMP_IS_OBJECT (display), NULL);
|
||||
|
||||
if (gimp->gui.progress_new)
|
||||
return gimp->gui.progress_new (gimp, display_ID);
|
||||
return gimp->gui.progress_new (gimp, display);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ struct _GimpGui
|
|||
const gchar *menu_label);
|
||||
|
||||
GimpProgress * (* progress_new) (Gimp *gimp,
|
||||
gint display_ID);
|
||||
GimpObject *display);
|
||||
void (* progress_free) (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
@ -138,7 +138,7 @@ void gimp_menus_create_branch (Gimp *gimp,
|
|||
const gchar *menu_label);
|
||||
|
||||
GimpProgress * gimp_new_progress (Gimp *gimp,
|
||||
gint display_ID);
|
||||
GimpObject *display);
|
||||
void gimp_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ static void gui_menus_create_branch (Gimp *gimp,
|
|||
const gchar *menu_path,
|
||||
const gchar *menu_label);
|
||||
static GimpProgress * gui_new_progress (Gimp *gimp,
|
||||
gint display_ID);
|
||||
GimpObject *display);
|
||||
static void gui_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
static gboolean gui_pdb_dialog_new (Gimp *gimp,
|
||||
|
@ -549,13 +549,10 @@ gui_menus_create_branch (Gimp *gimp,
|
|||
}
|
||||
|
||||
static GimpProgress *
|
||||
gui_new_progress (Gimp *gimp,
|
||||
gint display_ID)
|
||||
gui_new_progress (Gimp *gimp,
|
||||
GimpObject *display)
|
||||
{
|
||||
GimpDisplay *display = NULL;
|
||||
|
||||
if (display_ID > 0)
|
||||
display = gimp_display_get_by_ID (gimp, display_ID);
|
||||
g_return_val_if_fail (display == NULL || GIMP_IS_DISPLAY (display), NULL);
|
||||
|
||||
if (display)
|
||||
return GIMP_PROGRESS (display);
|
||||
|
|
|
@ -60,13 +60,13 @@ progress_init_invoker (Gimp *gimp,
|
|||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *message;
|
||||
gint32 gdisplay;
|
||||
GimpObject *gdisplay;
|
||||
|
||||
message = (gchar *) args[0].value.pdb_pointer;
|
||||
if (message && !g_utf8_validate (message, -1, NULL))
|
||||
success = FALSE;
|
||||
|
||||
gdisplay = args[1].value.pdb_int;
|
||||
gdisplay = gimp_get_display_by_ID (gimp, args[1].value.pdb_int);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ static ProcArg progress_init_inargs[] =
|
|||
"Message to use in the progress dialog"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
GIMP_PDB_DISPLAY,
|
||||
"gdisplay",
|
||||
"GimpDisplay to update progressbar in, or -1 for a seperate window"
|
||||
}
|
||||
|
|
|
@ -45,17 +45,18 @@ static void plug_in_progress_cancel_callback (GimpProgress *progress,
|
|||
void
|
||||
plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID)
|
||||
GimpObject *display)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
g_return_if_fail (display == NULL || GIMP_IS_OBJECT (display));
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (! proc_frame->progress)
|
||||
{
|
||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
|
@ -148,7 +149,7 @@ plug_in_progress_set_value (PlugIn *plug_in,
|
|||
! gimp_progress_is_active (proc_frame->progress) ||
|
||||
! proc_frame->progress_cancel_id)
|
||||
{
|
||||
plug_in_progress_start (plug_in, NULL, -1);
|
||||
plug_in_progress_start (plug_in, NULL, NULL);
|
||||
}
|
||||
|
||||
if (proc_frame->progress && gimp_progress_is_active (proc_frame->progress))
|
||||
|
@ -168,7 +169,7 @@ plug_in_progress_pulse (PlugIn *plug_in)
|
|||
! gimp_progress_is_active (proc_frame->progress) ||
|
||||
! proc_frame->progress_cancel_id)
|
||||
{
|
||||
plug_in_progress_start (plug_in, NULL, -1);
|
||||
plug_in_progress_start (plug_in, NULL, NULL);
|
||||
}
|
||||
|
||||
if (proc_frame->progress && gimp_progress_is_active (proc_frame->progress))
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
void plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID);
|
||||
GimpObject *display);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message);
|
||||
|
|
|
@ -45,17 +45,18 @@ static void plug_in_progress_cancel_callback (GimpProgress *progress,
|
|||
void
|
||||
plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID)
|
||||
GimpObject *display)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
g_return_if_fail (display == NULL || GIMP_IS_OBJECT (display));
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (! proc_frame->progress)
|
||||
{
|
||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display_ID);
|
||||
proc_frame->progress = gimp_new_progress (plug_in->gimp, display);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
|
@ -148,7 +149,7 @@ plug_in_progress_set_value (PlugIn *plug_in,
|
|||
! gimp_progress_is_active (proc_frame->progress) ||
|
||||
! proc_frame->progress_cancel_id)
|
||||
{
|
||||
plug_in_progress_start (plug_in, NULL, -1);
|
||||
plug_in_progress_start (plug_in, NULL, NULL);
|
||||
}
|
||||
|
||||
if (proc_frame->progress && gimp_progress_is_active (proc_frame->progress))
|
||||
|
@ -168,7 +169,7 @@ plug_in_progress_pulse (PlugIn *plug_in)
|
|||
! gimp_progress_is_active (proc_frame->progress) ||
|
||||
! proc_frame->progress_cancel_id)
|
||||
{
|
||||
plug_in_progress_start (plug_in, NULL, -1);
|
||||
plug_in_progress_start (plug_in, NULL, NULL);
|
||||
}
|
||||
|
||||
if (proc_frame->progress && gimp_progress_is_active (proc_frame->progress))
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
void plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID);
|
||||
GimpObject *display);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message);
|
||||
|
|
|
@ -47,7 +47,7 @@ _gimp_progress_init (const gchar *message)
|
|||
return_vals = gimp_run_procedure ("gimp-progress-init",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, message,
|
||||
GIMP_PDB_INT32, gimp_default_display (),
|
||||
GIMP_PDB_DISPLAY, gimp_default_display (),
|
||||
GIMP_PDB_END);
|
||||
|
||||
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -30,7 +30,7 @@ HELP
|
|||
@inargs = (
|
||||
{ name => 'message', type => 'string', null_ok => 1, wrap => 1,
|
||||
desc => 'Message to use in the progress dialog' },
|
||||
{ name => 'gdisplay', type => 'int32',
|
||||
{ name => 'gdisplay', type => 'display', no_success => 1,
|
||||
desc => 'GimpDisplay to update progressbar in, or -1 for a seperate
|
||||
window',
|
||||
implicit_fill => 'gimp_default_display ()' }
|
||||
|
@ -42,7 +42,7 @@ HELP
|
|||
if (gimp->current_plug_in && gimp->current_plug_in->open)
|
||||
{
|
||||
if (! gimp->no_interface)
|
||||
plug_in_progress_start (gimp->current_plug_in, message, gdisplay);
|
||||
plug_in_progress_start (gimp->current_plug_in, message, gdisplay);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
Loading…
Reference in New Issue