Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 237773 Details for
Bug 327179
media-plugins/gimp-refocus-0.9.0 - refocus images using FIR Wiener filtering
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
gimp-refocus-gimp2.6.patch (text/plain), 18.88 KB, created by
Ștefan Talpalaru
on 2010-07-06 18:00:57 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Ștefan Talpalaru
Created:
2010-07-06 18:00:57 UTC
Size:
18.88 KB
patch
obsolete
>diff -ur refocus-0.9.0/configure.in refocus-0.9.0-patched/configure.in >--- refocus-0.9.0/configure.in 2010-07-04 16:33:24.307364434 +0200 >+++ refocus-0.9.0-patched/configure.in 2010-07-04 16:34:09.679615391 +0200 >@@ -96,13 +96,6 @@ > AC_DEFINE(PREVIEW_DEBUG) > fi > >-# If we have gcc set the CFLAGS >-# This is done here because otherwise configure would use >-# these flags for compiling test-programs. >-if test "$GCC" = yes; then >- CFLAGS="-Wall -ansi -pedantic -ggdb -fomit-frame-pointer -O3 -funroll-all-loops" >-fi >- > #Check if erf is defined in the mathlibrary > AC_CHECK_LIB(m, erf, AC_DEFINE(HAVE_ERF)) > >diff -ur refocus-0.9.0/src/gimppreview.c refocus-0.9.0-patched/src/gimppreview.c >--- refocus-0.9.0/src/gimppreview.c 2010-07-04 16:33:24.310366565 +0200 >+++ refocus-0.9.0-patched/src/gimppreview.c 2010-07-04 16:42:46.016366709 +0200 >@@ -36,18 +36,18 @@ > #include "gimppreview.h" > > >-static void gimp_preview_init (GimpPreview * preview); >-static void gimp_preview_class_init (GimpPreviewClass * klass); >+static void gimp_preview_init (myGimpPreview * preview); >+static void gimp_preview_class_init (myGimpPreviewClass * klass); > > static void gimp_preview_plus_callback (GtkWidget * widget, gpointer data); > static void gimp_preview_minus_callback (GtkWidget * widget, gpointer data); > static gint gimp_preview_event (GtkWidget * widget, GdkEvent * event, > gpointer data); >-static void gimp_preview_recompute_sizes (GimpPreview * preview, >+static void gimp_preview_recompute_sizes (myGimpPreview * preview, > gdouble newscale); >-static void gimp_preview_update_preview (GimpPreview * preview); >+static void gimp_preview_update_preview (myGimpPreview * preview); > >-static void gimp_preview_image_set_size (GimpPreview * preview, gint width, >+static void gimp_preview_image_set_size (myGimpPreview * preview, gint width, > gint height); > static void gimp_preview_size_request (GtkWidget * widget, > GtkRequisition * requisition); >@@ -58,7 +58,7 @@ > GtkCallback callback, > gpointer callback_data); > gboolean gimp_preview_update_preview_idle_fun (gpointer data); >-void gimp_preview_schedule_update (GimpPreview * preview); >+void gimp_preview_schedule_update (myGimpPreview * preview); > > #define PROGRESS_BAR_HEIGHT (10) > #define PREVIEW_SIZE (100) >@@ -94,11 +94,11 @@ > > > /* >- * Apps which use a GimpPreview widget should not be accessing the private >+ * Apps which use a myGimpPreview widget should not be accessing the private > * data! > */ > #define PREVIEW_DATA(preview) \ >- ((GimpPreviewData*)(GIMP_PREVIEW (preview)->private_data)) >+ ((myGimpPreviewData*)(MY_GIMP_PREVIEW (preview)->private_data)) > > typedef struct > { >@@ -126,7 +126,7 @@ > GtkWidget *image; > GtkWidget *progress_bar; > } >-GimpPreviewData; >+myGimpPreviewData; > > > /* Convert coordinate in preview space to image coordinates */ >@@ -155,20 +155,20 @@ > if (!preview_type) > { > GTypeInfo preview_info = { >- sizeof (GimpPreviewClass), >+ sizeof (myGimpPreviewClass), > (GBaseInitFunc) NULL, > (GBaseFinalizeFunc) NULL, > (GClassInitFunc) gimp_preview_class_init, > (GClassFinalizeFunc) NULL, > (gconstpointer) NULL, /* class_data */ >- sizeof (GimpPreview), >+ sizeof (myGimpPreview), > 0, /* n_preallocs */ > (GInstanceInitFunc) gimp_preview_init, > (GTypeValueTable *) NULL /* value_table */ > }; > > preview_type = >- g_type_register_static (GTK_TYPE_CONTAINER, "GimpPreview", >+ g_type_register_static (GTK_TYPE_CONTAINER, "myGimpPreview", > &preview_info, 0); > } > >@@ -181,7 +181,7 @@ > * by GTK's internal mechanisms. > */ > static void >-gimp_preview_class_init (GimpPreviewClass * klass) >+gimp_preview_class_init (myGimpPreviewClass * klass) > { > GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); > GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); >@@ -190,7 +190,7 @@ > g_signal_new ("update_preview", > G_TYPE_FROM_CLASS (klass), > G_SIGNAL_RUN_FIRST, >- G_STRUCT_OFFSET (GimpPreviewClass, update_preview), >+ G_STRUCT_OFFSET (myGimpPreviewClass, update_preview), > NULL, > NULL, > g_cclosure_marshal_VOID__POINTER, >@@ -200,7 +200,7 @@ > g_signal_new ("preview_changed", > G_TYPE_FROM_CLASS (klass), > G_SIGNAL_RUN_FIRST, >- G_STRUCT_OFFSET (GimpPreviewClass, preview_changed), >+ G_STRUCT_OFFSET (myGimpPreviewClass, preview_changed), > NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); > > klass->update_preview = NULL; >@@ -212,7 +212,7 @@ > > > void >-gimp_preview_set_scale_amount(GimpPreview *preview, gdouble scale_amount) >+gimp_preview_set_scale_amount(myGimpPreview *preview, gdouble scale_amount) > { > /* > * If the caller wants to set the scale amount, let them do so. >@@ -269,7 +269,7 @@ > * by GTK's internal mechanisms. > */ > static void >-gimp_preview_init (GimpPreview * preview) >+gimp_preview_init (myGimpPreview * preview) > { > gchar buffer[10]; > >@@ -277,7 +277,7 @@ > GTK_WIDGET_SET_FLAGS (preview, GTK_NO_WINDOW); > GTK_CONTAINER (preview)->resize_mode = GTK_RESIZE_IMMEDIATE; > >- preview->private_data = g_malloc0 (sizeof (GimpPreviewData)); >+ preview->private_data = g_malloc0 (sizeof (myGimpPreviewData)); > > > PREVIEW_DATA (preview)->label = gtk_label_new (""); >@@ -307,7 +307,7 @@ > gimp_preview_new_with_args (GimpDrawable * drawable, gint cb_preview_size, > gdouble cb_scale_amount, gint cb_allow_scale) > { >- GimpPreview *preview; >+ myGimpPreview *preview; > GtkWidget *frame; > GtkWidget *hbox; > GtkWidget *event_box; >@@ -337,7 +337,7 @@ > > > /* Now allocate the actual preview window. */ >- preview = GIMP_PREVIEW (g_object_new (gimp_preview_get_type (), NULL)); >+ preview = MY_GIMP_PREVIEW (g_object_new (gimp_preview_get_type (), NULL)); > > /* Set the scale amount. */ > gimp_preview_set_scale_amount(preview, cb_scale_amount); >@@ -352,8 +352,8 @@ > preview_width = i2p (drawable->width, preview->scale); > preview_height = i2p (drawable->height, preview->scale); > >- GIMP_PREVIEW (preview)->width = preview_width; >- GIMP_PREVIEW (preview)->height = preview_height; >+ MY_GIMP_PREVIEW (preview)->width = preview_width; >+ MY_GIMP_PREVIEW (preview)->height = preview_height; > } > else > { >@@ -454,7 +454,7 @@ > static void > gimp_preview_size_request (GtkWidget * widget, GtkRequisition * requisition) > { >- GimpPreview *preview = GIMP_PREVIEW (widget); >+ myGimpPreview *preview = MY_GIMP_PREVIEW (widget); > GtkRequisition resize_box_requisition; > > #ifdef PREVIEW_DEBUG >@@ -478,7 +478,7 @@ > static void > gimp_preview_size_allocate (GtkWidget * widget, GtkAllocation * allocation) > { >- GimpPreview *preview = GIMP_PREVIEW (widget); >+ myGimpPreview *preview = MY_GIMP_PREVIEW (widget); > GtkAllocation resize_box_allocation, progress_bar_allocation, > event_box_allocation; > GtkRequisition resize_box_requisition; >@@ -543,7 +543,7 @@ > gboolean include_internals, > GtkCallback callback, gpointer callback_data) > { >- GimpPreview *preview = GIMP_PREVIEW (container); >+ myGimpPreview *preview = MY_GIMP_PREVIEW (container); > > if (PREVIEW_DATA (preview)->resize_box) > { >@@ -564,7 +564,7 @@ > * Plug-ins call this to do an update of the preview area. > */ > void >-gimp_preview_update (GimpPreview * preview) >+gimp_preview_update (myGimpPreview * preview) > { > gimp_preview_recompute_sizes (preview, preview->scale); > gimp_preview_update_preview (preview); >@@ -579,11 +579,11 @@ > static void > gimp_preview_plus_callback (GtkWidget * widget, gpointer data) > { >- GimpPreview *preview; >+ myGimpPreview *preview; > gchar buffer[10]; > gdouble new_scale; > >- preview = GIMP_PREVIEW (data); >+ preview = MY_GIMP_PREVIEW (data); > if (PREVIEW_DATA (preview)->scale_n == PREVIEW_SCALE_LAST) > return; > >@@ -616,11 +616,11 @@ > static void > gimp_preview_minus_callback (GtkWidget * widget, gpointer data) > { >- GimpPreview *preview; >+ myGimpPreview *preview; > gchar buffer[10]; > gdouble new_scale; > >- preview = GIMP_PREVIEW (data); >+ preview = MY_GIMP_PREVIEW (data); > if (PREVIEW_DATA (preview)->scale_n == 0) > return; > >@@ -651,12 +651,12 @@ > static gint > gimp_preview_event (GtkWidget * widget, GdkEvent * event, gpointer data) > { >- GimpPreview *preview; >+ myGimpPreview *preview; > GdkEventButton *button_event; > gint x, y; > gint dx, dy; > >- preview = GIMP_PREVIEW (data); >+ preview = MY_GIMP_PREVIEW (data); > button_event = (GdkEventButton *) event; > > switch (event->type) >@@ -733,7 +733,7 @@ > * This function is also used for initializing the preview. > */ > static void >-gimp_preview_recompute_sizes (GimpPreview * preview, gdouble new_scale) >+gimp_preview_recompute_sizes (myGimpPreview * preview, gdouble new_scale) > { > > /* The center of the preview in image coordinates. >@@ -765,7 +765,7 @@ > } > > void >-gimp_preview_generate_update_event (GimpPreview * preview) >+gimp_preview_generate_update_event (myGimpPreview * preview) > /* Signal the user that the preview must be updated */ > { > const gdouble scale = preview->scale; >@@ -783,7 +783,7 @@ > 0, > preview->drawable->height - image_y); > >- GimpPreviewEvent preview_event; >+ myGimpPreviewEvent preview_event; > > preview_event.event_id = PREVIEW_DATA (preview)->current_event_id; > preview_event.scale = preview->scale; >@@ -814,7 +814,7 @@ > * to step through source and destination! > */ > static void >-gimp_preview_update_preview (GimpPreview * preview) >+gimp_preview_update_preview (myGimpPreview * preview) > { > GimpPixelRgn region; > guchar *image_data = NULL; >@@ -1012,7 +1012,7 @@ > > > void >-gimp_preview_force_redraw (GimpPreview * preview) >+gimp_preview_force_redraw (myGimpPreview * preview) > { > gtk_widget_queue_draw (GTK_WIDGET (PREVIEW_DATA (preview)->image)); > } >@@ -1022,7 +1022,7 @@ > gboolean > gimp_preview_update_preview_idle_fun (gpointer data) > { >- GimpPreview *preview = GIMP_PREVIEW (data); >+ myGimpPreview *preview = MY_GIMP_PREVIEW (data); > gint event_id = PREVIEW_DATA (preview)->current_event_id; > > #ifdef PREVIEW_DEBUG >@@ -1041,7 +1041,7 @@ > } > > void >-gimp_preview_schedule_update (GimpPreview * preview) >+gimp_preview_schedule_update (myGimpPreview * preview) > { > PREVIEW_DATA (preview)->current_event_id++; > >@@ -1082,7 +1082,7 @@ > } > > void >-gimp_preview_image_set_size (GimpPreview * preview, gint width, gint height) >+gimp_preview_image_set_size (myGimpPreview * preview, gint width, gint height) > { > const gint real_width = MIN (preview->max_width, width); > const gint real_height = MIN (preview->max_height, height); >@@ -1120,8 +1120,8 @@ > > /** > * gimp_preview_draw_row: >- * @preview: the #GimpPreview >- * @event_id: event_id that was sent with the #GimpPreviewEvent. >+ * @preview: the #myGimpPreview >+ * @event_id: event_id that was sent with the #myGimpPreviewEvent. > * @type: the format of the data (e.g. %GIMP_RGBA_IMAGE). > * @row:the relative number of the row within the preview. > * The top row of the preview is number 0. >@@ -1137,7 +1137,7 @@ > * with the same event-id will be ignored by the preview. > **/ > gboolean >-gimp_preview_draw_row (GimpPreview * preview, const gint event_id, >+gimp_preview_draw_row (myGimpPreview * preview, const gint event_id, > GimpImageType type, gint row, > const guchar * const data) > { >@@ -1247,8 +1247,8 @@ > > /** > * gimp_preview_draw_unscaled_row: >- * @preview: the #GimpPreview >- * @event_id: event_id that was sent with the #GimpPreviewEvent. >+ * @preview: the #myGimpPreview >+ * @event_id: event_id that was sent with the #myGimpPreviewEvent. > * @type: the format of the data (e.g. %GIMP_RGBA_IMAGE). > * @row:row is the relative position of the row w.r.t. preview_event->image_y. > * The top row has number 0. >@@ -1267,7 +1267,7 @@ > * with the same event-id will be ignored by the preview. > **/ > gboolean >-gimp_preview_draw_unscaled_row (GimpPreview * preview, const gint event_id, >+gimp_preview_draw_unscaled_row (myGimpPreview * preview, const gint event_id, > GimpImageType type, const gint row, > const guchar * const data) > { >@@ -1445,8 +1445,8 @@ > > /** > * gimp_preview_progress_set_fraction: >- * @preview: the #GimpPreview. >- * @event_id: event_id that was sent with the #GimpPreviewEvent. >+ * @preview: the #myGimpPreview. >+ * @event_id: event_id that was sent with the #myGimpPreviewEvent. > * @fraction: the fraction completed. > * > * Set the progress bar of the preview to @fraction completed. >@@ -1456,7 +1456,7 @@ > * with the same event-id will be ignored by the preview. > **/ > gboolean >-gimp_preview_progress_set_fraction (GimpPreview * preview, >+gimp_preview_progress_set_fraction (myGimpPreview * preview, > const gint event_id, double fraction) > { > const gboolean return_status = >diff -ur refocus-0.9.0/src/gimppreview.h refocus-0.9.0-patched/src/gimppreview.h >--- refocus-0.9.0/src/gimppreview.h 2003-01-30 22:30:18.000000000 +0100 >+++ refocus-0.9.0-patched/src/gimppreview.h 2010-07-04 16:42:33.885366354 +0200 >@@ -32,25 +32,25 @@ > > #define PREVIEW_FIXED_SIZE 0 > #define PREVIEW_DEFAULT_SIZE -1 >-#define GIMP_TYPE_PREVIEW (gimp_preview_get_type ()) >-#define GIMP_PREVIEW(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PREVIEW, GimpPreview)) >-#define GIMP_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PREVIEW, GimpPreviewClass)) >-#define GIMP_IS_PREVIEW(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PREVIEW)) >-#define GIMP_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PREVIEW)) >-typedef struct _GimpPreview GimpPreview; >-typedef struct _GimpPreviewClass GimpPreviewClass; >-typedef struct _GimpPreviewEvent GimpPreviewEvent; >+//#define GIMP_TYPE_PREVIEW (gimp_preview_get_type ()) >+#define MY_GIMP_PREVIEW(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PREVIEW, myGimpPreview)) >+#define MY_GIMP_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PREVIEW, myGimpPreviewClass)) >+//#define GIMP_IS_PREVIEW(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PREVIEW)) >+//#define GIMP_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PREVIEW)) >+typedef struct _myGimpPreview myGimpPreview; >+typedef struct _myGimpPreviewClass myGimpPreviewClass; >+typedef struct _myGimpPreviewEvent myGimpPreviewEvent; > >-struct _GimpPreviewClass >+struct _myGimpPreviewClass > { > GtkContainerClass parent_class; > >- void (*update_preview) (GimpPreview * preview, GimpPreviewEvent * event); >- void (*preview_changed) (GimpPreview * preview); >+ void (*update_preview) (myGimpPreview * preview, myGimpPreviewEvent * event); >+ void (*preview_changed) (myGimpPreview * preview); > }; > > >-struct _GimpPreview >+struct _myGimpPreview > { > GtkContainer parent; > >@@ -75,13 +75,13 @@ > }; > > /** >- * GimpPreviewEvent: >+ * myGimpPreviewEvent: > * @event_id: Id of this event. This is needed for gimp_preview_draw_row, > * gimp_preview_draw_unscaled_row and gimp_preview_progress_set_fraction. > * @scale: Current scale of the preview. > * > **/ >-struct _GimpPreviewEvent >+struct _myGimpPreviewEvent > { > gint event_id; /* Id of this event */ > gdouble scale; /* Scale of preview */ >@@ -113,20 +113,20 @@ > gint preview_size, > gdouble scale_amount, > gint allow_scale); >-void gimp_preview_update (GimpPreview * preview); >+void gimp_preview_update (myGimpPreview * preview); > >-gboolean gimp_preview_draw_row (GimpPreview * preview, const gint event_id, >+gboolean gimp_preview_draw_row (myGimpPreview * preview, const gint event_id, > GimpImageType type, const gint row, > const guchar * const data); > >-gboolean gimp_preview_draw_unscaled_row (GimpPreview * preview, >+gboolean gimp_preview_draw_unscaled_row (myGimpPreview * preview, > const gint event_id, > GimpImageType type, const gint row, > const guchar * const data); > >-void gimp_preview_force_redraw (GimpPreview * preview); >+void gimp_preview_force_redraw (myGimpPreview * preview); > >-gboolean gimp_preview_progress_set_fraction (GimpPreview * preview, >+gboolean gimp_preview_progress_set_fraction (myGimpPreview * preview, > const gint event_id, > double fraction); > >diff -ur refocus-0.9.0/src/refocus.c refocus-0.9.0-patched/src/refocus.c >--- refocus-0.9.0/src/refocus.c 2010-07-04 16:33:24.312364787 +0200 >+++ refocus-0.9.0-patched/src/refocus.c 2010-07-04 16:43:02.753363951 +0200 >@@ -335,7 +335,7 @@ > (void) data; > set_busy_cursor (widget, TRUE); > update_matrix (); >- gimp_preview_update (GIMP_PREVIEW (my_widgets.preview)); >+ gimp_preview_update (MY_GIMP_PREVIEW (my_widgets.preview)); > set_busy_cursor (widget, FALSE); > } > >@@ -368,11 +368,11 @@ > { > gint event_id = GPOINTER_TO_INT (data); > return (gimp_preview_progress_set_fraction >- (GIMP_PREVIEW (my_widgets.preview), event_id, arg)); >+ (MY_GIMP_PREVIEW (my_widgets.preview), event_id, arg)); > } > > static void >-preview_callback (GtkWidget * widget, GimpPreviewEvent * event, gpointer data) >+preview_callback (GtkWidget * widget, myGimpPreviewEvent * event, gpointer data) > { > TileSource source; > TileSink sink; >@@ -392,7 +392,7 @@ > im_width, im_height); > tile_sink_init_for_preview (&sink, drawable, image_x, image_y, > im_width, im_height); >- gimp_preview_progress_set_fraction (GIMP_PREVIEW (my_widgets.preview), >+ gimp_preview_progress_set_fraction (MY_GIMP_PREVIEW (my_widgets.preview), > event->event_id, 0); > bd_closure_init (&update_progress_closure, > preview_progress_update_fun, >@@ -408,7 +408,7 @@ > { > tile_sink_get_row (&sink, buf, image_x, image_y + row, im_width); > event_is_current = >- gimp_preview_draw_unscaled_row (GIMP_PREVIEW (my_widgets.preview), >+ gimp_preview_draw_unscaled_row (MY_GIMP_PREVIEW (my_widgets.preview), > event->event_id, > gimp_drawable_type (drawable->drawable_id), > row, buf); >@@ -582,7 +582,7 @@ > > gtk_widget_show (dlg); > redraw_all (); >- gimp_preview_update (GIMP_PREVIEW (preview)); >+ gimp_preview_update (MY_GIMP_PREVIEW (preview)); > gtk_main (); > gdk_flush (); > return run_flag;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 327179
:
237769
|
237771
| 237773 |
237775
|
237777
|
237791