Commit Graph

2324 Commits

Author SHA1 Message Date
Michael Natterer 435feea20a app: use gimp_cairo_set_source_rgb() wheh setting a GimpRGB 2012-03-05 19:19:47 +01:00
Michael Natterer 0c236cbc48 app: don't draw the grid if it covers the image entirely
Regardless of the elaborate discussion in bug #599267, as soon as the
grid starts covering the image completely (when the is no more spacing
between grid lines), it is entirely useless, so skip drawing it.
2012-03-04 20:19:57 +01:00
Michael Natterer 71e8fc8c3a app: make sure undrawing the selection doesn't leave right/bottom pixel garbage
gimp_display_shell_mask_bounds(): transform the selection bounds with
sub-pixel precision and then apply floor()/ceil() accordingly.
2012-02-21 16:01:53 +01:00
Michael Natterer fbd746f95a app: don't rely on gtk_container_remove() to always destroy the child
Instead, either destroy the child instead of removing it, or remove
*and* destroy it in cases where the remove() api on the "parent"
doesn't match GTK+'s parent/child relation (like with all our dock
widgets). We can't rely on remove() to implicitly detstroy, because
there might be arbitrary other code holding references, such as
accessibility modules and whatnot. Most likely fixes unclear crashes
in accessibility code and other crashes we blamed GTK+ for.
2012-02-21 00:36:18 +01:00
Mikael Magnusson cd002dd0c6 app: remove two duplicated variable inits 2012-02-16 11:30:38 +01:00
Michael Natterer b3c8cbd5a5 app: remove all docks from GimpImageWindow in dispose()
Seems to fix irregularly occuring warnings on exit about dialogs
being still around.
2012-02-13 00:12:50 +01:00
Michael Natterer f70bc837fa app: remove gimpdisplay-utils.[ch], move its only function to gimpdisplay.[ch] 2012-02-11 17:57:27 +01:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer 0a68527edc app: move the GimpWindowStrategy interface from display/ to widgets/ 2012-01-30 23:33:21 +01:00
Michael Natterer 79a66d36d2 app: rename GimpWindowStrategy::create_dockable_dialog()
to ::show_dockable_dialog() because that's what it wlays does, no
matter if the dialog has to be created or now.
2012-01-30 22:59:09 +01:00
Michael Natterer 4aa866a8b9 Bug 664885 - Open 'Document History' --> always a additional history tab appears
In SWM, try to find an existing dialog in
gimp_single_window_strategy_create_dockable_dialog() before falling
back to creating a new one.
2012-01-30 22:53:43 +01:00
Martin Nordholts 64d2dc122a app: Add and use gimp_dialog_factory_find_widget() 2012-01-10 19:47:52 +01:00
Alexia Death c2d26d7e03 app: Keep canvas in place when image tabs show/hide 2012-01-04 22:09:07 +02:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer 51a8e66824 app: reduce nesting in gimp_display_shell_canvas_no_image_events() 2011-12-15 22:35:44 +01:00
Massimo Valentini bea8b93959 app: use projection and not image sizes
these are the same nearly always, but during
an image-scale, the image size is updated early
and expose redraw following dialog destruction
uses the projection before the scale.

Basically this patch partly restores the code
before commit 8b8e67ffe2
2011-12-11 17:11:25 +01:00
Michael Natterer 5046f167fd app: remove checks for grab time consistency
because tests need to be able to pass GDK_CURRENT_TIME here, which is
a legal argument to grab functions. Fixes distcheck.
2011-12-11 16:39:01 +01:00
Michael Natterer 8569c6e2f7 app: don't request motion hints on the canvas
They are a dark ages concept, and it's almost 2012.
2011-12-10 23:22:08 +01:00
Michael Natterer 022af2610e app: GimpDisplayShell: fix type of the new grab time members 2011-12-09 23:21:22 +01:00
Michael Natterer 7da455214d app: merge if() madness into one single even bigger madness 2011-12-09 22:34:44 +01:00
Alexia Death 5ec2bd7287 app: improve ignoring other buttons while one down 2011-12-09 23:27:18 +02:00
Michael Natterer 435b5b4386 app: move variable to local scope in gimp_display_shell_canvas_tool_events() 2011-12-09 20:54:24 +01:00
Michael Natterer ea49a7b466 app: ignore new button events on the canvas while another button is down
Fixes tons of possibly dangerous warnings, and likely some weird
crashes.
2011-12-09 20:53:11 +01:00
Michael Natterer 01f92a3b48 app: get rid of server grabs for almost all canvas interaction
Because it's generally the right thing to do, and server grabs broke
badly with input devices / client side windows.

gimpdisplayshell-grab.c: change logic to only server-grab if an event
is passed to the pointer grab/ungrab functions, but always use
gtk_grab_add/remove() which is sufficient in most cases.

gimpdisplayshell-tool-events.c: have the grab functions grab the
server only for space-bar scrolling and do all tool interaction,
including ruler clicks, with gtk_grab_add/remove(). Refactor things
a bit to also use the grab API for button-2 scrolling.

gimpdeviceinfo-coords.c: transform the event's coords to the canvas'
coordinate system, they might come from a ruler now.

This fixes the following bugs:

Bug 645315 - gimp_display_shell_pointer_grab: gdk_pointer_grab failed...
Bug 644351 - Gimp misses some strokes especially when drawing fast
Bug 645747 - Gimp is now unusable on xfce4
2011-12-09 20:20:02 +01:00
Michael Natterer 9781aa65ea Bug 658467 - Replace g_format_size_for_display() by g_format_size()
Use g_format_size() instead of g_format_size_for_display() because
the latter is deprecated.
2011-11-30 23:37:55 +01:00
Michael Natterer d38ded387d Bug 663121 - guides are below rotate/transform/shear/perspective preview
Add a canvas item group for previews, and a small preview infrastructure
to GimpDrawTool, and put the transform preview into the preview group,
which is below all guides, grid and layer boundaries.
2011-11-16 21:32:29 +01:00
Michael Natterer ffc9948d6e app: add a canvas group for tool items
so we can control where in the canvas item stack they appear.
Put the group right below the software cursor.
2011-11-16 21:10:43 +01:00
Mukund Sivaraman d9f1a9eec6 app: Drop redundant assignment 2011-10-12 19:02:49 +05:30
Mukund Sivaraman 6e4a5b1996 app (display): Drop redundant assignments 2011-10-11 10:29:55 +05:30
Michael Natterer 11239c4b17 app: don't use g_list_length() to check if a list is empty 2011-10-09 00:27:53 +02:00
Michael Natterer a38faefba7 app: use toggle_behavior_mask not CONTROL to trigger zoom-on-scroll 2011-10-07 00:00:42 +02:00
Michael Natterer 59f4396c7b app: use the toggle_behavior modifier instead of GDK_CONTROL_MASK
to switch between dragging a guide or a sample point from a ruler.
2011-10-06 21:10:18 +02:00
Michael Natterer e8250320d5 app: use gdk_event_triggers_context_menu() for the image menu
and clean up button event handling a bit.
2011-10-05 20:04:42 +02:00
Michael Natterer c18c21f651 app: treat Meta_L and Meta_R as tool-relevant modifiers
for the Mac, they are still unhandled by tools though.
2011-10-05 19:44:24 +02:00
Michael Natterer f1d4dde36a libgimpwidgets: add gdk_event_triggers_context_menu() to gimp3migration.[ch]
and remove gimp_button_event_triggers_context_menu() again. Update
all callers to use the new function.
2011-10-02 16:23:59 +02:00
Mukund Sivaraman e79f90d3b6 app: Fix assignment (may be confused as compound assignment) 2011-10-02 19:15:08 +05:30
Michael Natterer 2c175b068d libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:42 +02:00
Michael Natterer 19b9bfd189 libgimpwidgets: add gtk_scale_new() to gimp3migration.[ch]
and use it all over the place. Also change some GtkObject* variables
to GtkAdjustment*.
2011-10-02 14:36:41 +02:00
Michael Natterer 16817c666f libgimpwidgets: add gtk_scrollbar_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:41 +02:00
Michael Natterer 3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
Michael Natterer d92cd2f6c8 Add gimp_button_event_triggers_context_menu() and use it
instead of checking for event->button == 3, so context menus
work correctly on the Mac. Didn't change the image menu yet
because thet requires some more refactoring.
2011-09-19 00:47:23 +02:00
Michael Natterer ed00cff9d3 app: don't use image_window->menubar if it's NULL 2011-09-16 23:24:49 +02:00
Michael Natterer 9cfa0a5dde app: use a smaller icon for the image tabs' close button
Also make sure the visibility of the icon doesn't depend on
GTK+ settings by packing it manually.
2011-09-15 09:04:38 +02:00
Massimo Valentini 8b8e67ffe2 Bug 656129: Warnings: render_image_tile_fault: assertion `tile[4]... 2011-09-08 18:37:28 +02:00
Martin Nordholts 9f1187f6a5 app: Prefix TileManager functions
read_pixel_data() -> tile_manager_read_pixel_data()
write_pixel_data() -> tile_manager_write_pixel_data()
read_pixel_data_1() -> tile_manager_read_pixel_data_1()
write_pixel_data_1() -> tile_manager_write_pixel_data_1()

for consistency.
2011-09-07 12:08:43 +02:00
Martin Nordholts a11989542a app: Add a close button to image window tabs
It takes a bit more space, but it needs to be easy to close images.
2011-08-24 23:02:19 +02:00
Martin Nordholts b9ccf189b4 Bug 650348 - Window unmaximizes when a document is closed
Refactor GimpImageWindow session management. As far as session
management goes, there are four states and four transitions that are
interesting.

The states are:

 State    Window mode     Images opened
 ------------------------------------------
  s1          swm               0
  s2          swm              >0
  s3          mwm               0
  s4          mwm              >0

The transitions are:

  Transition     Description
 -------------------------------------------
      t1         Enter single-window mode (swm)
      t2         Enter multi-window mwm (mwm)
      t3         Open an image
      t4         Close an image

When thinking of it like this, it is pretty easy to see when to call
gimp_image_window_session_clear() and when to call
gimp_image_window_session_apply(). So kill
gimp_image_window_set_entry_id() and handle all transitions in
gimp_image_window_session_update().
2011-08-09 20:25:06 +02:00
Martin Nordholts dbf6b4d944 app: Fix warning 2011-08-05 01:51:56 +02:00
Martin Nordholts 3ce4c49314 app: Handle special case "Toolbox" in GimpSingleWindowStrategy
The special case isn't pretty, but the current design can't handle it
nicely. This is not the first special case for the toolbox.
2011-07-20 16:36:36 +02:00
Alexander Hämmerle 421ca4114e Bug 641187 - GIMP needs a left-handed cursor option
Add a cursor-handedness setting and flip the cursor when it's set to
left-handed.
2011-07-24 22:09:21 +02:00