Commit Graph

1561 Commits

Author SHA1 Message Date
Jehan f861585051 libgimpwidgets: entry width of gimp_prop_size_entry_new() is too small.
One cannot just use the min/max values since the precision digits must
also be accounted for (as well as one additional character for the
decimal separator).
Current implementation is not perfect yet because GimpSizeEntry code
itself does not yet use gimp_unit_get_scaled_digits(). Moreover the
entry size could be updated when changing units (or the original size
be actually based of the bigger width considering every possible unit).
2017-03-23 02:45:47 +01:00
Michael Natterer 461d807b05 libgimpwidgets: order enum combos of GimpDesaturateMode more logically
This is a bad hack that hardcodes a special case for
GIMP_TYPE_DESATURATE_MODE right into gimp_prop_enum_combo_box_new(),
we should think of something better if we get more special cases.
2017-03-17 22:50:12 +01:00
Michael Natterer e2ff186861 Bug 779942 - Make GimpPickButton honor monitor profile
Pass the right flags to gimp_color_transform_new(), and handle a NULL
return value.
2017-03-13 09:06:00 +01:00
Michael Natterer 064c4527cb Bug 779942 - Make GimpPickButton honor monitor profile
Convert the picked pixel from the monitor color profile to sRGB.
Only changed the default impl, not the quartz code.
2017-03-12 23:30:03 +01:00
Michael Natterer 4a75f33c07 libgimpwidgets: s/"document-open"/GIMP_ICON_DOCUMENT_OPEN/ in GimpFileEntry 2017-03-10 23:00:04 +01:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 91e861adcc libgimpwidgets, *: deprecating stock IDs for good, part one...
Remove all stock items added since 2.8, restore accidentially removed
ones, and rename the newly added GIMP_STOCK_* defines to GIMP_ICON_*.

(will move to having GIMP_ICON_* defines instead of magic hardcoded
strings for all icons).
2017-02-28 19:31:27 +01:00
Ell 2cb26a040a libgimpwidgets: invalidate the rulers' backdrop when the widget style is changed
... in particular, when swithcing themes.

Otherwise, the rulers keep their old, mismatched, style, until the
ticks are updated.
2017-02-27 05:03:59 -05:00
Michael Natterer b119fc995a libgimpwidgets: show help buttons in dialogs again
GimpDialog's "help-id" property didn't have G_PARAM_CONSTRUCT.

Broken since commit a940300525.
2017-02-12 16:32:41 +01:00
Michael Natterer 40981f43cf libgimp*: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer eb9981e5e4 libgimpwidgets: add gimp_screen_get_color_profile()
and use it in gimp_widget_get_color_profile(). Will soon be used in
screenshot too.
2017-01-31 18:58:27 +01:00
Hartmut Kuhse 66bc98d299 Revert "New GimpMetadata as subclass of GExiv2Metadata"
This reverts commit 3ab08c8bfd.
2017-01-03 19:36:22 +01:00
Hartmut Kuhse 3ab08c8bfd New GimpMetadata as subclass of GExiv2Metadata 2017-01-03 19:26:35 +01:00
Øyvind Kolås c9520bae6d libgimpwidgets: make color chooser scales range to 100.0 instead of 255
Still using perceptual TRC - making 50% middle gray.  This for all of 8bit and
16bit integer, as well as for floating point precisions. Also added a decimal point, to make use of more precision for both RGB and HSV entries.
2016-12-30 17:45:00 +01:00
Ell 3c2b4df6e6 libgimpwidgets: handle invalid enum values in gimp_enum_store_set_icon_prefix()
If the store has invalid enum values the function segfaults,
instead of just ignoring them.  We use -1 to represent separator
rows in the layer mode combo; if we end up adding icons to this
combo, we need it... not to segfault.  Since this is public API,
it should probably be prepared to handle such uses regardless.
2016-12-28 19:51:16 -05:00
Michael Natterer 956d45bf61 libgimpwidgets: add property GimpCellRendererToggle:override-background
which makes the cell paint its background color even when the row is
selected.
2016-10-29 16:47:36 +02:00
Michael Natterer 8e65aca452 Bug 773334 - GimpColorScale's scrolling behaviour is inverted...
...(scroll up decreases the value)

Implement GtkWidget::scroll_event() and turn GDK_SCROLL_UP into RIGHT
and DOWN into LEFT. The default behaviour or good for scrollbars but
not for widgets where "right" == "higher value" == "up" like
GimpColorScale.
2016-10-23 18:38:06 +02:00
Jehan 15d9f4a354 icons, libgimpwidgets: delete "gimp-path-(new|up|down|delete)" icons.
Commit 82737bf got rid of the only pieces of code where these icons were
used. Since they were never available in any version release of GIMP,
let's delete them from libgimpwidgets API as well.
2016-10-02 19:48:48 +02:00
Michael Natterer 12cb09836a Bug 772303 - preferences > folders don't have tooltips
Add tooltips to all buttons and indicators of GimpFileEntry and
GimpPathEditor.
2016-10-01 21:44:59 +02:00
Michael Natterer 82737bf904 libgimpwidgets: don't use GIMP-specific icons for GimpPathEditor
These are file search paths, not vector shape paths, so the new icons
were using the wrong metaphor.

This reverts the only functional part of commit
92a9117ae0, we should
probably get rid of the icons too (they are now unused).
2016-10-01 21:14:03 +02:00
Michael Natterer e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +02:00
Michael Natterer a898f22cce libgimpwidgets: don't chain up in gimp_frame_size_allocate()
We completely replace GtkFrame's implementation here, and chaining up
caused an infinite loop in the widget layout apparatus in some cases.

This reverts 53f34ebc0b for this file.
2016-09-30 19:25:10 +02:00
Michael Natterer e909b77969 Bug 771851 - Vertical ruler shows artifacts if the status bar isn't showing
gimp_ruler_draw_pos(): when remembering the just drawn rectangle's
position, don't just unconditionally overwrite the previous position's
rectangle. Instead, if the previous position's rectangle has not been
cleared yet (has a non-zero size), remember the union of old and new
rectangle.

Why this only happened to the vertical ruler with statusbar off is
beyond my mind, it should have always produced artifacts.

Unrelated: make sure the idle function is removed if we decide to
immediately redraw in gimp_ruler_set_position().
2016-09-22 23:10:10 +02:00
Jehan 7a5d0810a3 icons: "gimp-print-resolution" icons better fit "document-print".
Also alias GIMP_STOCK_PRINT_RESOLUTION to "document-print" until we
get a proper icon for it.
2016-09-13 23:49:26 +02:00
Jehan 75e97a23f3 icons, libgimpwidgets: gimp-buffer icons renamed to edit-copy...
... and GIMP_STOCK_BUFFER redefined to "edit-paste", half-reverting
commit cb7d93d (except we use standard Freedesktop icon naming instead
of the GTK stock name).
The gimp-buffer icon was indeed definitely looking like a typical copy
icon, which was missing, and this has priority over a buffer icon.
2016-09-12 03:53:17 +02:00
Michael Natterer 57d0c89818 libgimpwidgets: stop using GTK_TYPE_HSCALE
Use GTK_TYPE_SCALE with orientation = HORIZONTAL instead.
2016-09-09 21:52:09 +02:00
Timm Bäder 53f34ebc0b Chain up in some size-allocate implementations
The default implementation does just the right thing for most widgets.
2016-09-09 21:31:09 +02:00
Michael Natterer 64a93c6051 libgimpwidgets: merge a small GimpRuler optimization from gtk3-port
In size_allocate(), call gimp_ruler_make_pixmap() only if the widget
was resized, not only moved around.
2016-09-09 10:02:53 +02:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Michael Natterer d78d4ce82b libgimpwidgets: add gtk_label_set,get_x,yalign() to gimp3migration.[ch]
They are deprecated in GTK+ 3.x and cause tons of warnings, now we can
port calls to gtk_misc_set_alignment(label) to the new API and have
the same code in master and gtk3-port.
2016-09-08 18:56:44 +02:00
Michael Natterer 4033415a79 app, libgimpwidgets, plug-ins: kill gtk_scrolled_window_add_with_viewport()
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
2016-09-07 20:12:28 +02:00
Michael Natterer f91a19b1ef libgimpwidgets: merge some GimpColorButton API from gtk3-port 2016-09-07 02:22:57 +02:00
Jehan ab328ec79a libgimpwidgets: bring back GIMP_STOCK_EDIT as "gtk-edit".
Commit c6f1761 deletes a stock item id. But this is also part of our API
and cannot be deleted. Yet since the associated label ("_Edit") is
identical to the one for GTK_STOCK_EDIT, we can simply redefine it
to "gtk-edit".
Ideally we would also add a deprecation warning when this macro is used,
but I can't find a good way to add deprecation on macros.
2016-09-06 03:17:09 +02:00
Jehan c6f1761af7 icons, app, libgimpwidgets: replace GIMP_STOCK_EDIT with GTK_STOCK_EDIT. 2016-09-05 02:53:51 +02:00
Michael Natterer 7ce538b85f libgimpwidgets: store profile locations as config paths in profilerc
so we can potentially ship profiles and they will be found reliably,
and users can store profiles in their gimpdir. Still parses the old
uri-based locations.
2016-09-04 15:12:38 +02:00
Jehan 6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
Michael Natterer 44010beaed libgimpwidgets: use gimp_config_path_unexpand() in gimp_prop_file_choose_button
instead of a plain g_filename_to_utf8(), so special paths like
${gimp_dir}, ${gimp_plug_in_dir} etc get substituted correctly.
2016-09-02 20:47:51 +02:00
Michael Natterer 9317952375 libgimpwidgets: call gimp_file_entry_set_filename() with filename encoding
GimpPathEditor wass passing an UTF-8 string.
2016-09-02 20:44:43 +02:00
Massimo Valentini 3cc77b03bf Bug 759904: Some icons can't be set from the icon theme
make it possible to use themed standard named icons
so to have also gtk dialogs show icons in the same style
as GIMP ui.
2016-09-02 12:30:49 +02:00
Michael Natterer 87f14fbdbc libgimpwidgets: support enums with mnemonics in GimpEnumStrore
Strip the '_' away, combo boxes don't have mnemonics.
2016-08-15 21:57:34 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan 93d9265f0a libgimpwidgets: $XDG_DATA_HOME/icc/ is a common profile storage.
Even though many documentations will tell of $XDG_DATA_HOME/color/icc/,
some programs actually store color profiles in $XDG_DATA_HOME/icc/.
This is at least the case for GNOME color management.
Test it after $XDG_DATA_HOME/color/icc/ but before $HOME/.color/icc/.
2016-06-13 03:16:59 +02:00
Jehan 1056016e67 icons, libgimpwidgets: s/gimp-justify-block/gimp-justify-fill/.
We may have to rename them later into standard GTK+ names.
But anyway, the right name would be (gtk|gimp)-justify-fill.
Cf. bug 759904.
2016-06-10 15:13:36 +02:00
Jehan eef30a2702 icons, libgimpwidgets: s/gimp-intend/gimp-indent/. 2016-06-10 13:50:47 +02:00
Jehan c9217ca386 libgimpwidgets: s/GIMP_STOCK_FILE_MANGER/GIMP_STOCK_FILE_MANAGER/...
... and a few missing include to gimpicons.h.
2016-06-10 13:50:47 +02:00
klausstaedtler cb7d93d556 icons: Bug 759904
add
gimp-buffer

remove
gimp/libgimpwidgets/gimpicons.h:#define GIMP_STOCK_BUFFER                   GTK_STOCK_PASTE

patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler f87a8d27dd icons: Bug 759904
add
gimp-justify-block
gimp-justify-center
gimp-justify-left
gimp-justify-right

patch
gimpicons.c
gimpicons.h


to get active and replace gtk-justify-*
'gimp/app/tools/gimptextoptions.c:  box = gimp_prop_enum_icon_box_new (config, "justify", "gtk-justify", 0, 0);
must be patched
2016-06-10 13:50:46 +02:00
klausstaedtler 1199a7e6fb icons: Bug 759904
add
gimp-document-recent


patch: replace "document-open-recent" by "gimp-document-recent" (or GIMP_STOCK_DOCUMENT_RECENT)


gimp/app/dialogs/dialogs.c:            N_("History"), N_("Document History"), "document-open-recent",
gimp/app/actions/documents-actions.c:  { "documents-popup", "document-open-recent",
gimp/app/actions/dialogs-actions.c:  { "dialogs-document-history", "document-open-recent",


patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler b79e754480 icons: Bug 759904
add
gimp-open

patch: replace "document-open" by "gimp-open" (or GIMP_STOCK_OPEN)

gimp/plug-ins/imagemap/imap_browse.c:   icon = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_BUTTON);
gimp/libgimpwidgets/gimpfileentry.c:  image = gtk_image_new_from_icon_name ("document-open", GTK_ICON_SIZE_BUTTON);
gimp/app/actions/text-editor-actions.c:  { "text-editor-load", "document-open",
gimp/app/actions/vectors-actions.c:  { "vectors-import", "document-open",
gimp/app/actions/patterns-actions.c:  { "patterns-open-as-image", "document-open",
gimp/app/actions/documents-actions.c:  { "documents-open", "document-open",
gimp/app/actions/brushes-actions.c:  { "brushes-open-as-image", "document-open",
gimp/app/actions/text-tool-actions.c:  { "text-tool-load", "document-open",
gimp/app/actions/file-actions.c:      entries[i].icon_name      = "document-open";
gimp/app/widgets/gimpsettingsbox.c:                                     "document-open",
gimp/app/widgets/gimpsettingseditor.c:                            "document-open",

patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00
klausstaedtler 62a4a714dc icons: add missing gimp-pattern
patch
gimpicons.c
gimpicons.h
2016-06-10 13:50:46 +02:00