RSS/Atom feed Twitter
Site is read-only, email is disabled

problem with gimp progress bar

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

8 of 8 messages available
Toggle history

Please log in to manage your subscriptions.

problem with gimp progress bar coolhand 12 Apr 12:42
  problem with gimp progress bar Sven Neumann 12 Apr 20:33
   problem with gimp progress bar coolhand 13 Apr 10:34
    problem with gimp progress bar gg@catking.net 13 Apr 12:00
     problem with gimp progress bar coolhand 13 Apr 12:05
      problem with gimp progress bar gg@catking.net 13 Apr 13:09
    problem with gimp progress bar Sven Neumann 16 Apr 08:48
     problem with gimp progress bar coolhand 16 Apr 11:41
coolhand
2007-04-12 12:42:59 UTC (over 17 years ago)

problem with gimp progress bar

I use in a gimp dialog a progress bar. The problem is that when the progress bar reaches 100%, don't disapear (only when the dialog closes). ¿There are some way to do this before the end of the plugin?

I use gimp_progress_init() and gimp_progress_update(), so i don't have any progress callback to terminate it.

Sven Neumann
2007-04-12 20:33:44 UTC (over 17 years ago)

problem with gimp progress bar

Hi,

On Thu, 2007-04-12 at 03:42 -0700, coolhand wrote:

I use in a gimp dialog a progress bar. The problem is that when the progress bar reaches 100%, don't disapear (only when the dialog closes). ¿There are some way to do this before the end of the plugin?

gtk_widget_hide() doesn't do the trick?

Anyway, it's not considered good style to hide and show widgets. Perhaps you could explain us what exactly you want to achieve?

Sven

coolhand
2007-04-13 10:34:24 UTC (over 17 years ago)

problem with gimp progress bar

gtk_widget_hide() doesn't do the trick?

Oh! i didn't think on it...

Anyway, it's not considered good style to hide and show widgets. Perhaps you could explain us what exactly you want to achieve?

Sven

Yes; sorry by my bad english: when a progress bar is associated with a plugin, it don't dissapear until the plugin finish. I need to close/hide the progress bar before the plugin ends its execution. This plugin shows a dialog, then the progress bar appears while some files are loaded and proccessed, and then we can to start to work on the dialog, but the 100% progress bar window still be here and never ends until the plugin ends. If you move the dialog to see the image, you have to move the progress bar window too. Hiding it avoids the problem ;)

Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
gg@catking.net
2007-04-13 12:00:28 UTC (over 17 years ago)

problem with gimp progress bar

On Fri, 13 Apr 2007 10:34:24 +0200, coolhand wrote:

gtk_widget_hide() doesn't do the trick?

Oh! i didn't think on it...

Anyway, it's not considered good style to hide and show widgets. Perhaps you could explain us what exactly you want to achieve?

Sven

Yes; sorry by my bad english: when a progress bar is associated with a plugin, it don't dissapear until the plugin finish. I need to close/hide the
progress bar before the plugin ends its execution. This plugin shows a dialog, then the progress bar appears while some files are loaded and proccessed, and then we can to start to work on the dialog, but the 100% progress bar window still be here and never ends until the plugin ends. If
you move the dialog to see the image, you have to move the progress bar window too. Hiding it avoids the problem ;)

coolhand
2007-04-13 12:05:22 UTC (over 17 years ago)

problem with gimp progress bar

Why do you expect the dialogue to disappear on its own just because you set it's position to 100% ? This may be what is required in a general context and it would be wrong for it to disappear automatically.

Is there are in gimp two functions to get a progress bar working from/associate to a plugin:
gimp_progress_bar_init
gimp_progress_bar_update.

This functions avoid all the stuff of create a dialog, put inside a progress bar, create a callback, etc. but there are not a gimp_progress_bar_close / gimp_progress_bar_finish or else to close that, and i don't know how hide it because i haven't idea about get the widget pointer of this dialog. This is my problem.

gg@catking.net
2007-04-13 13:09:16 UTC (over 17 years ago)

problem with gimp progress bar

On Fri, 13 Apr 2007 12:05:22 +0200, coolhand wrote:

gimp_progress_bar_init

you should find something useful in this lot:

grep -R gimp_progress_bar libg*

libgimp/gimpui.def: gimp_progress_bar_get_type libgimp/gimpui.def: gimp_progress_bar_new libgimp/gimpprogressbar.c:static void gimp_progress_bar_destroy (GtkObject *object);
libgimp/gimpprogressbar.c:static void gimp_progress_bar_start (const gchar *message,
libgimp/gimpprogressbar.c:static void gimp_progress_bar_end (gpointer user_data);
libgimp/gimpprogressbar.c:static void gimp_progress_bar_set_text (const gchar *message,
libgimp/gimpprogressbar.c:static void gimp_progress_bar_set_value (gdouble percentage,
libgimp/gimpprogressbar.c:static void gimp_progress_bar_pulse (gpointer user_data);
libgimp/gimpprogressbar.c:static guint32 gimp_progress_bar_get_window (gpointer user_data);
libgimp/gimpprogressbar.c:G_DEFINE_TYPE (GimpProgressBar, gimp_progress_bar, GTK_TYPE_PROGRESS_BAR) libgimp/gimpprogressbar.c:#define parent_class gimp_progress_bar_parent_class
libgimp/gimpprogressbar.c:gimp_progress_bar_class_init (GimpProgressBarClass *klass)
libgimp/gimpprogressbar.c: object_class->destroy = gimp_progress_bar_destroy;
libgimp/gimpprogressbar.c:gimp_progress_bar_init (GimpProgressBar *bar) libgimp/gimpprogressbar.c: vtable.start = gimp_progress_bar_start; libgimp/gimpprogressbar.c: vtable.end = gimp_progress_bar_end; libgimp/gimpprogressbar.c: vtable.set_text = gimp_progress_bar_set_text; libgimp/gimpprogressbar.c: vtable.set_value = gimp_progress_bar_set_value;
libgimp/gimpprogressbar.c: vtable.pulse = gimp_progress_bar_pulse; libgimp/gimpprogressbar.c: vtable.get_window = gimp_progress_bar_get_window;
libgimp/gimpprogressbar.c:gimp_progress_bar_destroy (GtkObject *object) libgimp/gimpprogressbar.c:gimp_progress_bar_start (const gchar *message, libgimp/gimpprogressbar.c:gimp_progress_bar_end (gpointer user_data) libgimp/gimpprogressbar.c:gimp_progress_bar_set_text (const gchar *message, libgimp/gimpprogressbar.c:gimp_progress_bar_set_value (gdouble percentage, libgimp/gimpprogressbar.c:gimp_progress_bar_pulse (gpointer user_data) libgimp/gimpprogressbar.c:gimp_progress_bar_get_window (gpointer user_data) libgimp/gimpprogressbar.c: * gimp_progress_bar_new: libgimp/gimpprogressbar.c:gimp_progress_bar_new (void) libgimp/gimpprogressbar.h:#define GIMP_TYPE_PROGRESS_BAR (gimp_progress_bar_get_type ())
libgimp/gimpprogressbar.h:GType gimp_progress_bar_get_type (void) G_GNUC_CONST;
libgimp/gimpprogressbar.h:GtkWidget * gimp_progress_bar_new (void);

Sven Neumann
2007-04-16 08:48:53 UTC (over 17 years ago)

problem with gimp progress bar

Hi,

On Fri, 2007-04-13 at 01:34 -0700, coolhand wrote:

Yes; sorry by my bad english: when a progress bar is associated with a plugin, it don't dissapear until the plugin finish. I need to close/hide the progress bar before the plugin ends its execution. This plugin shows a dialog, then the progress bar appears while some files are loaded and proccessed, and then we can to start to work on the dialog, but the 100% progress bar window still be here and never ends until the plugin ends. If you move the dialog to see the image, you have to move the progress bar window too. Hiding it avoids the problem ;)

Oh, so you aren't using the gimp_progress_bar API as you said. Your plug-in is just using the gimp_progress calls, isn't it?

You should consider to add the progress bar to the first dialog that you present. Instead of relying on GIMP to open a dialog window for you that shows a progress bar, the progress bar can easily be embedded into the dialog. libgimp provides GimpProgressBar for that purpose:

http://developer.gimp.org/api/2.0/libgimp/GimpProgressBar.html

Just create this before you do any gimp_progress calls and place it at the bottom of the first dialog.

Sven

coolhand
2007-04-16 11:41:59 UTC (over 17 years ago)

problem with gimp progress bar

Just create this before you do any gimp_progress calls and place it at the bottom of the first dialog.

Sven

If it redirects all calls to a progress bar created by me, it "kills" my problem, so thanks!!.