1. 28 Feb, 2004 1 commit
    • Michael Natterer's avatar
      some general cleanup. · 80fbb0f1
      Michael Natterer authored
      2004-02-28  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimpcellrendererviewable.c: some general cleanup.
      
      	(gimp_cell_renderer_viewable_set_property): ref the new renderer
      	before unrefing the old one. Fixes potential crash when setting
      	the same renderer again.
      80fbb0f1
  2. 28 Mar, 2003 1 commit
    • Michael Natterer's avatar
      allow keyboard activation. · c3519365
      Michael Natterer authored
      2003-03-28  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimpcellrenderertoggle.c
      	(gimp_cell_renderer_toggle_activate) *
      	app/widgets/gimpcellrendererviewable.c
      	(gimp_cell_renderer_viewable_activate): allow keyboard activation.
      
      	* app/widgets/gimpcellrendererviewable.c
      	(gimp_cell_renderer_viewable_render): fixed the if() which resets
      	the renderer's border color to black. Fixes layer borders to be
      	always correct now.
      c3519365
  3. 22 Mar, 2003 1 commit
    • Michael Natterer's avatar
      allow to create a GimpContainerEditor without a popup menu. · d1c99bee
      Michael Natterer authored
      2003-03-22  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimpcontainereditor.c: allow to create a
      	GimpContainerEditor without a popup menu.
      
      	* app/widgets/gimpcellrendererviewable.c: free the event we
      	got from gdk_get_current_event().
      
      	* app/widgets/gimpcontainerview.c: check view->hash_table for
      	being non-NULL before using it. Be prepared to be destroyed by as
      	a result of calling gimp_context_set_foo(view->context, foo).
      
      	* app/widgets/gimpcontainertreeview.[ch]: added
      	tree_view->editable_cells and handle *all* mouse clicks in
      	gimp_container_tree_view_button_press() (by returning TRUE). Start
      	editing on double-click only. Use gtk_tree_view_set_cursor()
      	instead of gtk_tree_selection_select_path() to avoid
      	selected/focus confusion when the focus enters the widget. Be
      	prepeared to be destroyed as a result of item selection.
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpcontainerpopup.[ch]: new GtkWindow derived
      	widget which pops up a selection of any GimpContainer/GimpContext
      	combo.
      
      	* app/widgets/gimpdatafactoryview.c
      	* app/widgets/gimpitemtreeview.c: add the name cell to
      	tree_view->editable_cells so it becomes editable.
      
      	* app/tools/gimpblendoptions.c
      	* app/tools/paint_options.c: use the new container popup for
      	selecting brushes and gradients.
      d1c99bee
  4. 21 Mar, 2003 1 commit
    • Michael Natterer's avatar
      show the popup preview again. · 87cfd54e
      Michael Natterer authored
      2003-03-21  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimpcellrendererviewable.c
      	(gimp_cell_renderer_viewable_clicked): show the popup preview
      	again.
      
      	* app/widgets/gimpcontainertreeview.c
      	* app/widgets/gimpimagedock.c
      	* app/widgets/gimptoolbox.c: removed useless #includes.
      87cfd54e
  5. 20 Mar, 2003 1 commit
    • Sven Neumann's avatar
      pass the modifier mask as GdkModifierType instead of guint. · 166078e1
      Sven Neumann authored
      2003-03-20  Sven Neumann  <sven@gimp.org>
      
      	* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
      	GdkModifierType instead of guint.
      
      	* app/core/gimpmarshal.list
      	* app/widgets/gimpcellrenderertoggle.c
      	* app/widgets/gimpcellrendererviewable.c
      	* app/widgets/gimppreview.c: use proper marshallers for signals
      	that take flags as parameters.
      
      	* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
      	to the GimpRGB signal parameter.
      
      2003-03-20  Sven Neumann  <sven@gimp.org>
      
      	* libgimpwidgets/libgimpwidgets.types
      	* libgimpwidgets/tmpl/gimpbutton.sgml
      	* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
      166078e1
  6. 19 Mar, 2003 1 commit
    • Michael Natterer's avatar
      app/widgets/gimpcellrenderertoggle.[ch] added public functions to emit the · 0b401af4
      Michael Natterer authored
      2003-03-19  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimpcellrenderertoggle.[ch]
      	* app/widgets/gimpcellrendererviewable.[ch]: added public
      	functions to emit the "clicked" signal.
      
      	* app/widgets/gimpcontainertreeview.c: use them instead of
      	g_signal_emit_by_name().
      
      	* app/widgets/Makefile.am
      	* app/widgets/gimpcontainertreeview-dnd.[ch]: new files
      	implementing DND for tree views.
      
      	* app/widgets/gimpcontainertreeview.[ch]: added virtual
      	functions drop_possible() and drop().
      
      	* app/widgets/gimpitemtreeview.c
      	* app/widgets/gimplayertreeview.c: implement drop_possible()
      	and drop().
      0b401af4
  7. 16 Mar, 2003 1 commit
    • Michael Natterer's avatar
      Added GtkTreeView versions of layers/channels/vectors: · 205cdf13
      Michael Natterer authored
      2003-03-16  Michael Natterer  <mitch@gimp.org>
      
      	Added GtkTreeView versions of layers/channels/vectors:
      
      	* app/core/core-enums.[ch]: renamed GIMP_UNDO_GROUP_LAYER_PROPERTIES
      	to GIMP_UNDO_GROUP_ITEM_PROPERTIES.
      
      	* app/core/gimpcontainer.c (gimp_container_reorder): don't try
      	to reorder containers with num_children == 1.
      
      	* app/core/gimpmarshal.list: added VOID: STRING, UINT marshaller.
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpchanneltreeview.[ch]
      	* app/widgets/gimpdrawabletreeview.[ch]
      	* app/widgets/gimpitemtreeview.[ch]
      	* app/widgets/gimplayertreeview.[ch]
      	* app/widgets/gimpvectorstreeview.[ch]: new widgets.
      
      	* app/widgets/gimpcellrenderertoggle.c: draw the frame only if the
      	cell is prelit.
      
      	* app/widgets/gimpcellrendererviewable.[ch]: added "clicked"
      	signal, unref the renderer in finalize(). Set the renderer's
      	border color to black if the cell is not selected (a hack that
      	saves tons of code in GimpLayerTreeView).
      
      	* app/widgets/gimpcomponenteditor.c: no need to gtk_list_store_set()
      	stuff we just got from the store.
      
      	* app/widgets/gimpcontainertreeview.[ch]: added lots of state used
      	by the new subclasses to the GimpContainerTreeView struct.  Create
      	the GtkListStore/GtkTreeView in GObject::constructor() and only
      	collect parameters in init() so subclasses can modify store/view
      	creation. Do most of the button_press_event stuff manually and
      	return TRUE from the handler.
      
      	* app/widgets/gimpcontainerview.c: cleanup.
      
      	* app/widgets/gimpitemlistview.h
      	* app/widgets/gimpvectorslistview.h: temp hacks before they die.
      
      	* app/widgets/gimppreviewrenderer.[ch]: added
      	gimp_preview_renderer_update_idle() which idle-emits "update"
      	without invalidating.
      
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs.c: added constructors for the new dialogs.
      
      	* app/gui/channels-commands.c
      	* app/gui/channels-menu.c
      	* app/gui/layers-commands.c
      	* app/gui/layers-menu.c
      	* app/gui/vectors-commands.c
      	* app/gui/vectors-menu.c: accept tree views as callback data.
      205cdf13
  8. 13 Mar, 2003 1 commit
  9. 12 Mar, 2003 1 commit
    • Sven Neumann's avatar
      app/widgets/Makefile.am app/widgets/widgets-types.h added a new · a83554d0
      Sven Neumann authored
      2003-03-12  Sven Neumann  <sven@gimp.org>
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpcellrenderertoggle.[ch]: added a new cell_renderer
      	derived from GtkCellRendererToggle.
      
      	* app/widgets/gimpcomponenteditor.c: use the new cell_renderer.
      
      	* app/widgets/gimpcellrendererviewable.[ch]: fixed a few typos and
      	removed some redundant casts.
      a83554d0
  10. 03 Mar, 2003 1 commit
    • Michael Natterer's avatar
      removed the constructors with a GimpViewable parameter and always create · b31fd4b9
      Michael Natterer authored
      2003-03-03  Michael Natterer  <mitch@gimp.org>
      
      	* app/widgets/gimppreviewrenderer.[ch]: removed the constructors
      	with a GimpViewable parameter and always create renderers from
      	viewable types only. Made gimp_preview_renderer_update() emit only
      	the "update" signal and added the new function
      	gimp_preview_renderer_invalidate() which does what the old
      	_update() did (invalidating and adding an idle function which
      	emits "update"). Added gimp_preview_renderer_remove_idle() so
      	renderer updating can be fully controlled using public functions.
      
      	* app/widgets/gimppreviewrendererbrush.[ch]: no need to remember
      	the widget for the brushpipe animation, simply call
      	gimp_preview_renderer_update() in the animation timeout.
      
      	* app/widgets/gimppreview.[ch]
      	* app/widgets/gimpcontainertreeview.c: changed accordingly. Call
      	gimp_preview_renderer_remove_idle() after setting the initial
      	viewable because we will be updated anyway by the first expose.
      
      	* app/widgets/gimppreview.[ch]: Added a size_request()
      	implementation. Removed gimp_preview_update(). Added new
      	constructor gimp_preview_new_full_by_types() to make the
      	constructor API symmetric. Removed code duplication by calling the
      	_by_types() constructors from the ones taking GimpViewable
      	parameters.
      
      	* app/gui/palette-import-dialog.c
      	* app/widgets/gimppropwidgets.c
      	* app/widgets/gimpselectioneditor.c: changed accordingly.
      b31fd4b9
  11. 01 Mar, 2003 1 commit
    • Michael Natterer's avatar
      don't scale the preview up if the buffer is too small. · 48bf4fb7
      Michael Natterer authored
      2003-03-01  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpbuffer.c: don't scale the preview up if the
      	buffer is too small.
      
      	* app/core/gimppattern.c: don't add a white border around the
      	preview if the pattern is too small.
      
      	* app/widgets/gimppreviewrenderer.[ch]: new object. A buffer
      	that updates itself on GimpViewable changes and can render
      	itself to any widget. Basically GimpPreview reduced to the
      	render and draw code.
      
      	* app/widgets/gimppreview.[ch]: removed all rendering and drawing
      	code and keep a GimpPreviewRenderer instance. Connect to its
      	"update" signal for queuing draws on the preview.
      
      	* app/widgets/gimpcellrendererviewable.[ch]
      	* app/widgets/gimpcontainertreeview.c: same here: removed
      	rendering and drawing code and keep GimpPreviewRenderers in the
      	list store.  Delays preview creation for GtkTreeViews until the
      	buffer is really needed for drawing and adds idle preview updating
      	on viewable changes.
      
      	* app/widgets/gimppreview-utils.[ch]
      	* app/widgets/gimpbrushpreview.[ch]
      	* app/widgets/gimpbufferpreview.[ch]
      	* app/widgets/gimpdrawablepreview.[ch]
      	* app/widgets/gimpimagepreview.[ch]: removed...
      
      	* app/widgets/gimppreviewrenderer-utils.[ch]
      	* app/widgets/gimppreviewrendererbrush.[ch]
      	* app/widgets/gimppreviewrendererdrawable.[ch]
      	* app/widgets/gimppreviewrendererimage.[ch]: ...and converted to
      	GimpPreviewRenderer subclasses.
      
      	* app/display/gimpnavigationview.c
      	* app/gui/palette-import-dialog.c
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-enums.h
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpchannellistview.c
      	* app/widgets/gimpcomponentlistitem.c
      	* app/widgets/gimpcontainergridview.c
      	* app/widgets/gimpcontainermenuimpl.c
      	* app/widgets/gimplayerlistitem.c
      	* app/widgets/gimplistitem.c
      	* app/widgets/gimpnavigationpreview.[ch]
      	* app/widgets/gimpselectioneditor.c
      	* app/widgets/gimpvectorslistview.c: changed accordingly.
      48bf4fb7
  12. 28 Feb, 2003 1 commit
    • Manish Singh's avatar
      app/tools/gimpbucketfilltool.c app/tools/gimpconvolvetool.c · 5bc3a7a3
      Manish Singh authored
      2003-02-27  Manish Singh  <yosh@gimp.org>
      
              * app/tools/gimpbucketfilltool.c
              * app/tools/gimpconvolvetool.c
              * app/tools/gimpcroptool.c
              * app/tools/gimpdodgeburntool.c
              * app/tools/gimperasertool.c
              * app/tools/gimpfliptool.c
              * app/tools/gimpfuzzyselecttool.c
              * app/tools/gimpinkoptions.c
              * app/tools/gimpmagnifytool.c
              * app/tools/gimpmovetool.c
              * app/tools/gimprectselecttool.c
              * app/tools/gimpselectiontool.c
              * app/tools/gimptexttool.c
              * app/tools/gimptransformtool.c
              * app/widgets/gimpcellrendererviewable.c
              * app/widgets/gimpcontainertreeview.c: remove unecessary G_OBJECT()
              from g_object_set calls.
      
              * plug-ins/common/bumpmap.c: use g_signal_handlers_(un)block_by_func
              instead of gtk_signal_handler_(un)block_by_data.
      5bc3a7a3
  13. 27 Feb, 2003 1 commit
    • Michael Natterer's avatar
      added virtual function get_popup_size() which returns a boolean indicating · 0614aa53
      Michael Natterer authored
      2003-02-27  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpviewable.[ch]: added virtual function
      	get_popup_size() which returns a boolean indicating if a popup is
      	needed and its size.
      
      	* app/core/gimpbrush.c
      	* app/core/gimpbrushpipe.c
      	* app/core/gimpbuffer.c
      	* app/core/gimpdrawable-preview.[ch]
      	* app/core/gimpdrawable.c
      	* app/core/gimpgradient.c
      	* app/core/gimpimage.c
      	* app/core/gimppalette.c
      	* app/core/gimppattern.c
      	* app/core/gimpundo.c: implement it.
      
      	* app/widgets/gimppreview.[ch]: removed virtual functions
      	needs_popup() and create_popup(). Removed the code which creates
      	the popup and the popup members of the GimpPreview struct.
      
      	* app/widgets/gimppreview-popup.[ch]: new files providing the
      	utility function gimp_preview_popup_show() which can show popups
      	from any widget, not just from a GimpPreview. Checks if a popup is
      	needed using gimp_viewable_get_popup_size().
      
      	* app/widgets/gimpcellrendererviewable.c: show popups here too.
      
      	* app/widgets/gimpbrushpreview.c
      	* app/widgets/gimpbufferpreview.c
      	* app/widgets/gimpdrawablepreview.c
      	* app/widgets/gimpimagepreview.c: removed needs_popup() and
      	create_popup() implementations.
      
      	* app/widgets/gimpnavigationpreview.c: removed empty render()
      	implementation.
      
      	* app/widgets/gimpundoeditor.c: use a tree instead of a list view.
      
      	* app/widgets/gimpgradientpreview.[ch]
      	* app/widgets/gimppalettepreview.[ch]
      	* app/widgets/gimppatternpreview.[ch]: removed because they only
      	implemented the removed popup functions.
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpmenuitem.c
      	* app/widgets/gimppreview-utils.c: changed accordingly
      0614aa53
  14. 26 Feb, 2003 2 commits
    • Sven Neumann's avatar
      added a writeable field to GimpData and set it from · 0ceeeb02
      Sven Neumann authored
      2003-02-26  Sven Neumann  <sven@gimp.org>
      
      	* app/core/gimpdata.[ch]: added a writeable field to GimpData and
      	set it from gimp_data_set_filename().
      
      	* app/gui/brushes-menu.c
      	* app/gui/gradients-menu.c
      	* app/gui/palettes-menu.c
      	* app/gui/patterns-menu.c
      	* app/widgets/gimpbrushfactoryview.c
      	* app/widgets/gimpdatafactoryview.c
      	* app/widgets/gimpgradienteditor.c: look at data->writeable when
      	setting widgets sensitivity.
      
      	* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
      	some of the dialog clutter by not showing the directories created for
      	plug-ins.
      
      	* app/core/gimpviewable.[ch]: added a default_stock_id to
      	GimpViewableClass so we don't need to hold a copy in each instance.
      	Added accessor functions to set and get the stock_id.
      
      	* app/core/gimptoolinfo.c
      	* app/gui/dialogs-constructors.c
      	* app/gui/image-menu.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimphistogramtool.c
      	* app/tools/gimpimagemaptool.c
      	* app/tools/gimpmeasuretool.c
      	* app/tools/gimptransformtool.c
      	* app/widgets/gimpcellrendererviewable.c
      	* app/widgets/gimppreview.c
      	* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().
      
      	* app/text/gimptextlayer.c: set a text icon as default stock_id.
      0ceeeb02
    • Michael Natterer's avatar
      added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI · 305db405
      Michael Natterer authored
      2003-02-26  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
      	GimpViewable struct. It is used by the GUI if the get_preview()
      	functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.
      
      	* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
      	the cached GdkPixbuf. Don't implement any preview function
      	so the GUI uses the stock_id.
      
      	* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
      	the #warning about the buggy way we created the pixbuf.
      
      	* app/gui/dialogs-constructors.c
      	* app/gui/image-menu.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimphistogramtool.c
      	* app/tools/gimpimagemaptool.c
      	* app/tools/gimpmeasuretool.c
      	* app/tools/gimptransformtool.c
      	* app/widgets/gimptoolbox.c: use viewable->stock_id instead
      	of tool_info->stock_id.
      
      	* app/core/gimpbrush.c
      	* app/core/gimpgradient.c
      	* app/core/gimpimagefile.c
      	* app/core/gimpundo.c: simplified get_preview() implementations:
      
      	- never scale previews up, only down.
      	- don't render white or checks backgrounds but simply return
      	  TempBufs with alpha and let the preview system do its job.
      	- don't add padding but simply return previews smaller than
      	  requested.
      
      	* app/display/gimpdisplayshell-render.[ch]: added
      	"render_blend_white", a 2d lookup table for blending on white,
      	just as the check lookup tables. Added "render_white_buf".
      
      	* app/widgets/gimppreview.[ch]: changed a lot:
      
      	- don't render the preview's border into the buffer.
      	- added "GdkGC *border_gc" and draw the preview's border in expose()
      	  using gdk_draw_rectangle().
      	- added "GdkPixbuf *no_preview_pixbuf" and create it in
      	  gimp_preview_real_render() if gimp_viewable_get_preview()
      	  returned NULL.
      	- factored the actual preview rendering out to
      	  gimp_preview_render_to_buffer(). Added configurable background
      	  rendering for the preview itself and it's padding area
      	  (the area the preview is larger than the buffer returned
      	  by gimp_viewable_get_preview()).
      	- changed gimp_preview_render_and_flush() to
      	  gimp_preview_render_preview() and added "inside_bg" and
      	  "outside_bg" parameters.
      	- use the new render buffers for blending on white.
      
      	* app/widgets/gimpbrushpreview.c
      	* app/widgets/gimpbufferpreview.c
      	* app/widgets/gimpdrawablepreview.c
      	* app/widgets/gimpgradientpreview.c
      	* app/widgets/gimpimagepreview.c
      	* app/widgets/gimppalettepreview.c
      	* app/widgets/gimppatternpreview.c: don't create large white
      	TempBufs to center the previews in but simply set the TempBuf's
      	offsets to get them centered. Simplified & cleaned up many preview
      	render functions. Pass the correct GimpPreviewBG modes to
      	gimp_preview_render_preview().
      
      	* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
      	class derived from GtkCellRendererPixbuf which knows how
      	to use gimp_viewable_get_preview_size() and renders the
      	viewable's stock item if no preview can be created.
      
      	* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
      	which creates the preview pixbuf if needed so we don't create it
      	unconditionally upon item insertion. Fixed preview size assertion
      	to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
      	while reordering the selected item.
      
      	* app/widgets/gimpcontainerview.c: cosmetic.
      
      	* app/widgets/gimpimagefilepreview.[ch]
      	* app/widgets/gimptoolinfopreview.[ch]
      	* app/widgets/gimpundopreview.[ch]: removed because the default
      	implementation is good enough.
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimppreview-utils.c: changed accordingly.
      
      	* app/gui/dialogs-constructors.[ch]
      	* app/gui/dialogs-menu.c
      	* app/gui/dialogs.c
      	* app/gui/image-menu.c
      	* app/gui/toolbox-menu.c: register grid and tree view variants
      	of the document history.
      
      	Unrelated:
      
      	* app/gui/gui.c (gui_exit_finish_callback): disconnect from
      	signals earlier.
      
      	* app/gui/user-install-dialog.c: create the "tool-options" subdir
      	of the user's ~/.gimp-1.3 directory.
      305db405