Commit graph

3749 commits

Author SHA1 Message Date
Michael Natterer
74fe162f93 app: move adding an arc path out to a utility function 2010-09-24 13:12:34 +02:00
Michael Natterer
612aee9f33 app: change segment drawing to using pixel centers and CAP_SQUARE line ends
This looks exactly the same for the selection, but is needed like that
for segment drawing in tools.
2010-09-23 19:24:10 +02:00
Sven Neumann
5abae32923 app: cache bezier representation in GimpVectors object
Introduce gimp_vectors_get_bezier() which creates the bezier
representation on demand and then caches it for subsequent calls
until the vectors object is frozen.

At some point we should introduce GimpVectors::changed instead
of relying on the fact that a vectors object is always frozen
and thawn whenever it is changed...
2010-09-16 21:36:51 +02:00
Sven Neumann
81182d93f7 app: use gimp_label_set_attributes() instead of markup
Use our convenient label utility function for styling. Also correct
box packing (passing FALSE, TRUE to gtk_box_pack_start() is pointless).
2010-09-16 21:12:07 +02:00
Martin Nordholts
ec7fc273d8 Bug 629436 - the current tool is not shown in the tool options dialog 2010-09-16 17:46:10 +02:00
Michael Natterer
7f9a4d51f7 app: get rid of using gdk_draw to construct bitmap cursors
At the same time, get rid of bitmap cursors alltogether. Instead
(because it looks ugly to have GDK convert RGBA cursors into bitmaps
for old X servers), add the bitmaps as proper PNGs and simply use them
as RGBA cursors.
2010-09-10 19:12:52 +02:00
Michael Natterer
3b0c4e2e5e app: port a gdk_draw_rectangle() in GimpComboTagEntry to cairo 2010-09-10 13:47:04 +02:00
Michael Natterer
bfce429d24 app: some minor fixes in GimpTextStyleEditor
- initialize all of the color strust in init().
- simplify font_changed().
2010-09-02 00:42:59 +02:00
Michael Natterer
ad819263af Bug 620674 - Adding support for multi-colored text layer
Apply slightly modified patch from Barak Itkin that adds colors for
text spans plus GUI to edit these colors.
2010-09-02 00:20:04 +02:00
Sven Neumann
813ee3de88 app: port layout drawing to cairo 2010-08-31 22:59:34 +02:00
Michael Natterer
02abdff8aa app: move the wilber drawing functions to gimpcairo.c 2010-08-28 15:30:02 +02:00
Sven Neumann
ac33ead19d app/widgets: plug memory leak 2010-08-27 15:13:49 +02:00
Michael Natterer
f260cd766e app: add gimp_cairo_add_segments()
which adds an array of GdkSegments to the current path, and use it in
gimpdisplayshell-draw.c instead of duplicating the code three times.
2010-08-27 14:58:43 +02:00
Michael Natterer
3e1b14fd1a app: add widgets/gimpcairo.[ch] for cairo utility functions
and move the stipple pattern creation function there.
2010-08-27 14:41:30 +02:00
Martin Nordholts
9bd423994d app: Make Alt-Click on layer thumbnail in Layers dockable discoverable
Make Alt-Click on layer thumbnail in Layers dockable discoverable, at
least in theory, by adding this info to the menu item tooltips.
2010-08-17 18:59:04 +02:00
Martin Nordholts
a0dc12a0f3 Remove "Text to Selection" actions
Remove "Text to Selection" actions. They were added to make the
feature more discoverable. But we should make the original "Alpha to
selection" feature more discoverable, not treating text layers in a
special way where it's not needed.
2010-08-17 18:59:04 +02:00
Michael Natterer
7df1a4f3df app: clean up GimpColorBar rendering and add cairo_surface_mark_dirty() 2010-07-30 16:25:08 +02:00
Michael Natterer
208096bc7c app: port GimpColorBar drawing to cairo 2010-07-30 14:58:55 +02:00
Michael Natterer
4466b3a35b app: remove code duplication in the histogram and curve views
by letting the histogram view always draw the background and the outer
borders. Also fix a lot of off-by-one problems in the curve view which
occur due to the 0.5,0.5 offset of cairo line drawing.
2010-07-30 12:51:03 +02:00
Michael Natterer
c548a593e5 app: port GimpHistogramView drawing to cairo 2010-07-30 12:18:08 +02:00
Michael Natterer
900fd00c00 app: port GimpTagPopup drawing to cairo 2010-07-29 14:41:50 +02:00
Michael Natterer
d28a04ac04 app: port GimpFgBgEditor drawing to cairo 2010-07-29 14:20:37 +02:00
Michael Natterer
c5951857e1 app: forgot cairo_destroy() 2010-07-29 14:10:01 +02:00
Michael Natterer
8d67b5b69b app: port GimpFgBgView rendering to cairo 2010-07-29 14:05:51 +02:00
Michael Natterer
06488d03fe app: draw the curve view's background with cairo
and fix focus line drawing by one pixel.
2010-07-28 16:15:54 +02:00
Michael Natterer
c3a4825a8a app: simplify GimpOverlayFrame drawing a lot
Thanks to Benjamin Otte for some tips.
2010-07-27 17:26:40 +02:00
Sven Neumann
8cf801c8e0 app: allow to delete curve points
Pressing Delete in the Curve view now deletes the selected point
on the curve.
2010-07-26 01:08:44 +02:00
Michael Natterer
4165dfb217 app: move the alt-click selection feature to GimpItemTreeView
so it works the same for layers, channels and vectors and remove the
separate (and different) implementations from all subclasses.
2010-07-20 23:36:16 +02:00
Michael Natterer
8b31211639 Fix the bulid after GtkNotebookPage got deprecated in gtk-2-22
In all GtkNotebook::switch_page() callbacks, simply replace
GtkNotebookPage* by gpointer.
2010-07-16 15:24:25 +02:00
Michael Natterer
314a6ab926 app: merge the layer, channel and vectors repositioning APIs
into an API based on GimpItem.
2010-07-08 18:08:13 +02:00
Michael Natterer
fad6053643 Make cairo code work with newer cairo backends that actually use caching
Call cairo_surface_flush() before reading or writing a surface's
pixels directly, and use cairo_surface_mark_dirty() after writing
pixels directly, so we don't read old pixels, and our written pixels
get actually used.
2010-06-28 12:23:31 +02:00
Michael Natterer
d2fd8a8dc8 app: don't call gimp_cell_renderer_viewable_pre_clicked() on a NULL cell 2010-06-28 00:13:19 +02:00
Martin Nordholts
706900c4f6 Bug 589010 - Don't make Alt-Clicked layers active
Add a "pre-clicked" signal to GimpCellRendererViewable that can
prevent a selection from happening. Move the Alt-Click code in
GimpLayerTreeView to this signal and if a layer is Alt-Clicked, don't
go ahead and make the layer active. Also add a test for this use case.
2010-06-27 21:46:53 +02:00
Martin Nordholts
4471f0ea4b Bug 622683 - file export defaults to the wrong directory / folder
We were not in sync with the spec:
http://gui.gimp.org/index.php/Save_%2B_export_specification#exporting_files
2010-06-27 14:11:13 +02:00
Martin Nordholts
0258461c9f app: Format widgets/gimpcellrendererviewable.h
Format widgets/gimpcellrendererviewable.h and make room for
gimp_cell_renderer_viewable_pre_select().
2010-06-27 11:51:44 +02:00
Martin Nordholts
3f0b473680 app: Don't use actions for Alt-Click on layer
Don't use an action based implementation of Alt-Click for "Layer to
selection" since the actions will always use the active drawable,
preventing us from solving bug 589010. Use the tree model and
gimp_channel_select_alpha() instead.
2010-06-27 10:40:56 +02:00
Martin Nordholts
aeed966943 app: Format widgets/gimplayertreeview.c function prototypes
Format widgets/gimplayertreeview.c function prototypes with
egtk-format-protos.
2010-06-27 10:40:56 +02:00
Michael Natterer
40423b26a8 app: free ui_manager_name in finalize() 2010-06-26 23:28:17 +02:00
Michael Natterer
79dbfb2b51 app: remove the docks manually in dispose() for the reason below 2010-06-26 23:27:17 +02:00
Michael Natterer
de3a5896f3 app: remove the children manually in dispose() for the reason below 2010-06-26 23:26:00 +02:00
Michael Natterer
0abe67389d app: remove the dockables manually in dispose()
using the proper API, so all stuff is properly disconnected and the
list items managing them are freed to. Also make removing robust
against dockbook->dock being NULL.
2010-06-26 23:23:50 +02:00
Martin Nordholts
ed630a1852 app: Remove unused variables and dead code 2010-06-24 22:46:20 +02:00
Michael Natterer
991210c0f9 Bug 622608 - GIMP crashes when clicking any scroll bar from combo boxes
Don't cancel the popup in grab_notify() if the popup's grab was
shadowed by one of the widgets in the popup, like the scrollbar.
2010-06-24 21:56:41 +02:00
Michael Natterer
c47edb5016 app: improve the g_warning() about undestroyed dialogs 2010-06-24 18:38:17 +02:00
Michael Natterer
403908829a app: add comment about why we can't use GimpContainerView API in init() 2010-06-24 18:38:17 +02:00
Michael Natterer
3c565a1736 app: unref context, dialog_factory and ui_manager in GObject::dispose()
The were not unrefed at all before
2010-06-24 18:38:16 +02:00
Michael Natterer
ad83462570 app: unref the filtered container in GObject::dispose()
It was simply never destroyed at all before.
2010-06-24 18:38:16 +02:00
Michael Natterer
b43be361ff app: add a forgotten g_object_unref()
so all dockables are destroyed when a dock is destroyed.
2010-06-23 22:50:45 +02:00
Michael Natterer
ea050b267e app: don't leak all cached GtkTreeIters in container views
This is evil: the hash table of "insert_data" is created on demand
when GimpContainerView API is used, using a value_free_func that is
set in the interface_init functions of its implementors. Therefore, no
GimpContainerView API must be called from any init() function, because
the interface_init() function of a subclass that sets the right
value_free_func might not have been called yet, leaving the
insert_data hash table without memory management.

Call GimpContainerView API from GObject::constructed() instead, which
runs after everything is set up correctly.
2010-06-23 00:20:21 +02:00
Michael Natterer
a60463cd8e app: free one more list returned by gtk_container_get_children() 2010-06-23 00:19:44 +02:00