On Wed, Sep 29, 2004 at 04:15:46PM +0200, Sven Neumann wrote:

> You should show us your code if you want us to help you.

what is the policy towards attachments on this list? If allowed I'll attach
the file, for now I'll list my changes:

-- in gimpcropoptions.h added a gboolean to the struct:

struct _GimpCropOptions
{
  GimpToolOptions  parent_instence;

  gboolean         layer_only;
  gboolean         allow_enlarge;
  gboolean         keep_aspect;
  GimpCropMode     crop_mode;
  gboolean         blank_outer_region;
};

-- in gimpcropoptions.c added a number to the enum:

enum
{
  PROP_0,
  PROP_LAYER_ONLY,
  PROP_ALLOW_ENLARGE,
  PROP_KEEP_ASPECT,
  PROP_CROP_MODE,
  PROP_BLANK_OUTER_REGION
};

-- added to gimp_crop_options_class_init (GimpCropOptionsClass *klass):

  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_BLANK_OUTER_REGION,
                                    "blank-outer-region", NULL,
                                    FALSE,
                                    0);

-- added to gimp_crop_options_set_property:

     case PROP_BLANK_OUTER_REGION:
      options->blank_outer_region = g_value_get_enum (value);
      break;

-- added to gimp_crop_options_get_property:

    case PROP_BLANK_OUTER_REGION:
      g_value_set_enum (value, options->blank_outer_region);
      break;

-- added to gimp_crop_options_gui:

  /* blank outer region */
  button = gimp_prop_check_button_new (config, "blank-outer-region",
_("Blank outer region"));
  gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
  gtk_widget_show (button);

(b.t.w: there is a memory leak in this function, the last string 'str' is
not freed, but I'll include that in my patch whenever it is working)

so what is missing now?

thanks,
        Olivier

_______________________________________________
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Reply via email to