Commit Graph

256 Commits

Author SHA1 Message Date
74efea7e34 app: fix tooltips on the toolbox' color and image areas
we started overwriting our own tooltips with a NULL string when
getting rid of GtkAlignment.
2018-10-08 12:39:34 +02:00
Ell
3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
247cc12cec app: use a GtkFlowBox for the toolbox' color/foo/image areas
not perfect but much better than before.
2018-06-05 18:43:46 +02:00
885f66158a app: kill all except one GtkAlignment, the tag popup one is a bit tricky 2018-05-20 21:06:33 +02:00
5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
820d6fbe95 app: don't use "size-request" for the toolbox' wilber, it's gone 2018-05-20 21:06:29 +02:00
3b00ba8f06 app: remove some forgotten #undef GSEAL_ENABLE 2018-05-20 21:06:29 +02:00
dfa38fc26a app: remove obsolete device checks from GimpToolbox
The new code doesn't actually work properly, but the old one was
clearly bogus with GTK+ 3.x.
2018-05-20 21:06:28 +02:00
ad7fe94d86 app: use gdk_drag_context_get_selected_action() instead of conect->action 2018-05-20 21:06:28 +02:00
9c84e15484 app: put the toolbox' areas into a box until we decided about a wrapping widget 2018-05-20 21:06:27 +02:00
0f90d95ab4 app: use GdkDevice accessors 2018-05-20 21:06:27 +02:00
2ffda5a25d app: remove GtkWrapBox 2018-05-20 21:06:27 +02:00
172f607ac5 app: use GdkDeviceManager to list devices 2018-05-20 21:06:26 +02:00
3c8d9a1de8 app: use gtk_widget_get_preferred_size() instead of size_request() 2018-05-20 21:06:26 +02:00
99133bc271 app: port to GtkWidget::draw() 2018-05-20 21:06:26 +02:00
539927ebfa app: replace all g_assert() by the newly added gimp_assert()
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
2018-02-11 22:23:10 +01:00
0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
29456b96f9 Bug 744127 - Restore tab hover delay during drag-n-drops
Fix the return values of drag_motion() and drag_drop() callbacks.

Commit 7b85cf4de8 started mixing up
the two unrelated concepts

- the widgets has handled the event
- a drop here would do something / did something successfully

into one boolean value being both the function's return value and
a success indicator for the DND operation.

Untangle the concepts again by returning FALSE when
gimp_paned_box_will_handle_drag() returns TRUE (indicating that the
docking DND mechanism will kick in), and always returning TRUE
otherwise; and by using the state "drop was / would be successful"
only for calling gdk_drag_status() and gtk_drag_finish().

This way we make sure that:

- drag_leave() is called reliably again (because we return TRUE if no
  other widget will handle the event)
- drag data is freed reliably again (because we always call
  gtk_drag_finish())
2015-02-19 22:42:18 +01:00
d0a6d95dad app: remove a bunch of file-utils.h includes 2014-07-08 00:23:34 +02:00
0f8d84d5e9 app: port all file_open() and file_save() functions to GFile 2014-07-07 23:58:11 +02:00
7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
7e273bc6d0 Bug 686929 - Newly created toolbox is too tall and too narrow
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
2013-01-17 19:37:03 +01:00
819ad3b4d9 app: use g_object_bind_property() to set widget visibility
instead of connecting to "notify::boolean-property" of something just
to set "widget::visible" in the callback.
2012-10-31 23:17:47 +01:00
53cf2c657b app: move the GTK-free cairo utility functions to core/gimp-cairo.[ch] 2012-05-02 17:51:02 +02:00
867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
c166e494ce Bug 662948 - Wilber is squeezed
Separate Wilber sizing from GimpDock::set_host_geometry_hints()
because that method is never called in single-window mode.
2011-11-02 00:31:23 +01:00
11239c4b17 app: don't use g_list_length() to check if a list is empty 2011-10-09 00:27:53 +02:00
3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
1a8a806d43 app: Make GimpToolbox use parent UI manager
Make GimpToolbox and GimpToolPalette use the GimpUIManager and
GimpDialogFactory of the top container instead of holding references
on their own. If they hold references on their own, we need to update
these when we move e.g. GimpToolbox between different top level
containers such as GimpDockWindow and GimpImageWindow. Failure to do
this cased problems talked about in bug 646794 (case 2).
2011-08-07 20:00:28 +02:00
62b0e96609 app: add gimp_devices_add_widget()
which is supposed to set up a widget for tablet events and make sure
the context changes on device changes. "supposed" because everything
is currently horribly broken on GTK+ 2.x. Use the function for all
affected widgets except for the canvas.
2010-12-19 21:23:54 +01:00
60242667be app: don't use -1 for geometry hints where not allowed 2010-12-08 10:18:09 +01:00
0ba0b637f2 app: add gimp_devices_check_callback() with the signature of an event callback
and use it in the toolbox. Will soon be used in more places.
2010-12-06 10:23:15 +01:00
ef87b83ff0 app: change toolbox geometry hints to something that's closer to the docs
Feels more correct now when resizing, but not really.
2010-11-20 20:44:16 +01:00
74a09704ba app: some toolbox cleanup
Add precondition checks and assertions for needed members and remove
unused API.
2010-11-20 15:19:48 +01:00
e4a96c738e app: factor out duplicated code to gimp_tool_palette_get_button_size()
and use that function in GimpToolPalette and GimpToolbox.
2010-11-20 10:20:52 +01:00
281969b45d app: add GimpToolPalette which derives from GtkToolPalette
and move all of GimpToolbox' tool button code there.
2010-11-19 23:52:09 +01:00
628439bc31 app: simplify toolbox wilber drawing a lot 2010-10-15 16:03:36 +02:00
02abdff8aa app: move the wilber drawing functions to gimpcairo.c 2010-08-28 15:30:02 +02:00
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
6429c3de1b app: #undef GSEAL_ENABLE to build against the gtk-2-22 branch
GDK structs and objects have been sealed in gtk-2-22, but we can't
use the newly introduced accessors yet.
2010-05-30 17:19:47 +02:00
46ea197171 app: avoid the deprecated and sealed GTK_OBJECT_FLAGS() 2010-05-10 17:54:49 +02:00
7c042df739 app: use a GtkToolPalette for the grid of tools in the toolbox 2010-05-10 17:30:17 +02:00
520da707c1 app: Only show active dockables in dock window titles
Refactor stuff a bit so that the dock window description can be both
short and long. The short version only have the active dockables, and
the long version have all the dockables in the description string. We
use the short version for the window title and the long version for
the Recently Closed Docks menu items.
2010-03-13 20:02:55 +01:00
a915132ee6 app: Don't call the dock title a title, but "description"
Don't call the dock title a title, but "description". Title is an old
name from when a GimpDock was a GtkWindow.
2010-03-13 17:18:47 +01:00
3352b0485c app: Fix dockable separator translations
Continued fix of bug 554927. Also translate the " - " string in the
toolbox and add a "dock" translation context.
2010-03-13 12:17:46 +01:00
0279daed28 app: Make Toolbox dock title complete
Make the Toolbox dock title complete, i.e. if the toolbox dock
contains Tool Options, the title will be "Toolbox - Tool Options".
2010-03-05 21:31:07 +01:00
c094736f83 app: Remove accidentally commited g_printerr() 2010-01-22 21:00:17 +01:00
ba37aaa532 app: Support multi-column DnD in toolbox window
Add a drag handler to the toolbox so it's possible to create
multi-column docks in the toolbox dock window.
2010-01-22 20:48:34 +01:00
56a8cb68a8 app: Have dialog factory entries for the dock windows
Let dock windows have proper GimpDialogFactory entries. This allows us
to get rid of a lot of ugly mostly duplicated code. This also makes us
ready the merge the dock window and toolbox factories which will soon
be done. A few things should be noted:

 * We adjust the wrap box aspect ratio in the toolbox to avoid having
   the toolbox dock window explode

 * We make sure that we still can handle sessionrc files from GIMP 2.6
   and older
2010-01-19 22:24:17 +01:00