1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-05 21:02:42 +02:00

app, etc: fix sessionrc from GIMP 3.0 to 3.2.

This commit is contained in:
Jehan
2025-07-07 20:01:47 +02:00
parent 082a88d02d
commit a0ca190ca9
2 changed files with 37 additions and 8 deletions

View File

@@ -931,16 +931,16 @@ user_update_controllerrc (const GMatchInfo *matched_value,
return FALSE;
}
#define SESSIONRC_UPDATE_PATTERN \
"\\(position [0-9]* [0-9]*\\)" "|" \
"\\(size [0-9]* [0-9]*\\)" "|" \
"\\(left-docks-width \"?[0-9]*\"?\\)" "|" \
#define SESSIONRC_UPDATE_PATTERN_2TO3 \
"\\(position [0-9]* [0-9]*\\)" "|" \
"\\(size [0-9]* [0-9]*\\)" "|" \
"\\(left-docks-width \"?[0-9]*\"?\\)" "|" \
"\\(right-docks-width \"?[0-9]*\"?\\)"
static gboolean
user_update_sessionrc (const GMatchInfo *matched_value,
GString *new_value,
gpointer data)
user_update_sessionrc_2to3 (const GMatchInfo *matched_value,
GString *new_value,
gpointer data)
{
GimpUserInstall *install = (GimpUserInstall *) data;
gchar *original;
@@ -1013,6 +1013,29 @@ user_update_sessionrc (const GMatchInfo *matched_value,
return FALSE;
}
#define SESSIONRC_UPDATE_PATTERN \
"\"gimp-vectors-list\""
static gboolean
user_update_sessionrc (const GMatchInfo *matched_value,
GString *new_value,
gpointer data)
{
gchar *original;
original = g_match_info_fetch (matched_value, 0);
if (g_strcmp0 (original, "\"gimp-vectors-list\"") == 0)
{
/* Renamed in GIMP 3.2. */
g_string_append (new_value, "\"gimp-path-list\"");
}
g_free (original);
return FALSE;
}
#define GIMPRC_UPDATE_PATTERN \
"\\(show-tooltips [^)]*\\)" "|" \
"\\(theme [^)]*\\)" "|" \
@@ -1362,6 +1385,12 @@ user_install_migrate_files (GimpUserInstall *install)
/* We need to update size and positions because of scale
* factor support.
*/
update_pattern = SESSIONRC_UPDATE_PATTERN_2TO3;
update_callback = user_update_sessionrc_2to3;
}
else if (strcmp (basename, "sessionrc") == 0)
{
/* sessionrc updates since 3.0. */
update_pattern = SESSIONRC_UPDATE_PATTERN;
update_callback = user_update_sessionrc;
}

View File

@@ -71,7 +71,7 @@
(preview-size 32)
(aux-info
(show-button-bar "true")))
(dockable "gimp-vectors-list"
(dockable "gimp-path-list"
(tab-style automatic)
(preview-size 32)
(aux-info