Commit Graph

67 Commits

Author SHA1 Message Date
Jehan d46d26933b app, menus: rename all "vectors-" actions to "paths-".
Though these are not as user-facing as other strings, the action names
still are somewhat user-facing. Let's rename them consistently with the
GUI and the API.

This commit also handles user config migration so that custom shortcuts
are not lost.
2024-08-05 12:08:59 +02:00
Jehan bde350fc28 app: fix CRITICAL when GIMP3_DIRECTORY env variable is set.
When the config directory is set by an environment variable, the version is
likely not part of the directory path, and therefore strstr() would return NULL.

Fixes:

> (gimp-console-2.99:41446): GLib-CRITICAL **: 13:19:34.933: g_vsnprintf: assertion 'n == 0 || string != NULL' failed
2024-03-28 00:19:10 +01:00
Jehan 24b36379f0 app: migrate shortcut from select-float to select-cut-float.
See my previous commit.
2023-11-11 20:03:26 +01:00
Jehan cdc9fa9907 app: migrated (style solid) in gimprc.
Since MR !706, (style solid) doesn't exist anymore which makes gimprc parsing
fails (hence losing configuration).

This fixes:

> Gimp-Config-Message: 21:20:21.018: Error while parsing '/home/jehan/.config/GIMP/2.99/gimprc' in line 18: invalid value 'solid' for token style
> Gimp-Config-Message: 21:20:21.018: There was an error parsing your 'gimprc' file. Default values will be used. A backup of your configuration has been created at '/home/jehan/.config/GIMP/2.99/gimprc~'.
2023-06-22 21:30:13 +02:00
Jehan 817ee1c660 app, docs, etc.: transform menurc in shortcutsrc after an update.
Also get rid of various old references to menurc and don't install it anymore to
etc/ (neither the new shortcutsrc as it doesn't look like it brings much value
to do so).
2023-04-12 22:07:09 +02:00
Jehan 42bc6ba1c0 app: fix ignoring paths with parentheses.
I had the case of a path with parentheses in the folder name. Just don't assume
any character should not be in a path.
2023-04-12 22:07:09 +02:00
Jehan b46fafb3a0 app: also get rid of "dynamics-expanded" config property when migrating. 2022-02-03 23:29:11 +01:00
Asalle 614e1c6b4c app: make dynamics tool options a checkbox
Fixes #4333

If the checkbox is unchecked: dynamics falls back to "Dynamics Off",
the current dynamics name and its options are hidden in the UI.

If the checkbox is checked: dynamics is set to previously used one
or the default one, all dynamics options are seen in the UI.
2022-02-03 20:33:45 +01:00
Jehan f888a6f2f0 app: update menurc migration.
- Migrate "view-rotate-reset" to "view-reset" (there is a
  "view-rotate-reset" in GIMP 3, but it will be only for rotate; what
  was really doing the same-named action in 2.10 is now what
  "view-reset" does).
- Make sure we don't migrate "file-export" from a 2.10 config. From a
  2.8 or below, we don't to migrate it (same as for 2.8 to 2.10), but in
  a 2.10 config, it is already the same action as the one in GIMP 3.
2021-08-23 19:10:27 +02:00
Jehan 753e994e1d app: forgot to also properly migrate the docks size.
Same as last commit, avoiding to end up with twice too big docks.
2021-08-23 13:57:38 +02:00
Jehan c43de62e99 app: config folder migration update for GIMP 3.
Fix the search for previous folders, which was broken as it was
specifically expecting 1-digit numbers so far.

The differences of the GIMP 3 config import are:

- update sizes and positions in the sessionrc according to the scale
  factor, because GTK2 doesn't have scale support. It means that, e.g.
  with a 2× display, all sizes and positions in GIMP 2.x must be divided
  by 2 (otherwise the first thing many people will get when testing GIMP
  3 for the first time is an off-screen window).
  Of course, I even wondered if it would not be nice to just drop the
  sessionrc altogether and start with a nice blank slate, but then you
  also lose the opened dock and their organization and some settings
  (such as whether you chose single or multi window mode, etc.).
- scripts/ and plug-ins/ are not imported. Probably makes no sense so
  far as they would end up broken (but maybe it's not true for all
  script-fu scripts?).
2021-08-23 13:37:11 +02:00
Ell 1846764d3b app: include system gimp.css file in theme.css
Include the system-wide gimp.css file, in addition to the user-
specific gimp.css file, in the generated theme.css file, instead of
copying the former into the latter when creating the user's
gimpdir.  This allows us to modify the system-wide gimp.css file,
and having the changes take effect in existing installations.
2019-03-27 20:14:10 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 19528a61fe app: copy gimp.css instead of gtkrc to the user's gimp directory
Also, don't migrate gtkrc files from older gimp versions.
2018-05-20 21:06:28 +02:00
Jehan 063a83c1ec app: migrate configuration files for s/Blend/Gradient/ tool renaming.
This includes migrating properly any custom shortcut (menurc), as well
as a few strings in tool-presets/, and finally "gimp-blend-tool" in
contextrc and devicerc.
File toolrc also has some occurrences, but we are already skipping it
anyway, same as whatever is under tool-options/.
Hopefully I missed nothing.
2018-04-14 04:01:32 +02:00
Jehan 0009794d9d app: migrate tool-presets with s/GimpImageMapOptions/GimpFilterOptions/.
As requested!
2018-04-05 11:46:49 +02:00
Jehan d89ed759ef app: small logics improvement.
Current migration code would still return TRUE for success if the copy
of a regular file failed for any reason.
Also getting rid of some weird block and making sure we free dirname
only when it has been assigned a value.
2017-12-27 04:10:57 +01:00
Jehan f14be48e74 app: protect user_install_dir_copy() against infinite recursivity.
When recursively browsing folders, there is always the risk of infinite
recursivity, in particular with symbolic links which can create loops.
Let's just assume that we don't have any data over 5 levels of
directories to avoid a security risk.
2017-12-27 03:56:53 +01:00
Jehan cdfffc6924 app: add some warning for code which should not happen. 2017-12-26 17:47:05 +01:00
Jehan 88f33dc0b3 Bug 791934 - gimpressionist contains 2 identical brushes.
paintbrush.pgm and paintbrush01.pgm are binary identical. If they were
brushes we ship as data, that would be more annoying because they could
be used in scripts or in various other places. But here it looks they
are used for gimpressionist plug-in only, which means they are probably
not used in some random script. All it takes is probably only to
properly migrate gimpressionist presets.
Presets using "paintbrush.pgm" will be migrated to use
"paintbrush01.pgm" instead.
2017-12-26 17:39:30 +01:00
Jehan cf67441782 app: make user_install_dir_copy() recursive.
In particular, I noticed that some data can be on 2 levels (or more?).
For instance gimpressionist presets were not migrated from 2.8 to 2.9
because of this.
2017-12-26 16:46:33 +01:00
Jehan 5aa9428445 app: migrate plug-in-gauss shortcuts to filters-gaussian-blur.
Since commit ff59aebbe8, blur-gauss plug-in and the associated
"plug-in-gauss" action don't exist anymore. Migrate any custom shortcut
to "filters-gaussian-blur", which is the expected replacement.
See also bug 775931.
2017-12-05 02:07:16 +01:00
Jehan 482b907cb7 app: reorder alphabetically changed action paths in migration code.
This allows for easier code reading and changing.
2017-12-05 02:07:16 +01:00
Jehan 0dbdf232d5 app, menus: rename confusing layers-text-tool and vectors-path-tool.
"layers-text-tool" action shows as "Text Tool" while "vectors-path-tool"
shows as "Path Tool". That's very confusing with tools-text and
tools-vectors respectively.
These actions are mostly about entering in edit mode with the active
layer or path. For text layers, it will enter text edition on canvas,
whereas just open the attributes edition dialog on other layers. For
consistency, layers-text-edit is renamed as well too layers-edit-text.
This also fix the side effect of commits 10099bd and 526918b where I
didn't realize that layers-text-tool was also working on non text layers
on purpose (being very badly named). Now there is a separate layers-edit
and layers-edit-text.
Thanks to Pat David for English corrections. :-)
2017-05-16 00:04:24 +02:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Michael Natterer 2a9b20d384 Bug 772789 - Mac DMG 2.8.18 gets plug-ins path wrong, can't open JPEG files
Don't migrate any paths from an older gimprc. This unfortunately kills
all manually added paths, but makes sure all paths default to the
files of the new GIMP version, could be improved by parsing the path
and replacing only the right elements.
2016-11-07 17:04:05 +01:00
Michael Natterer 557965e593 app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile
migration code for importing old menurc files.
2016-09-19 12:15:39 +02:00
Michael Natterer 20a32d970d Bug 599573 - Remember dialog defaults between Gimp sessions
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.

This requires most of the stuff in my last few commits, and some
more changes:

GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
2016-09-14 01:27:42 +02:00
Jehan 59f4ee55c9 app: do not migrate theme settings.
Themes from 2.8 and before are not fully compatible with 2.10.
In particular, embedded icons would not work and you would end up with
the Symbolic icon theme (light colors), which may not work well with a
custom theme.
It is better to reset to the new defaults upon migration and users can
still try and configure the theming afterwards if they wish.
2016-03-25 21:43:58 +01:00
Jehan ea13e816ab Bug 750105 - Migrating 2.8 themes to 2.9/2.10
Old themes should not be copied over to the GIMP 2.9/2.10 config at
first launch since they won't be compatible anyway. Let's go the less
painful way by dropping old themes rather than trying to salvage themes
which we know will be broken by design.
2016-01-19 22:36:27 +01:00
Benoit Touchette 6762bf5b9b Bug 759105 - Patch to add icon theme selection
Add support for custom icon themes much like custom theme
support. There is still work to be done but this is the
basic functionality.
2015-12-09 12:50:15 +01:00
Jehan 5f5c3db3ca app: migration from "control" to "primary" in controllerrc.
Since commit e50103c, we use the more generic "primary", allowing better
support for OSX "cmd" instead of X11/Win "ctrl".
2015-09-09 02:17:31 +02:00
Jehan 5cc77960c0 app: file-export and file-export-to migration were broken...
since commit 23d0eb1.
2015-09-09 02:17:31 +02:00
Jehan 23d0eb16d1 app: update user shortcuts to updated tools-value-[1-4]-* actions.
Commit 0bdb747 changed these action to more user-friendly names. Make
sure we update the user menurc to save any of their customization.
2014-04-21 10:57:30 +12:00
Jehan 7ef45be890 app: handle migration on OSX of GIMP 2.8.2's config folder.
GIMP 2.8.2's config was "~/Library/Gimp/x.y", before it got moved to
"~/Library/Application Support/x.y" and after being saved in the home
like other UNIXes. The migration code will now check all 3 places in the
right order on OSX.
Thanks to Simone Karin Lehmann for the original proposition.
2013-12-05 11:48:20 +13:00
Jehan 4b14ed2e5e file-export* labels and actions renamed.
Follows updated save+export specification.
For renamed actions (file-export and file-export-to respectively to
file-export-as and file-export to mimick file-save*), menurc from
GIMP 2.8 will be correctly migrated.
2013-11-18 09:07:32 +13:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer efe01acb5d app: formatting cleanup in the last commits, and a format string fix 2012-12-12 11:29:00 +01:00
Jehan 78b2778357 config: migration infrastructure to update configuration files.
This is a generic system based off regular expressions so it can be used
for any configuration file.
Some of the use cases would be for instance to clean out outdated custom
actions (hence remove some loading burden), or rename them (so that
users don't lose their customization if we rename actions), etc.
2012-12-12 16:48:13 +09:00
Jehan 60e0cfe55c Bug 166643 - gimp support for the XDG basedir spec
New configuration directory scheme, consistent across platforms, and
following standards.

UNIX platforms (except OSX): $XDG_CONFIG_HOME/GIMP/{GIMP_APP_VERSION}
Windows: %APPDATA%/GIMP/{GIMP_APP_VERSION}
OSX: NSApplicationSupportDirectory/GIMP/{GIMP_APP_VERSION}
2012-11-11 17:55:31 +01:00
Kevin Cozens a2e037fb00 Corrected spelling errors spotted by Ari Pollak (Mostly fixes bug #683694)
Still need to address the "allows to" grammatical error.
2012-09-10 12:22:12 -04:00
Michael Natterer 9112d68488 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
2012-05-12 14:39:44 +02:00
Michael Natterer ab42466282 app: add a "filters" subdir on user install 2012-05-02 17:50:48 +02:00
Michael Natterer e0e2befd17 Bug 651462 - On first attempt to save tool preset, stops with an error
Create the "tool-presets" directory in gimp-user-install.
2011-06-23 19:21:08 +02:00
Barak Itkin 18b9ba1c87 app: Add some comment documentation to code 2011-02-07 03:29:23 +02:00
Michael Natterer 885d4e968a Make sure user-install always creates all needed directories
Always run user_install_create_files(), even if
user_install_migrate_files() was run before, but make sure not to
overwrite stuff that has been copied by user_install_mirgate_files().
2009-10-15 21:23:01 +02:00
Michael Natterer 8be598e029 Create the dynamics directory 2009-10-11 01:34:48 +02:00
Aurimas Juška 6575913f12 added support for tag translation, user installation and migration procedures for tags.xml.
svn path=/trunk/; revision=28045
2009-02-17 18:43:32 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann ecccddd372 use GIMP_MINOR_VERSION to determine the version to migrate from.
2008-10-09  Sven Neumann  <sven@sven>

	* app/core/gimp-user-install.c (gimp_user_install_detect_old):
	use GIMP_MINOR_VERSION to determine the version to migrate from.


svn path=/trunk/; revision=27192
2008-10-09 13:24:50 +00:00