mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
app, etc: fix sessionrc from GIMP 3.0 to 3.2.
This commit is contained in:
@@ -931,16 +931,16 @@ user_update_controllerrc (const GMatchInfo *matched_value,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SESSIONRC_UPDATE_PATTERN \
|
#define SESSIONRC_UPDATE_PATTERN_2TO3 \
|
||||||
"\\(position [0-9]* [0-9]*\\)" "|" \
|
"\\(position [0-9]* [0-9]*\\)" "|" \
|
||||||
"\\(size [0-9]* [0-9]*\\)" "|" \
|
"\\(size [0-9]* [0-9]*\\)" "|" \
|
||||||
"\\(left-docks-width \"?[0-9]*\"?\\)" "|" \
|
"\\(left-docks-width \"?[0-9]*\"?\\)" "|" \
|
||||||
"\\(right-docks-width \"?[0-9]*\"?\\)"
|
"\\(right-docks-width \"?[0-9]*\"?\\)"
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
user_update_sessionrc (const GMatchInfo *matched_value,
|
user_update_sessionrc_2to3 (const GMatchInfo *matched_value,
|
||||||
GString *new_value,
|
GString *new_value,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpUserInstall *install = (GimpUserInstall *) data;
|
GimpUserInstall *install = (GimpUserInstall *) data;
|
||||||
gchar *original;
|
gchar *original;
|
||||||
@@ -1013,6 +1013,29 @@ user_update_sessionrc (const GMatchInfo *matched_value,
|
|||||||
return FALSE;
|
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 \
|
#define GIMPRC_UPDATE_PATTERN \
|
||||||
"\\(show-tooltips [^)]*\\)" "|" \
|
"\\(show-tooltips [^)]*\\)" "|" \
|
||||||
"\\(theme [^)]*\\)" "|" \
|
"\\(theme [^)]*\\)" "|" \
|
||||||
@@ -1362,6 +1385,12 @@ user_install_migrate_files (GimpUserInstall *install)
|
|||||||
/* We need to update size and positions because of scale
|
/* We need to update size and positions because of scale
|
||||||
* factor support.
|
* 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_pattern = SESSIONRC_UPDATE_PATTERN;
|
||||||
update_callback = user_update_sessionrc;
|
update_callback = user_update_sessionrc;
|
||||||
}
|
}
|
||||||
|
@@ -71,7 +71,7 @@
|
|||||||
(preview-size 32)
|
(preview-size 32)
|
||||||
(aux-info
|
(aux-info
|
||||||
(show-button-bar "true")))
|
(show-button-bar "true")))
|
||||||
(dockable "gimp-vectors-list"
|
(dockable "gimp-path-list"
|
||||||
(tab-style automatic)
|
(tab-style automatic)
|
||||||
(preview-size 32)
|
(preview-size 32)
|
||||||
(aux-info
|
(aux-info
|
||||||
|
Reference in New Issue
Block a user