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
34d0e9d0
Commit
34d0e9d0
authored
Aug 11, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add child items from menu in editable lists
parent
8a3b3689
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
14 deletions
+41
-14
ru.po
po/ru.po
+10
-6
uk.po
po/uk.po
+10
-6
list.c
src/list.c
+21
-2
No files found.
po/ru.po
View file @
34d0e9d0
...
@@ -7,7 +7,7 @@ msgid ""
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: YAD\n"
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-11 1
0:38
+0300\n"
"POT-Creation-Date: 2019-08-11 1
1:17
+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
"Language-Team: \n"
...
@@ -195,23 +195,27 @@ msgstr "Неизвестная команда '%s'\n"
...
@@ -195,23 +195,27 @@ msgstr "Неизвестная команда '%s'\n"
msgid "Yad notification"
msgid "Yad notification"
msgstr "Диалог уведомлений"
msgstr "Диалог уведомлений"
#: ../src/list.c:10
1
4
#: ../src/list.c:10
2
4
msgid "Add row"
msgid "Add row"
msgstr "Добавить строку"
msgstr "Добавить строку"
#: ../src/list.c:1019
#: ../src/list.c:1031
msgid "Add child row"
msgstr "Добавить дочернюю строку"
#: ../src/list.c:1038
msgid "Delete row"
msgid "Delete row"
msgstr "Удалить строку"
msgstr "Удалить строку"
#: ../src/list.c:10
26
#: ../src/list.c:10
45
msgid "Edit row"
msgid "Edit row"
msgstr "Редактировать строку"
msgstr "Редактировать строку"
#: ../src/list.c:10
32
#: ../src/list.c:10
51
msgid "Duplicate row"
msgid "Duplicate row"
msgstr "Скопировать строку"
msgstr "Скопировать строку"
#: ../src/list.c:11
73
#: ../src/list.c:11
92
#, c-format
#, c-format
msgid "No column titles specified for List dialog.\n"
msgid "No column titles specified for List dialog.\n"
msgstr "Не заданы заголовоки колонок для диалога со списком\n"
msgstr "Не заданы заголовоки колонок для диалога со списком\n"
...
...
po/uk.po
View file @
34d0e9d0
...
@@ -7,7 +7,7 @@ msgid ""
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: YAD\n"
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-11 1
0:38
+0300\n"
"POT-Creation-Date: 2019-08-11 1
1:17
+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"PO-Revision-Date: 2009-04-30 16:47+0300\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
"Language-Team: \n"
...
@@ -195,23 +195,27 @@ msgstr "Невідома команда '%s'\n"
...
@@ -195,23 +195,27 @@ msgstr "Невідома команда '%s'\n"
msgid "Yad notification"
msgid "Yad notification"
msgstr "Діалог повідомлень"
msgstr "Діалог повідомлень"
#: ../src/list.c:10
1
4
#: ../src/list.c:10
2
4
msgid "Add row"
msgid "Add row"
msgstr "Додати рядок"
msgstr "Додати рядок"
#: ../src/list.c:1019
#: ../src/list.c:1031
msgid "Add child row"
msgstr "Додати дочірній рядок"
#: ../src/list.c:1038
msgid "Delete row"
msgid "Delete row"
msgstr "Видалити рядок"
msgstr "Видалити рядок"
#: ../src/list.c:10
26
#: ../src/list.c:10
45
msgid "Edit row"
msgid "Edit row"
msgstr "Редагувати рядок"
msgstr "Редагувати рядок"
#: ../src/list.c:10
32
#: ../src/list.c:10
51
msgid "Duplicate row"
msgid "Duplicate row"
msgstr "Скопіювати рядок"
msgstr "Скопіювати рядок"
#: ../src/list.c:11
73
#: ../src/list.c:11
92
#, c-format
#, c-format
msgid "No column titles specified for List dialog.\n"
msgid "No column titles specified for List dialog.\n"
msgstr "Не задані заголовки стовпчиків для діалогу зі списком\n"
msgstr "Не задані заголовки стовпчиків для діалогу зі списком\n"
...
...
src/list.c
View file @
34d0e9d0
...
@@ -831,8 +831,18 @@ add_row_cb (GtkMenuItem *item, gpointer data)
...
@@ -831,8 +831,18 @@ add_row_cb (GtkMenuItem *item, gpointer data)
gchar
*
cmd
;
gchar
*
cmd
;
model
=
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
list_view
));
model
=
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
list_view
));
/* FIXME: add id for new row here */
if
(
g_object_get_data
(
G_OBJECT
(
item
),
"child"
)
!=
NULL
)
yad_list_add_row
(
GTK_TREE_STORE
(
model
),
&
iter
,
NULL
,
NULL
);
{
GtkTreeIter
parent
;
GtkTreeSelection
*
sel
=
gtk_tree_view_get_selection
(
GTK_TREE_VIEW
(
list_view
));
if
(
gtk_tree_selection_get_selected
(
sel
,
NULL
,
&
parent
))
gtk_tree_store_append
(
GTK_TREE_STORE
(
model
),
&
iter
,
&
parent
);
else
gtk_tree_store_append
(
GTK_TREE_STORE
(
model
),
&
iter
,
NULL
);
}
else
gtk_tree_store_append
(
GTK_TREE_STORE
(
model
),
&
iter
,
NULL
);
if
(
options
.
list_data
.
row_action
)
if
(
options
.
list_data
.
row_action
)
{
{
...
@@ -1016,6 +1026,15 @@ popup_menu_cb (GtkWidget *w, GdkEventButton *ev, gpointer data)
...
@@ -1016,6 +1026,15 @@ popup_menu_cb (GtkWidget *w, GdkEventButton *ev, gpointer data)
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
item
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
item
);
g_signal_connect
(
G_OBJECT
(
item
),
"activate"
,
G_CALLBACK
(
add_row_cb
),
menu
);
g_signal_connect
(
G_OBJECT
(
item
),
"activate"
,
G_CALLBACK
(
add_row_cb
),
menu
);
if
(
options
.
list_data
.
tree_mode
)
{
item
=
gtk_menu_item_new_with_label
(
_
(
"Add child row"
));
gtk_widget_show
(
item
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
item
);
g_object_set_data
(
G_OBJECT
(
item
),
"child"
,
"1"
);
g_signal_connect
(
G_OBJECT
(
item
),
"activate"
,
G_CALLBACK
(
add_row_cb
),
menu
);
}
item
=
gtk_menu_item_new_with_label
(
_
(
"Delete row"
));
item
=
gtk_menu_item_new_with_label
(
_
(
"Delete row"
));
gtk_widget_show
(
item
);
gtk_widget_show
(
item
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
item
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
item
);
...
...
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