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
103d4362
Commit
103d4362
authored
Apr 26, 2022
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clipboard operations to picture dialog
parent
3c7e1a67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
13 deletions
+58
-13
uk.po
po/uk.po
+21
-13
picture.c
src/picture.c
+37
-0
No files found.
po/uk.po
View file @
103d4362
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: YAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-26 0
8:34
+0300\n"
"POT-Creation-Date: 2022-04-26 0
9:33
+0300\n"
"PO-Revision-Date: 2021-11-28 19:00+0200\n"
"Last-Translator: Victor Ananjevsky <ananasik@gmail.com>\n"
"Language-Team: \n"
...
...
@@ -1852,54 +1852,62 @@ msgstr "Показувати додаткові параметри"
msgid "WARNING: wrong focused pane number %d. Must be 1 or 2\n"
msgstr "УВАГА: невірний номер панелі %d. Повинен бути 1 чи 2\n"
#: ../src/picture.c:2
45
#: ../src/picture.c:2
68
msgid "Next image"
msgstr "Наступне зображення"
#: ../src/picture.c:2
52
#: ../src/picture.c:2
75
msgid "Previous image"
msgstr "Попереднє зображення"
#: ../src/picture.c:2
59
#: ../src/picture.c:2
82
msgid "First image"
msgstr "Перше зображення"
#: ../src/picture.c:2
66
#: ../src/picture.c:2
89
msgid "Last image"
msgstr "Останнж зображення"
#: ../src/picture.c:
278
#: ../src/picture.c:
301
msgid "Fit to window"
msgstr "По розміру вікна"
#: ../src/picture.c:
285
#: ../src/picture.c:
308
msgid "Original size"
msgstr "Оригінальний розмір"
#: ../src/picture.c:
292
#: ../src/picture.c:
315
msgid "Increase size"
msgstr "Збільшити розмір"
#: ../src/picture.c:
299
#: ../src/picture.c:
322
msgid "Decrease size"
msgstr "Зменшити розмір"
#: ../src/picture.c:3
10
#: ../src/picture.c:3
33
msgid "Rotate left"
msgstr "Повернути ліворуч"
#: ../src/picture.c:3
17
#: ../src/picture.c:3
40
msgid "Rotate right"
msgstr "Повернути праворуч"
#: ../src/picture.c:3
24
#: ../src/picture.c:3
47
msgid "Flip vertical"
msgstr "Віддзеркалити вертикально"
#: ../src/picture.c:3
31
#: ../src/picture.c:3
54
msgid "Flip horizontal"
msgstr "Віддзеркалити горизонтально"
#: ../src/picture.c:365
msgid "Copy image to clipboard"
msgstr "Копіювати зображення"
#: ../src/picture.c:370
msgid "Copy filename to clipboard"
msgstr "Копіювати ім'я файла"
#: ../src/print.c:200 ../src/print.c:367
#, c-format
msgid "Printing failed: %s\n"
...
...
src/picture.c
View file @
103d4362
...
...
@@ -33,6 +33,11 @@ enum {
ROTATE_FLIP_HOR
};
enum
{
COPY_IMAGE
,
COPY_FILE
};
typedef
struct
{
gchar
*
filename
;
GdkPixbufAnimation
*
anim_pb
;
...
...
@@ -233,6 +238,24 @@ rotate_cb (GtkWidget *w, gint type)
}
static
void
copy_cb
(
GtkWidget
*
w
,
gint
type
)
{
GtkClipboard
*
clip
;
clip
=
gtk_clipboard_get_default
(
gdk_display_get_default
());
switch
(
type
)
{
case
COPY_IMAGE
:
gtk_clipboard_set_image
(
clip
,
img
->
orig_pb
);
break
;
case
COPY_FILE
:
gtk_clipboard_set_text
(
clip
,
img
->
filename
,
-
1
);
break
;
}
}
static
void
create_popup_menu
()
{
GtkWidget
*
mi
,
*
al
;
...
...
@@ -334,6 +357,20 @@ create_popup_menu ()
gtk_widget_show
(
mi
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
popup_menu
),
mi
);
g_signal_connect
(
G_OBJECT
(
mi
),
"activate"
,
G_CALLBACK
(
rotate_cb
),
GINT_TO_POINTER
(
ROTATE_FLIP_HOR
));
mi
=
gtk_separator_menu_item_new
();
gtk_widget_show
(
mi
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
popup_menu
),
mi
);
mi
=
gtk_menu_item_new_with_label
(
_
(
"Copy image to clipboard"
));
gtk_widget_show
(
mi
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
popup_menu
),
mi
);
g_signal_connect
(
G_OBJECT
(
mi
),
"activate"
,
G_CALLBACK
(
copy_cb
),
GINT_TO_POINTER
(
COPY_IMAGE
));
mi
=
gtk_menu_item_new_with_label
(
_
(
"Copy filename to clipboard"
));
gtk_widget_show
(
mi
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
popup_menu
),
mi
);
g_signal_connect
(
G_OBJECT
(
mi
),
"activate"
,
G_CALLBACK
(
copy_cb
),
GINT_TO_POINTER
(
COPY_FILE
));
}
static
gboolean
...
...
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