Commit Graph

36 Commits

Author SHA1 Message Date
Michael Natterer eac902d065 libgimp: use gtk_widget_get_visible() instead of GTK_WIDGET_VISIBLE() 2010-01-17 16:51:48 +01:00
Michael Natterer fcd346a227 Build with GSEAL_ENABLE with a few exceptions
Use the new accessors in GTK+ 2.18 and #undef GSEAL_ENABLE where
accessors are missing or where I'm not quite sure how to fix the
stuff yet.
2009-10-17 18:51:48 +02:00
Martin Nordholts eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02:00
Michael Natterer e6af54a687 use GtkAdjustment's accessors.
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: use GtkAdjustment's
	accessors.


svn path=/trunk/; revision=28199
2009-03-22 20:46:48 +00:00
Michael Natterer 3795f9b9c5 libgimpwidgets/gimpchainbutton.c libgimpwidgets/gimpcolorarea.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpmemsizeentry.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpruler.c
	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpwidgets.c: use accessors for various members
	of GTK+ structures that don't exist any longer when GSEAL_ENABLE
	is defined.


svn path=/trunk/; revision=28190
2009-03-22 15:42:42 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann ec12326ccb app/widgets/gimpnavigationview.c hardcode the colors to black and white.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpnavigationview.c
	* libgimpwidgets/gimpscrolledpreview.c: hardcode the colors to
	black and white. Using theme colors doesn't make sense here.


svn path=/trunk/; revision=26719
2008-08-22 21:44:52 +00:00
Sven Neumann 943c4dba85 draw the navigation popup using Cairo, just as we do it in the core now.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.[ch]: draw the navigation
	popup using Cairo, just as we do it in the core now.


svn path=/trunk/; revision=26718
2008-08-22 21:30:33 +00:00
Michael Natterer 58cfcd4f57 libgimp/gimpgradientselectbutton.c libgimp/gimpmenu.c
2008-06-28  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimpgradientselectbutton.c
	* libgimp/gimpmenu.c
	* libgimpwidgets/gimpbrowser.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpenumwidgets.c
	* libgimpwidgets/gimpframe.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimppropwidgets.c
	* libgimpwidgets/gimpscrolledpreview.c: use accessors instead of
	accessing members of GTK+ widgets directly.


svn path=/trunk/; revision=26005
2008-06-28 15:09:46 +00:00
Sven Neumann 1449a6d202 libgimpwidgets/gimpscrolledpreview.c don't rely on the pointer position in
2007-12-18  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpcolorselect.c: don't rely on the pointer
	position in the GdkEventMotion struct, query the pointer instead.

svn path=/trunk/; revision=24396
2007-12-18 17:57:27 +00:00
Sven Neumann aabb94ec92 libgimpwidgets/gimpcolorselect.c use gdk_event_request_motions() to handle
2007-11-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpscrolledpreview.c: use
	gdk_event_request_motions() to handle motion hint events.


svn path=/trunk/; revision=24050
2007-11-04 12:52:47 +00:00
Sven Neumann 5226c66080 changed move cursor to GDK_HAND1 and switch to GDK_FLEUR while the mouse
2007-11-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: changed move cursor to
	GDK_HAND1 and switch to GDK_FLEUR while the mouse button is down.

svn path=/trunk/; revision=24029
2007-11-01 15:50:05 +00:00
Sven Neumann fa3e0fb71a use small-checks for the navigation popup and inherit the check-type from
2007-10-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_nav_button_press): use small-checks for 
the
	navigation popup and inherit the check-type from the preview.


svn path=/trunk/; revision=23979
2007-10-27 22:01:25 +00:00
Sven Neumann 24c7fc1e8d formatting.
2007-09-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: formatting.

	* libgimpwidgets/gimpscrolledpreview.c: make use of freeze/thaw to
	reduce the number of updates during initialization.

svn path=/trunk/; revision=23602
2007-09-21 12:19:00 +00:00
Sven Neumann e3813131b7 also use the middle mouse button for panning.
2007-04-25  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: also use the middle mouse
	button for panning.

	* plug-ins/common/nova.c: override the default mouse handling of
	the GimpScrolledPreview and allow to reposition the center using
	the left mouse button. Fixes bug #364432.

	* app/tools/gimprectangletool.c: formatting.

svn path=/trunk/; revision=22319
2007-04-25 10:10:43 +00:00
Sven Neumann 2c6bf5c03c applied patch from Aurimas Juška that fixes positioning of the quick
2007-04-18  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_nav_button_press): applied patch from
	Aurimas Juška that fixes positioning of the quick navigation
	popup (bug #430917).

svn path=/trunk/; revision=22276
2007-04-18 07:55:13 +00:00
Sven Neumann 64e893e62f there's no need to make GTypeInfo and GInterfaceInfo structs static.
2006-10-18  Sven Neumann  <sven@gimp.org>

        * [lots of files]: there's no need to make GTypeInfo and
        GInterfaceInfo structs static.
2006-10-18 13:17:50 +00:00
Sven Neumann f2df31a50e converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 10:53:28 +00:00
Sven Neumann 10bc4df305 fixed check that suppresses the redraw for motion events that don't cause
2006-02-07  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_area_event): fixed check that suppresses
	the redraw for motion events that don't cause the preview to scroll.
2006-02-07 12:34:07 +00:00
Sven Neumann 539ff359a4 connect-after to "realize" and "size-allocate" signals of the preview area
2006-02-06  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c: connect-after to "realize" and
	"size-allocate" signals of the preview area and call the
	set-cursor method from the callback.

	* libgimpwidgets/gimpscrolledpreview.c: no need to explicitely set
	the cursor now that the virtual method is used correctly.

	* libgimp/gimpzoompreview.c: implement set-cursor and set the move
	cursor in accordance with the zoom factor.
2006-02-06 11:07:48 +00:00
Sven Neumann b614bf5e85 libgimpwidgets/gimpintcombobox.[ch] libgimpwidgets/gimppageselector.[ch]
2006-01-25  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpintcombobox.[ch]
	* libgimpwidgets/gimppageselector.[ch]
	* libgimpwidgets/gimpzoommodel.[ch]: added a priv pointer to the
	instance struct and changed the GET_PRIVATE() macro to access the
	private data via that pointer.

	* libgimpwidgets/gimpscrolledpreview.[ch]
	* libgimpwidgets/gimpwidgets.def: added a priv pointer to the
	instance struct and moved all private data to the
	GimpScrolledPreviewPrivate struct. Added freeze/thaw methods so
	that derived widgets can be implemented without accessing private
	data.

	* libgimp/gimpzoompreview.c: changed accordingly.

	* libgimp/gimpfontselectbutton.[ch]: let the priv pointer be an
	anonymous void pointer.
2006-01-25 14:35:56 +00:00
Sven Neumann a4c54f7aa8 removed unused variable.
2005-12-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: removed unused variable.
2005-12-20 09:18:09 +00:00
Sven Neumann 887129a2c3 request motion hints in the navigation popup and redraw the window
2005-11-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c: request motion hints in
	the navigation popup and redraw the window immidiately to give
	better feedback.
2005-11-22 13:31:08 +00:00
Sven Neumann 3ac4aab0a1 zoom on Ctrl-Scroll events.
2005-11-22  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpzoompreview.c: zoom on Ctrl-Scroll events.

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_area_event): correctly clamp adjustment
	value on scroll events. Ignore scroll events when Ctrl is pressed.
2005-11-22 11:50:29 +00:00
Sven Neumann 795e2a8be1 scroll using the mouse wheel.
2005-11-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_area_event): scroll using the mouse wheel.
2005-11-21 17:53:58 +00:00
David Odin ce58314257 don't return void in a function returning a gboolean.
* libgimpwidgets/gimpscrolledpreview.c: don't return void in a
  function returning a gboolean.
2005-11-05 12:40:17 +00:00
Sven Neumann 20db799250 draw the rectangle according to the scrollbar adjustments.
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.c
	(gimp_scrolled_preview_nav_popup_expose): draw the rectangle
	according to the scrollbar adjustments.
2005-09-28 12:53:28 +00:00
Sven Neumann f71b4e6aa1 must not set the adjustment value directly. Instead make sure that the
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.[ch]
	(gimp_scrolled_preview_set_position): must not set the adjustment
	value directly. Instead make sure that the scrollbar adjustments
	are uptodate and use gtk_adjustment_set_value().
2005-09-28 12:39:30 +00:00
Sven Neumann 9ab6ffa950 added a hbox to the table and the "Update Preview" checkbutton there.
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added a hbox to the table and
	the "Update Preview" checkbutton there. Added a function to access
	this control box. Increased default size to 200.

	* libgimpwidgets/gimpscrolledpreview.[ch]: added function
	gimp_scrolled_preview_set_policy() to control when the scrollbars
	should be shown.

	* libgimpwidgets/gimpwidgets.def: updated.

	* libgimp/gimpzoompreview.c: pack the zoom buttons into the
	preview's control box. Commented out the label, it shows a bogus
	zoom factor. Set scrollbar policy to ALWAYS to avoid resizing.
2005-09-28 02:46:06 +00:00
Sven Neumann 93eab43eef Use the canonical form for signal names.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names.
2005-05-27 16:51:39 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
David Odin d9e414fd8d new function: gimp_scrolled_preview_set_position () to set the position of
* libgimpwidgets/gimpscrolledpreview.[ch]: new function:
  gimp_scrolled_preview_set_position () to set the position of the
  preview content wrt the drawable.  This function might be moved to a
  virtual function of GimpPreview in a near future.

* libgimp/gimpdrawablepreview.c: use this function, so a preview
  remembers its position from one invocation to the next.  This is done
  using the current executable name as a key for gimp_set/get_data () so
  each plug-in can have its preview on a different place.

  More informations could be saved this way: the update toggle, the checks, etc.

  Addresses bug #162286.

* libgimpwidgets/gimppreview.c: smallish cleanup.
2005-01-05 22:33:44 +00:00
David Odin 48470a093f really use the second parameter of gimp_aspect_preview_new (), so plug-ins
* libgimp/gimpaspectpreview.c: really use the second parameter of
  gimp_aspect_preview_new (), so plug-ins can now really remember the
  state of the preview between invocations.

* libgimpwidgets/gimpscrolledpreview.c: fix a little typo

* plug-ins/common/channel_mixer.c: fix a warning by using TRUE for a
  boolean value (initial state of the preview) instead of a weird NULL.
2004-10-27 11:38:15 +00:00
David Odin 3eb00e0350 added a new function to set the default cursor on preview:
* libgimpwidgets/gimppreview.[ch]: added a new function to set the
  default cursor on preview: gimp_preview_set_default_cursor().

* libgimpwidgets/gimpscrolledpreview.c: changed accordlingly.

* plug-ins/common/flarefx.c:
* plug-ins/common/nova.c: use this function.

This addresses bug #90519.
2004-10-13 18:56:28 +00:00
Sven Neumann c4bf786cc2 libgimpwidgets/gimppreview.[ch] libgimpwidgets/gimpscrolledpreview.[ch]
2004-09-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]
	* libgimpwidgets/gimpscrolledpreview.[ch]
	* libgimpwidgets/gimpwidgets.def: moved the offsets and the
	draw_thumb method back to the GimpPreview class.

	* libgimp/gimpdrawablepreview.c: changed accordingly.

	* plug-ins/common/bumpmap.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/dog.c
	* plug-ins/common/edge.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c
	* plug-ins/common/gauss.c
	* plug-ins/common/grid.c
	* plug-ins/common/mblur.c
	* plug-ins/common/neon.c
	* plug-ins/common/noisify.c
	* plug-ins/common/oilify.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/sobel.c
	* plug-ins/common/softglow.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/wind.c: back to using gimp_preview_get_position().

	* libgimp/gimpregioniterator.c (gimp_rgn_iterator_new): corrected
	gtk-doc comment.
2004-09-29 13:39:23 +00:00
David Odin a001920ead libgimpwidgets/gimppreview.c split this widget into itself (more abstract
* libgimpwidgets/gimppreview.c
* libgimpwidgets/gimppreview.h: split this widget into itself (more
  abstract now) and ...

* libgimpwidgets/gimpscrolledpreview.c
* libgimpwidgets/gimpscrolledpreview.h: this widget which also have
  some scrollbars and a nagivation preview.

* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgetstypes.h: changed accordingly.

* libgimp/gimpaspectpreview.c
* libgimp/gimpaspectpreview.h: Added this widget, derived from
  GimpPreview, which has always the same ratio has the given drawable.
  This widget has almost the same api as GimpDrawablePreview, and is
  useful for plug-ins that show the whole (scaled) drawable in their
  preview.

* libgimp/gimpdrawablepreview.c
* libgimp/gimpdrawablepreview.h: GimpDrawablePreview is now derived
  from GimpScrolledPreview.

* libgimp/Makefile.am
* libgimp/gimpui.h
* libgimp/gimpuitypes.h: changed accordingly.

* plug-ins/common/plasma.c: use a GimpAspectPreview.

* plug-ins/common/bumpmap.c
* plug-ins/common/cartoon.c
* plug-ins/common/deinterlace.c
* plug-ins/common/despeckle.c
* plug-ins/common/dog.c
* plug-ins/common/edge.c
* plug-ins/common/engrave.c
* plug-ins/common/exchange.c
* plug-ins/common/gauss.c
* plug-ins/common/grid.c
* plug-ins/common/mblur.c
* plug-ins/common/neon.c
* plug-ins/common/noisify.c
* plug-ins/common/oilify.c
* plug-ins/common/photocopy.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/sharpen.c
* plug-ins/common/shift.c
* plug-ins/common/sobel.c
* plug-ins/common/softglow.c
* plug-ins/common/spread.c
* plug-ins/common/struc.c
* plug-ins/common/unsharp.c
* plug-ins/common/wind.c: use gimp_scrolled_preview_get_position
  instead of gimp_preview_get_position.
2004-09-28 23:23:09 +00:00