Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
feh
Commits
f86dcb5d
Commit
f86dcb5d
authored
14 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Show a little message in caption editing mode to indicate that is active
parent
618beee2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
src/imlib.c
+22
-14
22 additions, 14 deletions
src/imlib.c
with
24 additions
and
14 deletions
ChangeLog
+
2
−
0
View file @
f86dcb5d
...
...
@@ -10,6 +10,8 @@ git HEAD
* Remove undocumented hjkl menu keys. Most of the menu options can also be
accessed directly with keys, plus the number of non-qwerty users (which
have no use for these shortcuts) is growing.
* Draw a nice little message when in caption editing mode with empty
caption (to indicate that caption editing is actually active)
Sat Jun 5 21:35:25 CEST 2010 Daniel Friesel <derf@chaosdorf.de
...
...
This diff is collapsed.
Click to expand it.
src/imlib.c
+
22
−
14
View file @
f86dcb5d
...
...
@@ -722,18 +722,16 @@ void feh_draw_caption(winwidget w)
* winwidget_render_image().
*/
file
->
caption
=
estrdup
(
""
);
D_RETURN_
(
4
);
}
if
(
file
->
caption
==
'\0'
)
{
if
(
*
(
file
->
caption
)
==
'\0'
&&
!
w
->
caption_entry
)
D_RETURN_
(
4
);
}
if
(
!
caption_style
)
{
caption_style
=
gib_
style_new
(
"caption"
);
caption_style
->
bits
=
gib_list_add_front
(
caption_style
->
bits
,
gib_style_bit_new
(
0
,
0
,
0
,
0
,
0
,
0
));
caption_style
->
bits
=
gib_list_add_front
(
caption_style
->
bits
,
gib_style_bit_new
(
1
,
1
,
0
,
0
,
0
,
255
));
}
caption_style
=
gib_style_new
(
"caption"
);
caption_style
->
bits
=
gib_
list_add_front
(
caption_style
->
bits
,
gib_style_bit_new
(
0
,
0
,
0
,
0
,
0
,
0
));
caption_style
->
bits
=
gib_list_add_front
(
caption_style
->
bits
,
gib_style_bit_new
(
1
,
1
,
0
,
0
,
0
,
255
));
if
(
!
fn
)
{
memset
(
atab
,
0
,
sizeof
(
atab
));
...
...
@@ -748,7 +746,13 @@ void feh_draw_caption(winwidget w)
D_RETURN_
(
4
);
}
lines
=
feh_wrap_string
(
file
->
caption
,
w
->
w
,
fn
,
NULL
);
if
(
*
(
file
->
caption
)
==
'\0'
)
{
p
=
estrdup
(
"Caption entry mode - Hit ESC to cancel"
);
lines
=
feh_wrap_string
(
p
,
w
->
w
,
fn
,
NULL
);
free
(
p
);
}
else
lines
=
feh_wrap_string
(
file
->
caption
,
w
->
w
,
fn
,
NULL
);
if
(
!
lines
)
D_RETURN_
(
4
);
...
...
@@ -786,11 +790,15 @@ void feh_draw_caption(winwidget w)
p
=
(
char
*
)
l
->
data
;
gib_imlib_get_text_size
(
fn
,
p
,
caption_style
,
&
ww
,
&
hh
,
IMLIB_TEXT_TO_RIGHT
);
x
=
(
tw
-
ww
)
/
2
;
if
(
w
->
caption_entry
)
{
gib_imlib_text_draw
(
im
,
fn
,
caption_style
,
x
,
y
,
p
,
IMLIB_TEXT_TO_RIGHT
,
255
,
255
,
0
,
255
);
}
else
{
gib_imlib_text_draw
(
im
,
fn
,
caption_style
,
x
,
y
,
p
,
IMLIB_TEXT_TO_RIGHT
,
255
,
255
,
255
,
255
);
}
if
(
w
->
caption_entry
&&
(
*
(
file
->
caption
)
==
'\0'
))
gib_imlib_text_draw
(
im
,
fn
,
caption_style
,
x
,
y
,
p
,
IMLIB_TEXT_TO_RIGHT
,
255
,
255
,
127
,
255
);
else
if
(
w
->
caption_entry
)
gib_imlib_text_draw
(
im
,
fn
,
caption_style
,
x
,
y
,
p
,
IMLIB_TEXT_TO_RIGHT
,
255
,
255
,
0
,
255
);
else
gib_imlib_text_draw
(
im
,
fn
,
caption_style
,
x
,
y
,
p
,
IMLIB_TEXT_TO_RIGHT
,
255
,
255
,
255
,
255
);
y
+=
hh
+
1
;
/* line spacing */
l
=
l
->
next
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment