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
7f0eeed8
Commit
7f0eeed8
authored
Jul 23, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add icons filter (by command line) to icon browser
parent
fd2d308d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
33 deletions
+79
-33
ru.po
po/ru.po
+22
-14
uk.po
po/uk.po
+22
-14
browser.c
src/browser.c
+35
-5
No files found.
po/ru.po
View file @
7f0eeed8
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-2
1 08:5
1+0300\n"
"POT-Creation-Date: 2019-07-2
3 14:1
1+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
...
...
@@ -176,22 +176,22 @@ msgstr "Не могу разобрать YAD_OPTIONS: %s\n"
msgid "Unable to parse command line: %s\n"
msgstr "Не удается разобрать командную строку: %s\n"
#: ../src/notification.c:1
29
#: ../src/notification.c:1
31
#, c-format
msgid "Could not load notification icon '%s': %s\n"
msgstr "Не удается загрузить иконку '%s': %s\n"
#: ../src/notification.c:3
19
#: ../src/notification.c:3
35
#, c-format
msgid "Invalid UTF-8 in tooltip!\n"
msgstr "Неверная последовательность UTF-8 в подсказке!\n"
#: ../src/notification.c:3
45
#: ../src/notification.c:3
63
#, c-format
msgid "Unknown command '%s'\n"
msgstr "Неизвестная команда '%s'\n"
#: ../src/notification.c:
379
#: ../src/notification.c:
400
msgid "Yad notification"
msgstr "Диалог уведомлений"
...
...
@@ -1777,40 +1777,48 @@ msgstr "Настройки"
msgid "Yes"
msgstr "Да"
#: ../src/browser.c:1
28
#: ../src/browser.c:1
44
msgid "scalable "
msgstr "масштабируемый "
#: ../src/browser.c:1
38
#: ../src/browser.c:1
54
msgid "built-in"
msgstr "встроенный"
#: ../src/browser.c:198
msgid "Show all icons"
msgstr "Показывать все иконки"
#: ../src/browser.c:199
msgid "Show only symbolic icons"
msgstr "Показывать только символьные иконки"
#. initialize GTK+ and parse the command line arguments
#: ../src/browser.c:
196
#: ../src/browser.c:
215
msgid "- Icon browser"
msgstr "- Броузер иконок"
#: ../src/browser.c:2
0
9
#: ../src/browser.c:2
3
9
msgid "Icon browser"
msgstr "Броузер иконок"
#: ../src/browser.c:2
2
9
#: ../src/browser.c:2
5
9
msgid "<b>Name:</b>"
msgstr "<b>Имя:</b>"
#: ../src/browser.c:2
4
0
#: ../src/browser.c:2
7
0
msgid "<b>Sizes:</b>"
msgstr "<b>Размеры:</b>"
#: ../src/browser.c:2
5
1
#: ../src/browser.c:2
8
1
msgid "<b>Filename:</b>"
msgstr "<b>Имя файла:</b>"
#: ../src/browser.c:
28
2
#: ../src/browser.c:
31
2
msgid "Category"
msgstr "Категория"
#: ../src/browser.c:3
1
3
#: ../src/browser.c:3
4
3
msgid "Icons"
msgstr "Иконки"
...
...
po/uk.po
View file @
7f0eeed8
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-07-2
1 08:5
1+0300\n"
"POT-Creation-Date: 2019-07-2
3 14:1
1+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
...
...
@@ -176,22 +176,22 @@ msgstr "Не можу розібрати YAD_OPTIONS: %s\n"
msgid "Unable to parse command line: %s\n"
msgstr "Не вдається розібрати командний рядок: %s\n"
#: ../src/notification.c:1
29
#: ../src/notification.c:1
31
#, c-format
msgid "Could not load notification icon '%s': %s\n"
msgstr "Не вдається завантажити іконку '%s': %s\n"
#: ../src/notification.c:3
19
#: ../src/notification.c:3
35
#, c-format
msgid "Invalid UTF-8 in tooltip!\n"
msgstr "Неправильна послідовність UTF-8 у підказці!\n"
#: ../src/notification.c:3
45
#: ../src/notification.c:3
63
#, c-format
msgid "Unknown command '%s'\n"
msgstr "Невідома команда '%s'\n"
#: ../src/notification.c:
379
#: ../src/notification.c:
400
msgid "Yad notification"
msgstr "Діалог повідомлень"
...
...
@@ -1782,40 +1782,48 @@ msgstr "Налаштування"
msgid "Yes"
msgstr "Так"
#: ../src/browser.c:1
28
#: ../src/browser.c:1
44
msgid "scalable "
msgstr "масштабований "
#: ../src/browser.c:1
38
#: ../src/browser.c:1
54
msgid "built-in"
msgstr "вбудований"
#: ../src/browser.c:198
msgid "Show all icons"
msgstr "Показувати всі іконки"
#: ../src/browser.c:199
msgid "Show only symbolic icons"
msgstr "Показувати тільки символьні іконки"
#. initialize GTK+ and parse the command line arguments
#: ../src/browser.c:
196
#: ../src/browser.c:
215
msgid "- Icon browser"
msgstr "- Навігатор іконок"
#: ../src/browser.c:2
0
9
#: ../src/browser.c:2
3
9
msgid "Icon browser"
msgstr "Навігатор іконок"
#: ../src/browser.c:2
2
9
#: ../src/browser.c:2
5
9
msgid "<b>Name:</b>"
msgstr "<b>Назва:</b>"
#: ../src/browser.c:2
4
0
#: ../src/browser.c:2
7
0
msgid "<b>Sizes:</b>"
msgstr "<b>Розміри:</b>"
#: ../src/browser.c:2
5
1
#: ../src/browser.c:2
8
1
msgid "<b>Filename:</b>"
msgstr "<b>Назва файлу:</b>"
#: ../src/browser.c:
28
2
#: ../src/browser.c:
31
2
msgid "Category"
msgstr "Категорія"
#: ../src/browser.c:3
1
3
#: ../src/browser.c:3
4
3
msgid "Icons"
msgstr "Іконки"
...
...
src/browser.c
View file @
7f0eeed8
...
...
@@ -37,6 +37,9 @@ typedef struct {
GHashTable
*
icons
;
}
IconBrowserData
;
static
gboolean
show_regular
=
TRUE
;
static
gboolean
show_symbolic
=
FALSE
;
static
gboolean
key_press_cb
(
GtkWidget
*
w
,
GdkEventKey
*
ev
,
gpointer
data
)
{
...
...
@@ -65,8 +68,22 @@ load_icon_cat (IconBrowserData * data, gchar * cat)
{
GtkTreeIter
iter
;
GdkPixbuf
*
pb
,
*
spb
;
GtkIconInfo
*
info
;
info
=
gtk_icon_theme_lookup_icon
(
data
->
theme
,
i
->
data
,
size
,
0
);
if
(
gtk_icon_info_is_symbolic
(
info
))
{
if
(
!
show_symbolic
)
continue
;
}
else
{
if
(
!
show_regular
)
continue
;
}
g_object_unref
(
info
);
spb
=
pb
=
gtk_icon_theme_load_icon
(
data
->
theme
,
i
->
data
,
size
,
GTK_ICON_LOOKUP_GENERIC_FALLBACK
,
NULL
);
spb
=
pb
=
gtk_icon_theme_load_icon
(
data
->
theme
,
i
->
data
,
size
,
0
,
NULL
);
if
(
pb
)
{
...
...
@@ -85,9 +102,8 @@ load_icon_cat (IconBrowserData * data, gchar * cat)
if
(
pb
)
g_object_unref
(
pb
);
g_free
(
i
->
data
);
}
g_list_free
(
icons
);
g_list_free
_full
(
icons
,
g_free
);
gtk_tree_sortable_set_sort_column_id
(
GTK_TREE_SORTABLE
(
store
),
1
,
GTK_SORT_ASCENDING
);
...
...
@@ -176,10 +192,13 @@ main (gint argc, gchar * argv[])
GtkTreeViewColumn
*
col
;
GtkCellRenderer
*
r
;
GtkWidget
*
w
,
*
p
,
*
box
,
*
t
;
gboolean
all
=
FALSE
,
symbolic
=
FALSE
;
GOptionEntry
entrs
[]
=
{
{
G_OPTION_REMAINING
,
0
,
0
,
G_OPTION_ARG_STRING_ARRAY
,
&
themes
,
NULL
,
NULL
},
{
NULL
}
{
"all"
,
'a'
,
0
,
G_OPTION_ARG_NONE
,
&
all
,
_
(
"Show all icons"
),
NULL
},
{
"symbolic"
,
's'
,
0
,
G_OPTION_ARG_NONE
,
&
symbolic
,
_
(
"Show only symbolic icons"
),
NULL
},
{
G_OPTION_REMAINING
,
0
,
0
,
G_OPTION_ARG_STRING_ARRAY
,
&
themes
,
NULL
,
NULL
},
{
NULL
}
};
data
=
g_new0
(
IconBrowserData
,
1
);
...
...
@@ -195,6 +214,17 @@ main (gint argc, gchar * argv[])
/* initialize GTK+ and parse the command line arguments */
gtk_init_with_args
(
&
argc
,
&
argv
,
_
(
"- Icon browser"
),
entrs
,
GETTEXT_PACKAGE
,
NULL
);
if
(
all
)
{
show_regular
=
TRUE
;
show_symbolic
=
TRUE
;
}
else
if
(
symbolic
)
{
show_regular
=
FALSE
;
show_symbolic
=
TRUE
;
}
/* load icon theme */
if
(
themes
&&
themes
[
0
])
{
...
...
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