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

How to get if the buffer is empty or not

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.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

How to get if the buffer is empty or not Bart 18 Jan 13:31
  How to get if the buffer is empty or not David Gowers 18 Jan 14:27
  How to get if the buffer is empty or not Sven Neumann 18 Jan 16:23
  How to get if the buffer is empty or not Bart 22 Jan 13:28
Bart
2007-01-18 13:31:19 UTC (almost 18 years ago)

How to get if the buffer is empty or not

Hi,

i'm developing a script that insert the clipboard as a layer (its based on older existing scripts) and to avoid error messages to the user i'd like to check up wether the clipboard is empty or not. How to do that?
If you interested this script could bundeled with next version of Gimp. I register it to "Image/Edit/Paste as" like "Paste as brush" or "Paste as Pattern".

Thanx.

Karamba! Bart.

David Gowers
2007-01-18 14:27:28 UTC (almost 18 years ago)

How to get if the buffer is empty or not

On 1/18/07, Bart wrote:

Hi,

i'm developing a script that insert the clipboard as a layer (its based on older existing scripts) and to avoid error messages to the user i'd like to check up wether the clipboard is empty or not. How to do that?

Maybe Script-fu has a similar capability, anyway this is natural to express in Python:

try:
floating = pdb.gimp_edit_paste(image.active_layer, False) except RuntimeError:
# code that executes if gimp_edit_paste causes a runtime error goes here. I would expect this to just be the following: return

Sven Neumann
2007-01-18 16:23:16 UTC (almost 18 years ago)

How to get if the buffer is empty or not

Hi,

On Thu, 2007-01-18 at 13:31 +0100, Bart wrote:

i'm developing a script that insert the clipboard as a layer

Huh? How is that different to what Edit->Paste does?

and to avoid error messages to the user i'd like to check up wether the clipboard is empty or not. How to do that?

You can't easily do that. However the error messages are of course a bug and IIRC there's a bug report for this. Most probably even on the 2.4 milestone.

Sven

Bart
2007-01-22 13:28:42 UTC (almost 18 years ago)

How to get if the buffer is empty or not

Hi,

does anybody know how gimp-buffer-list in SCM-script work when try to get the number off buffers in a variable? I didn't get it work.

Thanx.

Karamba! Bart

> __________
Bart schrieb:

Hi,

i'm developing a script that insert the clipboard as a layer (its based on older existing scripts) and to avoid error messages to the user i'd like to check up wether the clipboard is empty or not. How to do that?
If you interested this script could bundeled with next version of Gimp. I register it to "Image/Edit/Paste as" like "Paste as brush" or "Paste as Pattern".

Thanx.

Karamba! Bart.