Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
ba455761
Commit
ba455761
authored
Mar 19, 1998
by
Adrian Likins
Browse files
app/brushes.c: pathc from Andy Thomas to improve brsh loading via pdb
app/drawable.c: patch from gimp-hpux i missed yesterday... -adrian
parent
741884c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
ba455761
Thu Mar 19 14:13:33 EST 1998 Adrian Likins <adrian@gimp.org>
* applied patch from Andy Thomas to brushes.c to
improve brush loading via pdb. Fixes problems with
bruses of the same name.
Thu Mar 19 13:21:28 MET 1998 Sven Neumann <sven@gimp.org>
* docs/gimp_quick_reference.[tex|ps]: added a
...
...
app/brushes.c
View file @
ba455761
...
...
@@ -65,6 +65,8 @@ void
brushes_init
()
{
GSList
*
list
;
GBrushP
gb_start
=
NULL
;
gint
gb_count
=
0
;
if
(
brush_list
)
brushes_free
();
...
...
@@ -83,9 +85,39 @@ brushes_init ()
while
(
list
)
{
/* Set the brush index */
((
GBrush
*
)
list
->
data
)
->
index
=
num_brushes
++
;
list
=
g_slist_next
(
list
);
}
/* ALT make names unique */
GBrushP
gb
=
(
GBrushP
)
list
->
data
;
gb
->
index
=
num_brushes
++
;
list
=
g_slist_next
(
list
);
if
(
list
)
{
GBrushP
gb2
=
(
GBrushP
)
list
->
data
;
if
(
gb_start
==
NULL
)
{
gb_start
=
gb
;
}
if
(
gb_start
->
name
&&
gb2
->
name
&&
(
strcmp
(
gb_start
->
name
,
gb2
->
name
)
==
0
))
{
gint
b_digits
=
2
;
gint
gb_tmp_cnt
=
gb_count
++
;
/* Alter gb2... */
g_free
(
gb2
->
name
);
while
((
gb_tmp_cnt
/=
10
)
>
0
)
b_digits
++
;
/* name str + " #" + digits + null */
gb2
->
name
=
g_malloc
(
strlen
(
gb_start
->
name
)
+
3
+
b_digits
);
sprintf
(
gb2
->
name
,
"%s #%d"
,
gb_start
->
name
,
gb_count
);
}
else
{
gb_start
=
gb2
;
gb_count
=
0
;
}
}
}
}
...
...
app/drawable.c
View file @
ba455761
...
...
@@ -88,7 +88,7 @@ gimp_drawable_class_init (GimpDrawableClass *class)
gtk_signal_default_marshaller
,
GTK_TYPE_NONE
,
0
);
gtk_object_class_add_signals
(
object_class
,
drawable_signals
,
LAST_SIGNAL
);
gtk_object_class_add_signals
(
object_class
,
(
guint
*
)
drawable_signals
,
LAST_SIGNAL
);
object_class
->
destroy
=
gimp_drawable_destroy
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment