Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GIMP
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2,016
Issues
2,016
List
Boards
Labels
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GIMP
Commits
efe43200
Commit
efe43200
authored
Nov 15, 2012
by
Jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 688380 : drop-down in animation playback to select the default frame disposal.
parent
e42ff36d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
8 deletions
+36
-8
plug-ins/common/animation-play.c
plug-ins/common/animation-play.c
+36
-8
No files found.
plug-ins/common/animation-play.c
View file @
efe43200
...
...
@@ -50,9 +50,8 @@
typedef
enum
{
DISPOSE_UNDEFINED
=
0x00
,
DISPOSE_COMBINE
=
0x01
,
DISPOSE_REPLACE
=
0x02
DISPOSE_COMBINE
=
0x00
,
DISPOSE_REPLACE
=
0x01
}
DisposeType
;
...
...
@@ -74,6 +73,8 @@ static void rewind_callback (GtkAction *action);
static
void
speed_up_callback
(
GtkAction
*
action
);
static
void
speed_down_callback
(
GtkAction
*
action
);
static
void
speed_reset_callback
(
GtkAction
*
action
);
static
void
framecombo_changed
(
GtkWidget
*
combo
,
gpointer
data
);
static
void
speedcombo_changed
(
GtkWidget
*
combo
,
gpointer
data
);
static
void
fpscombo_changed
(
GtkWidget
*
combo
,
...
...
@@ -143,6 +144,7 @@ static GimpImageBaseType imagetype;
static
guchar
*
palette
;
static
gint
ncolours
;
static
gint
duration_index
=
3
;
static
DisposeType
default_frame_disposal
=
DISPOSE_COMBINE
;
static
gint
default_frame_duration
=
100
;
/* ms */
...
...
@@ -157,6 +159,7 @@ static GtkWidget *shape_window = NULL;
static
GdkWindow
*
root_win
=
NULL
;
static
gboolean
detached
=
FALSE
;
static
GtkWidget
*
speedcombo
=
NULL
;
static
GtkWidget
*
frame_disposal_combo
=
NULL
;
MAIN
()
...
...
@@ -586,6 +589,7 @@ build_dialog (GimpImageBaseType basetype,
GdkCursor
*
cursor
;
gchar
*
name
;
gint
index
;
gchar
*
text
;
gimp_ui_init
(
PLUG_IN_BINARY
,
TRUE
);
...
...
@@ -659,8 +663,6 @@ build_dialog (GimpImageBaseType basetype,
for
(
index
=
0
;
index
<
9
;
index
++
)
{
gchar
*
text
;
/* list is given in "fps" - frames per second */
text
=
g_strdup_printf
(
_
(
"%d fps"
),
get_fps
(
index
));
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
speedcombo
),
text
);
...
...
@@ -681,8 +683,6 @@ build_dialog (GimpImageBaseType basetype,
for
(
index
=
0
;
index
<
7
;
index
++
)
{
gchar
*
text
;
text
=
g_strdup_printf
(
"%g
\303\227
"
,
(
100
/
get_duration_factor
(
index
))
/
100
);
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
speedcombo
),
text
);
g_free
(
text
);
...
...
@@ -715,6 +715,27 @@ build_dialog (GimpImageBaseType basetype,
"/anim-play-popup/speed-reset"
);
gtk_action_set_sensitive
(
action
,
FALSE
);
/* Set up the frame disposal combo. */
frame_disposal_combo
=
gtk_combo_box_text_new
();
/* 2 styles of default frame disposals: cumulative layers and one frame per layer. */
text
=
g_strdup
(
_
(
"Cumulative layers (combine)"
));
gtk_combo_box_text_insert_text
(
GTK_COMBO_BOX_TEXT
(
frame_disposal_combo
),
DISPOSE_COMBINE
,
text
);
g_free
(
text
);
text
=
g_strdup
(
_
(
"One frame per layer (replace)"
));
gtk_combo_box_text_insert_text
(
GTK_COMBO_BOX_TEXT
(
frame_disposal_combo
),
DISPOSE_REPLACE
,
text
);
g_free
(
text
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
frame_disposal_combo
),
default_frame_disposal
);
g_signal_connect
(
frame_disposal_combo
,
"changed"
,
G_CALLBACK
(
framecombo_changed
),
NULL
);
gtk_box_pack_end
(
GTK_BOX
(
hbox
),
frame_disposal_combo
,
FALSE
,
FALSE
,
0
);
gtk_widget_show
(
frame_disposal_combo
);
gtk_widget_show
(
window
);
/* let's get into shape. */
...
...
@@ -1187,6 +1208,13 @@ speed_reset_callback (GtkAction *action)
update_combobox
();
}
static
void
framecombo_changed
(
GtkWidget
*
combo
,
gpointer
data
)
{
default_frame_disposal
=
gtk_combo_box_get_active
(
GTK_COMBO_BOX
(
combo
));
init_frames
();
render_frame
(
frame_number
);
}
static
void
speedcombo_changed
(
GtkWidget
*
combo
,
gpointer
data
)
...
...
@@ -1371,7 +1399,7 @@ parse_disposal_tag (const gchar *str)
return
rtn
;
}
return
DISPOSE_UNDEFINED
;
/* FIXME */
return
default_frame_disposal
;
}
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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