added "display_ID" to gimp_new_progress().

2004-08-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-gui.[ch]: added "display_ID" to gimp_new_progress().

	* app/gui/gui-vtable.c: changed accordingly.

	* app/plug-in/plug-in-progress.[ch]: reenabled showing the
	progress in a particular display.
This commit is contained in:
Michael Natterer 2004-08-11 09:36:51 +00:00 committed by Michael Natterer
parent 4671054c08
commit ca30f73817
8 changed files with 36 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2004-08-11 Michael Natterer <mitch@gimp.org>
* app/core/gimp-gui.[ch]: added "display_ID" to gimp_new_progress().
* app/gui/gui-vtable.c: changed accordingly.
* app/plug-in/plug-in-progress.[ch]: reenabled showing the
progress in a particular display.
2004-08-11 Michael Natterer <mitch@gimp.org>
* etc/controllerrc: added a commented-out midi controller entry

View File

@ -319,12 +319,13 @@ gimp_menus_delete_entry (Gimp *gimp,
}
GimpProgress *
gimp_new_progress (Gimp *gimp)
gimp_new_progress (Gimp *gimp,
gint display_ID)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
if (gimp->gui.progress_new)
return gimp->gui.progress_new (gimp);
return gimp->gui.progress_new (gimp, display_ID);
return NULL;
}

View File

@ -62,7 +62,8 @@ struct _GimpGui
void (* menus_delete) (Gimp *gimp,
PlugInProcDef *proc_def);
GimpProgress * (* progress_new) (Gimp *gimp);
GimpProgress * (* progress_new) (Gimp *gimp,
gint display_ID);
void (* progress_free) (Gimp *gimp,
GimpProgress *progress);
@ -123,7 +124,8 @@ void gimp_menus_create_entry (Gimp *gimp,
void gimp_menus_delete_entry (Gimp *gimp,
PlugInProcDef *proc_def);
GimpProgress * gimp_new_progress (Gimp *gimp);
GimpProgress * gimp_new_progress (Gimp *gimp,
gint display_ID);
void gimp_free_progress (Gimp *gimp,
GimpProgress *progress);

View File

@ -107,7 +107,8 @@ static void gui_menus_create_entry (Gimp *gimp,
PlugInProcDef *proc_def);
static void gui_menus_delete_entry (Gimp *gimp,
PlugInProcDef *proc_def);
static GimpProgress * gui_new_progress (Gimp *gimp);
static GimpProgress * gui_new_progress (Gimp *gimp,
gint display_ID);
static void gui_free_progress (Gimp *gimp,
GimpProgress *progress);
static gboolean gui_pdb_dialog_new (Gimp *gimp,
@ -397,8 +398,17 @@ gui_menus_delete_entry (Gimp *gimp,
}
static GimpProgress *
gui_new_progress (Gimp *gimp)
gui_new_progress (Gimp *gimp,
gint display_ID)
{
GimpDisplay *display = NULL;
if (display_ID > 0)
display = gimp_display_get_by_ID (gimp, display_ID);
if (display)
return GIMP_PROGRESS (display);
return GIMP_PROGRESS (gimp_progress_dialog_new ());
}
@ -408,7 +418,8 @@ gui_free_progress (Gimp *gimp,
{
g_return_if_fail (GIMP_IS_PROGRESS_DIALOG (progress));
gtk_widget_destroy (GTK_WIDGET (progress));
if (GIMP_IS_PROGRESS_DIALOG (progress))
gtk_widget_destroy (GTK_WIDGET (progress));
}
static gboolean

View File

@ -42,7 +42,7 @@ static void plug_in_progress_cancel (GimpProgress *progress,
void
plug_in_progress_start (PlugIn *plug_in,
const gchar *message,
gint gdisp_ID)
gint display_ID)
{
g_return_if_fail (plug_in != NULL);
@ -51,7 +51,7 @@ plug_in_progress_start (PlugIn *plug_in,
if (! plug_in->progress)
{
plug_in->progress = gimp_new_progress (plug_in->gimp);
plug_in->progress = gimp_new_progress (plug_in->gimp, display_ID);
if (plug_in->progress)
plug_in->progress_created = TRUE;

View File

@ -22,7 +22,7 @@
void plug_in_progress_start (PlugIn *plug_in,
const gchar *message,
gint gdisp_ID);
gint display_ID);
void plug_in_progress_update (PlugIn *plug_in,
gdouble percentage);
void plug_in_progress_end (PlugIn *plug_in);

View File

@ -42,7 +42,7 @@ static void plug_in_progress_cancel (GimpProgress *progress,
void
plug_in_progress_start (PlugIn *plug_in,
const gchar *message,
gint gdisp_ID)
gint display_ID)
{
g_return_if_fail (plug_in != NULL);
@ -51,7 +51,7 @@ plug_in_progress_start (PlugIn *plug_in,
if (! plug_in->progress)
{
plug_in->progress = gimp_new_progress (plug_in->gimp);
plug_in->progress = gimp_new_progress (plug_in->gimp, display_ID);
if (plug_in->progress)
plug_in->progress_created = TRUE;

View File

@ -22,7 +22,7 @@
void plug_in_progress_start (PlugIn *plug_in,
const gchar *message,
gint gdisp_ID);
gint display_ID);
void plug_in_progress_update (PlugIn *plug_in,
gdouble percentage);
void plug_in_progress_end (PlugIn *plug_in);