Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
35f6ad5c
Commit
35f6ad5c
authored
Dec 27, 2022
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load user css from file or arbitrary string
parent
2a61b5f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
33 deletions
+37
-33
yad.1
data/yad.1
+2
-2
uk.po
po/uk.po
+21
-21
html.c
src/html.c
+13
-9
option.c
src/option.c
+1
-1
No files found.
data/yad.1
View file @
35f6ad5c
...
...
@@ -637,8 +637,8 @@ Set external handler for clicked uri. \fI%s\fP will be replaced by activated uri
.B \-\-user-agent=\fISTRING\fP
Set user agent string. Default is \fIYAD-Webkit (@VERSION@)\fP
.TP
.B \-\-user-style=\fI
URI
\fP
Set path or uri to custom user styles. Path to local file can be an absolute file name or uri with \fIfile://\fP prefix
.
.B \-\-user-style=\fI
STRING
\fP
Load custom custom user styles from file or arbitrary data. \fISTRING\fP may be a path to local file with CSS code or CSS code itself
.
.TP
.B \-\-disable-search
Disable search bar.
...
...
po/uk.po
View file @
35f6ad5c
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-
06 15:26
+0200\n"
"POT-Creation-Date: 2022-12-
27 17:48
+0200\n"
"PO-Revision-Date: 2021-11-28 19:00+0200\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
...
...
@@ -71,13 +71,13 @@ msgid "Select files"
msgstr "Вибрати файли"
#: ../src/form.c:507 ../src/form.c:515 ../src/form.c:594 ../src/form.c:602
#: ../src/form.c:653 ../src/html.c:22
0 ../src/html.c:253
../src/picture.c:296
#: ../src/form.c:653 ../src/html.c:22
7 ../src/html.c:260
../src/picture.c:296
#: ../src/text.c:121 ../src/text.c:192 ../src/util.c:40
msgid "Cancel"
msgstr "Скасувати"
#: ../src/form.c:508 ../src/form.c:516 ../src/form.c:595 ../src/form.c:603
#: ../src/form.c:654 ../src/html.c:22
1
../src/picture.c:297 ../src/text.c:122
#: ../src/form.c:654 ../src/html.c:22
8
../src/picture.c:297 ../src/text.c:122
#: ../src/text.c:193 ../src/util.c:46
msgid "OK"
msgstr "Гаразд"
...
...
@@ -110,23 +110,23 @@ msgstr "Вибрати теку"
msgid "Link"
msgstr "Посилання"
#: ../src/html.c:2
17
../src/text.c:118 ../src/text.c:189
#: ../src/html.c:2
24
../src/text.c:118 ../src/text.c:189
msgid "YAD - Select File"
msgstr "YAD - Вибір файлу"
#: ../src/html.c:25
1 ../src/html.c:299
#: ../src/html.c:25
8 ../src/html.c:306
msgid "Open URI"
msgstr "Відкрити URI"
#: ../src/html.c:2
54
../src/util.c:47
#: ../src/html.c:2
61
../src/util.c:47
msgid "Open"
msgstr "Відкрити"
#: ../src/html.c:26
0
#: ../src/html.c:26
7
msgid "Enter URI or file name:"
msgstr "Введіть URI або ім'я файлу:"
#: ../src/html.c:3
09
../src/util.c:49
#: ../src/html.c:3
16
../src/util.c:49
msgid "Quit"
msgstr "Вихід"
...
...
@@ -189,35 +189,35 @@ msgstr "Невідома команда '%s'\n"
msgid "Yad notification"
msgstr "Діалог повідомлень"
#: ../src/list.c:111
5
#: ../src/list.c:111
2
msgid "Add row"
msgstr "Додати рядок"
#: ../src/list.c:11
22
#: ../src/list.c:11
19
msgid "Add child row"
msgstr "Додати дочірній рядок"
#: ../src/list.c:112
9
#: ../src/list.c:112
6
msgid "Delete row"
msgstr "Видалити рядок"
#: ../src/list.c:113
6
#: ../src/list.c:113
3
msgid "Edit row"
msgstr "Редагувати рядок"
#: ../src/list.c:11
42
#: ../src/list.c:11
39
msgid "Duplicate row"
msgstr "Скопіювати рядок"
#: ../src/list.c:11
51
#: ../src/list.c:11
48
msgid "Move row up"
msgstr "Перемістити рядок вгору"
#: ../src/list.c:115
6
#: ../src/list.c:115
3
msgid "Move row down"
msgstr "Перемістити рядок вниз"
#: ../src/list.c:129
7
#: ../src/list.c:129
4
#, c-format
msgid ""
"WARNING: You are use --checklist or --radiolist option. Those options "
...
...
@@ -226,7 +226,7 @@ msgstr ""
"УВАГА: Використовуються опції --checklist або --radiolist. Ці опції "
"застаріли та будуть видалені у майбутніх випусках\n"
#: ../src/list.c:130
3
#: ../src/list.c:130
0
#, c-format
msgid "No column titles specified for List dialog.\n"
msgstr "Не задані заголовки стовпчиків для діалогу зі списком\n"
...
...
@@ -647,8 +647,8 @@ msgid "Set application name"
msgstr "Задати ім'я програми"
#: ../src/option.c:256 ../src/option.c:258 ../src/option.c:260
#: ../src/option.c:270 ../src/option.c:416 ../src/option.c:
541
#: ../src/option.c:729
#: ../src/option.c:270 ../src/option.c:416 ../src/option.c:
418
#: ../src/option.c:
541 ../src/option.c:
729
msgid "STRING"
msgstr "РЯДОК"
...
...
@@ -941,8 +941,8 @@ msgid "Set user agent string"
msgstr "Задати стрічку агента"
#: ../src/option.c:418
msgid "Set
path or uri to user styles
"
msgstr "Задати
URI або шлях до стилей
користувача"
msgid "Set
custom user style
"
msgstr "Задати
стиль
користувача"
#: ../src/option.c:420
msgid "Set WebKit property"
...
...
src/html.c
View file @
35f6ad5c
...
...
@@ -515,24 +515,28 @@ html_create_widget (GtkWidget * dlg)
/* add user defined css */
if
(
options
.
html_data
.
user_style
)
{
gchar
*
css
;
gchar
*
css
=
NULL
;
GError
*
err
=
NULL
;
if
(
g_file_
get_contents
(
options
.
html_data
.
user_style
,
&
css
,
NULL
,
&
err
))
if
(
g_file_
test
(
options
.
html_data
.
user_style
,
G_FILE_TEST_EXISTS
))
{
WebKitUserStyleSheet
*
wk_css
;
if
(
!
g_file_get_contents
(
options
.
html_data
.
user_style
,
&
css
,
NULL
,
&
err
))
{
g_printerr
(
"yad_html: unable to load user css file: %s
\n
"
,
err
->
message
);
g_error_free
(
err
);
}
}
else
css
=
g_strdup
(
options
.
html_data
.
user_style
);
if
(
css
)
{
WebKitUserStyleSheet
*
wk_css
;
wk_css
=
webkit_user_style_sheet_new
(
css
,
WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES
,
WEBKIT_USER_STYLE_LEVEL_USER
,
NULL
,
NULL
);
webkit_user_content_manager_add_style_sheet
(
wk_cman
,
wk_css
);
g_free
(
css
);
}
else
{
g_printerr
(
"yad_html: unable to load user css file: %s
\n
"
,
err
->
message
);
g_error_free
(
err
);
}
}
gtk_widget_show_all
(
sw
);
...
...
src/option.c
View file @
35f6ad5c
...
...
@@ -415,7 +415,7 @@ static GOptionEntry html_options[] = {
{
"user-agent"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
html_data
.
user_agent
,
N_
(
"Set user agent string"
),
N_
(
"STRING"
)
},
{
"user-style"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
html_data
.
user_style
,
N_
(
"Set
path or uri to user styles"
),
"URI"
},
N_
(
"Set
custom user style"
),
N_
(
"STRING"
)
},
{
"wk-prop"
,
0
,
0
,
G_OPTION_ARG_STRING_ARRAY
,
&
options
.
html_data
.
wk_props
,
N_
(
"Set WebKit property"
),
N_
(
"PROP"
)
},
{
NULL
}
...
...
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