Merge lp:~pafosdfkapos/eidete/translations into lp:eidete

Proposed by pafosdfkapos
Status: Merged
Approved by: Cody Garver
Approved revision: 151
Merged at revision: 145
Proposed branch: lp:~pafosdfkapos/eidete/translations
Merge into: lp:eidete
Diff against target: 1776 lines (+562/-417)
6 files modified
po/eidete.pot (+133/-87)
po/et.po (+145/-98)
src/Widgets/countdown.vala (+20/-18)
src/Widgets/end_dialog.vala (+24/-27)
src/Widgets/keyview.vala (+55/-55)
src/eidete.vala (+185/-132)
To merge this branch: bzr merge lp:~pafosdfkapos/eidete/translations
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+164573@code.launchpad.net

Commit message

Translation fixes and UI improvements.

Description of the change

Fixes to translations, layout and buttons.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'po/cs.po' (properties changed: -x to +x)
=== modified file 'po/eidete.pot'
--- po/eidete.pot 2012-08-05 00:55:04 +0000
+++ po/eidete.pot 2013-05-18 07:55:30 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2012-08-04 19:54-0500\n"11"POT-Creation-Date: 2013-05-17 23:02+0300\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,137 +17,183 @@
17"Content-Type: text/plain; charset=CHARSET\n"17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: /home/codygarver/eidete/po/../src/savedialog.vala:820#: /home/kristjan/translations/po/../src/desktop_launcher.vala:5
21#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:6621msgid "Record screencasts"
22#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:10322msgstr ""
23
24#: /home/kristjan/translations/po/../src/desktop_launcher.vala:6
25msgid "Screencaster"
26msgstr ""
27
28#: /home/kristjan/translations/po/../src/videobin_uploader.vala:45
29msgid "Upload"
30msgstr ""
31
32#: /home/kristjan/translations/po/../src/savedialog.vala:8
33#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:28
34#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:64
35#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:100
23msgid "Save"36msgid "Save"
24msgstr ""37msgstr ""
2538
26#: /home/codygarver/eidete/po/../src/Widgets/countdown.vala:2739#: /home/kristjan/translations/po/../src/eidete.vala:138
27msgid "Recording starts in"
28msgstr ""
29
30#: /home/codygarver/eidete/po/../src/Widgets/countdown.vala:33
31msgid "Focus Eidete to stop recording"
32msgstr ""
33
34#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:24
35msgid "Recording done"
36msgstr ""
37
38#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:27
39msgid "And now?"
40msgstr ""
41
42#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:31
43msgid "Go"
44msgstr ""
45
46#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:64
47msgid "Could not contact Contractor. Click Save to save the file"
48msgstr ""
49
50#: /home/codygarver/eidete/po/../src/videobin_uploader.vala:45
51msgid "Upload"
52msgstr ""
53
54#: /home/codygarver/eidete/po/../src/eidete.vala:139
55msgid "Monitor"40msgid "Monitor"
56msgstr ""41msgstr ""
5742
58#: /home/codygarver/eidete/po/../src/eidete.vala:15443#: /home/kristjan/translations/po/../src/eidete.vala:158
59msgid "Fullscreen"44msgid "Fullscreen"
60msgstr ""45msgstr ""
6146
62#: /home/codygarver/eidete/po/../src/eidete.vala:15547#: /home/kristjan/translations/po/../src/eidete.vala:159
63msgid "Custom"48msgid "Custom"
64msgstr ""49msgstr ""
6550
66#: /home/codygarver/eidete/po/../src/eidete.vala:17551#: /home/kristjan/translations/po/../src/eidete.vala:170
67msgid "Record"52msgid "Default"
68msgstr ""53msgstr ""
6954
70#: /home/codygarver/eidete/po/../src/eidete.vala:18755#: /home/kristjan/translations/po/../src/eidete.vala:179
71msgid "Sound"56msgid "Sound"
72msgstr ""57msgstr ""
7358
74#: /home/codygarver/eidete/po/../src/eidete.vala:18859#: /home/kristjan/translations/po/../src/eidete.vala:182
60msgid "Video"
61msgstr ""
62
63#: /home/kristjan/translations/po/../src/eidete.vala:185
64msgid "Keyboard"
65msgstr ""
66
67#: /home/kristjan/translations/po/../src/eidete.vala:188
68msgid "Mouse"
69msgstr ""
70
71#: /home/kristjan/translations/po/../src/eidete.vala:191
72msgid "Start Recording"
73msgstr ""
74
75#: /home/kristjan/translations/po/../src/eidete.vala:197
76msgid "About"
77msgstr ""
78
79#: /home/kristjan/translations/po/../src/eidete.vala:210
75msgid "Record Computer Sounds"80msgid "Record Computer Sounds"
76msgstr ""81msgstr ""
7782
78#: /home/codygarver/eidete/po/../src/eidete.vala:19083#: /home/kristjan/translations/po/../src/eidete.vala:212
79msgid "Record from Microphone"84msgid "Record from Microphone"
80msgstr ""85msgstr ""
8186
82#: /home/codygarver/eidete/po/../src/eidete.vala:19287#: /home/kristjan/translations/po/../src/eidete.vala:215
83msgid "Video"
84msgstr ""
85
86#: /home/codygarver/eidete/po/../src/eidete.vala:193
87msgid "Record from Monitor"88msgid "Record from Monitor"
88msgstr ""89msgstr ""
8990
90#: /home/codygarver/eidete/po/../src/eidete.vala:19591#: /home/kristjan/translations/po/../src/eidete.vala:217
91msgid "Recording Area"92msgid "Recording Area"
92msgstr ""93msgstr ""
9394
94#: /home/codygarver/eidete/po/../src/eidete.vala:19795#: /home/kristjan/translations/po/../src/eidete.vala:219
95msgid "Width"96msgid "Width"
96msgstr ""97msgstr ""
9798
98#: /home/codygarver/eidete/po/../src/eidete.vala:19999#: /home/kristjan/translations/po/../src/eidete.vala:221
99msgid "Height"100msgid "Height"
100msgstr ""101msgstr ""
101102
102#: /home/codygarver/eidete/po/../src/eidete.vala:218103#: /home/kristjan/translations/po/../src/eidete.vala:245
103msgid "Show pressed keys on screen"104msgid "Pressed keys on screen"
104msgstr ""105msgstr ""
105106
106#: /home/codygarver/eidete/po/../src/eidete.vala:220107#: /home/kristjan/translations/po/../src/eidete.vala:248
107msgid "Show clicks on screen"108msgid "Mouse clicks on screen"
108msgstr ""109msgstr ""
109110
110#: /home/codygarver/eidete/po/../src/eidete.vala:222111#: /home/kristjan/translations/po/../src/eidete.vala:250
111msgid "Show circle behind mouse"112msgid "Circle around the cursor"
112msgstr ""113msgstr ""
113114
114#: /home/codygarver/eidete/po/../src/eidete.vala:228115#: /home/kristjan/translations/po/../src/eidete.vala:256
115msgid "Behavior"116msgid "Behavior"
116msgstr ""117msgstr ""
117118
118#: /home/codygarver/eidete/po/../src/eidete.vala:229119#: /home/kristjan/translations/po/../src/eidete.vala:257
119msgid "Appearance"120msgid "Appearance"
120msgstr ""121msgstr ""
121122
122#: /home/codygarver/eidete/po/../src/eidete.vala:424123#: /home/kristjan/translations/po/../src/eidete.vala:449
124#: /home/kristjan/translations/po/../src/eidete.vala:456
125#: /home/kristjan/translations/po/../src/eidete.vala:641
126msgid "Recording paused"
127msgstr ""
128
129#: /home/kristjan/translations/po/../src/eidete.vala:459
130msgid "You can continue or finish the recording now"
131msgstr ""
132
133#: /home/kristjan/translations/po/../src/eidete.vala:468
134msgid "Continue"
135msgstr ""
136
137#: /home/kristjan/translations/po/../src/eidete.vala:469
138msgid "Continue recording"
139msgstr ""
140
141#: /home/kristjan/translations/po/../src/eidete.vala:472
123msgid "Finish"142msgid "Finish"
124msgstr ""143msgstr ""
125144
126#: /home/codygarver/eidete/po/../src/eidete.vala:425145#: /home/kristjan/translations/po/../src/eidete.vala:473
127msgid "Finish recording"146msgid "Stop the recording and save the file"
128msgstr ""147msgstr ""
129148
130#: /home/codygarver/eidete/po/../src/eidete.vala:427149#: /home/kristjan/translations/po/../src/eidete.vala:476
131msgid "Record more"150msgid "Cancel"
132msgstr ""151msgstr ""
133152
134#: /home/codygarver/eidete/po/../src/eidete.vala:441153#: /home/kristjan/translations/po/../src/eidete.vala:477
135#: /home/codygarver/eidete/po/../src/eidete.vala:588154msgid "Cancel the recording without saving the file"
136msgid "Recording paused"155msgstr ""
137msgstr ""156
138157#: /home/kristjan/translations/po/../src/eidete.vala:651
139#: /home/codygarver/eidete/po/../src/eidete.vala:442
140msgid "You can continue or finish the recording now."
141msgstr ""
142
143#: /home/codygarver/eidete/po/../src/eidete.vala:598
144msgid "Pause recording"158msgid "Pause recording"
145msgstr ""159msgstr ""
146160
147#: /home/codygarver/eidete/po/../src/desktop_launcher.vala:5161#: /home/kristjan/translations/po/../src/eidete.vala:671
148msgid "Record screencasts"162msgid "Pause Recording"
149msgstr ""163msgstr ""
150164
151#: /home/codygarver/eidete/po/../src/desktop_launcher.vala:6165#: /home/kristjan/translations/po/../src/eidete.vala:672
152msgid "Screencaster"166msgid "Finish Recording"
167msgstr ""
168
169#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:24
170msgid "Recording complete"
171msgstr ""
172
173#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:33
174msgid "Don't save"
175msgstr ""
176
177#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:62
178msgid "Could not contact Contractor. Click the Save button to save the file."
179msgstr ""
180
181#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:48
182msgid "Left"
183msgstr ""
184
185#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:51
186msgid "Middle"
187msgstr ""
188
189#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:54
190msgid "Right"
191msgstr ""
192
193#: /home/kristjan/translations/po/../src/Widgets/countdown.vala:27
194msgid "Recording starts in"
195msgstr ""
196
197#: /home/kristjan/translations/po/../src/Widgets/countdown.vala:34
198msgid "Focus Eidete to stop recording"
153msgstr ""199msgstr ""
154200
=== modified file 'po/et.po'
--- po/et.po 2013-03-17 05:13:08 +0000
+++ po/et.po 2013-05-18 07:55:30 +0000
@@ -6,149 +6,196 @@
6msgid ""6msgid ""
7msgstr ""7msgstr ""
8"Project-Id-Version: eidete\n"8"Project-Id-Version: eidete\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"9"Report-Msgid-Bugs-To: \n"
10"POT-Creation-Date: 2012-08-04 19:54-0500\n"10"POT-Creation-Date: 2013-05-17 03:41+0300\n"
11"PO-Revision-Date: 2012-09-21 23:01+0000\n"11"PO-Revision-Date: 2013-05-17 03:42+0300\n"
12"Last-Translator: Kristjan Vool <Unknown>\n"12"Last-Translator: Kristjan Vool <vool.kristjan@gmail.com>\n"
13"Language-Team: Estonian <et@li.org>\n"13"Language-Team: Estonian <et@li.org>\n"
14"Language: et\n"
14"MIME-Version: 1.0\n"15"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"16"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"17"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2013-03-17 05:13+0000\n"18"X-Launchpad-Export-Date: 2013-03-17 05:13+0000\n"
18"X-Generator: Launchpad (build 16532)\n"19"X-Generator: Launchpad (build 16532)\n"
1920
20#: /home/codygarver/eidete/po/../src/savedialog.vala:821#: /home/kristjan/translations/po/../src/desktop_launcher.vala:5
21#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:6622msgid "Record screencasts"
22#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:10323msgstr "Screencast'ide filmimine"
24
25#: /home/kristjan/translations/po/../src/desktop_launcher.vala:6
26msgid "Screencaster"
27msgstr "Screencaster"
28
29#: /home/kristjan/translations/po/../src/videobin_uploader.vala:45
30msgid "Upload"
31msgstr "Laadi üles"
32
33#: /home/kristjan/translations/po/../src/savedialog.vala:8
34#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:28
35#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:64
36#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:100
23msgid "Save"37msgid "Save"
24msgstr "Salvesta"38msgstr "Salvesta"
2539
26#: /home/codygarver/eidete/po/../src/Widgets/countdown.vala:2740#: /home/kristjan/translations/po/../src/eidete.vala:138
27msgid "Recording starts in"
28msgstr "Lindistamine algab"
29
30#: /home/codygarver/eidete/po/../src/Widgets/countdown.vala:33
31msgid "Focus Eidete to stop recording"
32msgstr "Lindistamise lõpetamiseks fokuseeri Eidete"
33
34#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:24
35msgid "Recording done"
36msgstr "Lindistamine valmis"
37
38#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:27
39msgid "And now?"
40msgstr "Ja nüüd?"
41
42#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:31
43msgid "Go"
44msgstr "Mine"
45
46#: /home/codygarver/eidete/po/../src/Widgets/end_dialog.vala:64
47msgid "Could not contact Contractor. Click Save to save the file"
48msgstr ""
49"Ãœhenduse loomine Contractoriga nurjus. Faili salvestamiseks vali Salvesta."
50
51#: /home/codygarver/eidete/po/../src/videobin_uploader.vala:45
52msgid "Upload"
53msgstr "Laadi üles"
54
55#: /home/codygarver/eidete/po/../src/eidete.vala:139
56msgid "Monitor"41msgid "Monitor"
57msgstr "Kuvar"42msgstr "Kuvar"
5843
59#: /home/codygarver/eidete/po/../src/eidete.vala:15444#: /home/kristjan/translations/po/../src/eidete.vala:158
60msgid "Fullscreen"45msgid "Fullscreen"
61msgstr "Täisekraan"46msgstr "Täisekraan"
6247
63#: /home/codygarver/eidete/po/../src/eidete.vala:15548#: /home/kristjan/translations/po/../src/eidete.vala:159
64msgid "Custom"49msgid "Custom"
65msgstr "Kohandatud"50msgstr "Kohandatud"
6651
67#: /home/codygarver/eidete/po/../src/eidete.vala:17552#: /home/kristjan/translations/po/../src/eidete.vala:171
68msgid "Record"53msgid "Default"
69msgstr "Lindista"54msgstr "Vaikimisi"
7055
71#: /home/codygarver/eidete/po/../src/eidete.vala:18756#: /home/kristjan/translations/po/../src/eidete.vala:180
72msgid "Sound"57msgid "Sound"
73msgstr "Heli"58msgstr "Heli"
7459
75#: /home/codygarver/eidete/po/../src/eidete.vala:18860#: /home/kristjan/translations/po/../src/eidete.vala:183
61msgid "Video"
62msgstr "Video"
63
64#: /home/kristjan/translations/po/../src/eidete.vala:186
65msgid "Keyboard"
66msgstr "Klaviatuur"
67
68#: /home/kristjan/translations/po/../src/eidete.vala:189
69msgid "Mouse"
70msgstr "Hiir"
71
72#: /home/kristjan/translations/po/../src/eidete.vala:192
73msgid "Start Recording"
74msgstr "Alusta filmimist"
75
76#: /home/kristjan/translations/po/../src/eidete.vala:198
77msgid "About"
78msgstr "Programmist…"
79
80#: /home/kristjan/translations/po/../src/eidete.vala:211
76msgid "Record Computer Sounds"81msgid "Record Computer Sounds"
77msgstr "Arvuti helide lindistamine"82msgstr "Arvuti helide salvestamine"
7883
79#: /home/codygarver/eidete/po/../src/eidete.vala:19084#: /home/kristjan/translations/po/../src/eidete.vala:213
80msgid "Record from Microphone"85msgid "Record from Microphone"
81msgstr "Mikrofoni lindistamine"86msgstr "Mikrofoni salvestamine"
8287
83#: /home/codygarver/eidete/po/../src/eidete.vala:19288#: /home/kristjan/translations/po/../src/eidete.vala:216
84msgid "Video"
85msgstr "Video"
86
87#: /home/codygarver/eidete/po/../src/eidete.vala:193
88msgid "Record from Monitor"89msgid "Record from Monitor"
89msgstr "Kuvari lindistamine"90msgstr "Kuvari filmimine"
9091
91#: /home/codygarver/eidete/po/../src/eidete.vala:19592#: /home/kristjan/translations/po/../src/eidete.vala:218
92msgid "Recording Area"93msgid "Recording Area"
93msgstr "Lindistamise ala"94msgstr "Filmimise ala"
9495
95#: /home/codygarver/eidete/po/../src/eidete.vala:19796#: /home/kristjan/translations/po/../src/eidete.vala:220
96msgid "Width"97msgid "Width"
97msgstr "Laius"98msgstr "Laius"
9899
99#: /home/codygarver/eidete/po/../src/eidete.vala:199100#: /home/kristjan/translations/po/../src/eidete.vala:222
100msgid "Height"101msgid "Height"
101msgstr "Kõrgus"102msgstr "Kõrgus"
102103
103#: /home/codygarver/eidete/po/../src/eidete.vala:218104#: /home/kristjan/translations/po/../src/eidete.vala:246
104msgid "Show pressed keys on screen"105msgid "Pressed keys on screen"
105msgstr "Vajutatud klahvide näitamine eknraanil"106msgstr "Vajutatud klahvid ekraanil"
106107
107#: /home/codygarver/eidete/po/../src/eidete.vala:220108#: /home/kristjan/translations/po/../src/eidete.vala:249
108msgid "Show clicks on screen"109msgid "Mouse clicks on screen"
109msgstr "Klõpsude näitamine ekraanil"110msgstr "Hiire klõpsud ekraanil"
110111
111#: /home/codygarver/eidete/po/../src/eidete.vala:222112#: /home/kristjan/translations/po/../src/eidete.vala:251
112msgid "Show circle behind mouse"113msgid "Circle around the cursor"
113msgstr "Ringi näitamine kursori taga"114msgstr "Ring ümber kursori"
114115
115#: /home/codygarver/eidete/po/../src/eidete.vala:228116#: /home/kristjan/translations/po/../src/eidete.vala:257
116msgid "Behavior"117msgid "Behavior"
117msgstr "Käitumine"118msgstr "Käitumine"
118119
119#: /home/codygarver/eidete/po/../src/eidete.vala:229120#: /home/kristjan/translations/po/../src/eidete.vala:258
120msgid "Appearance"121msgid "Appearance"
121msgstr "Välimus"122msgstr "Välimus"
122123
123#: /home/codygarver/eidete/po/../src/eidete.vala:424124#: /home/kristjan/translations/po/../src/eidete.vala:451
125msgid "Recording paused"
126msgstr "Filmimine peatatud"
127
128#: /home/kristjan/translations/po/../src/eidete.vala:459
129msgid "Continue"
130msgstr "Jätka"
131
132#: /home/kristjan/translations/po/../src/eidete.vala:460
133msgid "Continue recording"
134msgstr "Jätka filmimist"
135
136#: /home/kristjan/translations/po/../src/eidete.vala:463
124msgid "Finish"137msgid "Finish"
125msgstr "Lõpeta"138msgstr "Lõpeta"
126139
127#: /home/codygarver/eidete/po/../src/eidete.vala:425140#: /home/kristjan/translations/po/../src/eidete.vala:464
128msgid "Finish recording"141msgid "Stop the recording and save the file"
129msgstr "Lõpeta lindistamine"142msgstr "Peata filmimine ning salvesta video"
130143
131#: /home/codygarver/eidete/po/../src/eidete.vala:427144#: /home/kristjan/translations/po/../src/eidete.vala:467
132msgid "Record more"145msgid "Cancel"
133msgstr "Lindista veel"146msgstr "Katkesta"
134147
135#: /home/codygarver/eidete/po/../src/eidete.vala:441148#: /home/kristjan/translations/po/../src/eidete.vala:468
136#: /home/codygarver/eidete/po/../src/eidete.vala:588149msgid "Cancel the recording without saving the file"
137msgid "Recording paused"150msgstr "Katkesta filmimine ilma videot salvestamata"
138msgstr "Videolindistamine pausil"151
139152#: /home/kristjan/translations/po/../src/eidete.vala:481
140#: /home/codygarver/eidete/po/../src/eidete.vala:442
141msgid "You can continue or finish the recording now."153msgid "You can continue or finish the recording now."
142msgstr "Sa saad jätkata või lõpetada lindistamise kohe."154msgstr "Sul on võimalus filmimine peatada ning salvestada või jätkata filmimise jätkamist."
143155
144#: /home/codygarver/eidete/po/../src/eidete.vala:598156#: /home/kristjan/translations/po/../src/eidete.vala:636
145msgid "Pause recording"157msgid "Pause recording"
146msgstr "Peata lindistamine"158msgstr "Peata filmimine"
147159
148#: /home/codygarver/eidete/po/../src/desktop_launcher.vala:5160#: /home/kristjan/translations/po/../src/eidete.vala:656
149msgid "Record screencasts"161msgid "Pause Recording"
150msgstr "Kaardrite lindistamine"162msgstr "Peata filmimine"
151163
152#: /home/codygarver/eidete/po/../src/desktop_launcher.vala:6164#: /home/kristjan/translations/po/../src/eidete.vala:657
153msgid "Screencaster"165msgid "Finish Recording"
154msgstr "Kaadristaja"166msgstr "Lõpeta filmimine"
167
168#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:24
169msgid "Recording complete"
170msgstr "Filmimine lõpetatud"
171
172#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:33
173msgid "Don't save"
174msgstr "Ära salvesta"
175
176#: /home/kristjan/translations/po/../src/Widgets/end_dialog.vala:62
177msgid "Could not contact Contractor. Click the Save button to save the file."
178msgstr "Contractor'iga polnud võimalik ühendust saada. Faili salvestamiseks vajuta salvestamise nupule."
179
180#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:48
181msgid "Left"
182msgstr "Vasak"
183
184#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:51
185msgid "Middle"
186msgstr "Keskmine"
187
188#: /home/kristjan/translations/po/../src/Widgets/keyview.vala:54
189msgid "Right"
190msgstr "Parem"
191
192#: /home/kristjan/translations/po/../src/Widgets/countdown.vala:27
193msgid "Recording starts in"
194msgstr "Filmimine algab"
195
196#: /home/kristjan/translations/po/../src/Widgets/countdown.vala:33
197msgid "Focus Eidete to stop recording"
198msgstr "Filmimise lõpetamiseks fokuseeri Eidete"
199
200#~ msgid "Close without saving"
201#~ msgstr "Sulge salvestamata"
155202
=== modified file 'src/Widgets/countdown.vala'
--- src/Widgets/countdown.vala 2012-05-22 17:19:03 +0000
+++ src/Widgets/countdown.vala 2013-05-18 07:55:30 +0000
@@ -3,15 +3,15 @@
33
44
5namespace Eidete.Widgets{5namespace Eidete.Widgets{
6 6
7 public class Countdown : Granite.Widgets.CompositedWindow {7 public class Countdown : Granite.Widgets.CompositedWindow {
8 8
9 public Label count;9 public Label count;
10 public int time;10 public int time;
11 11
12 public Countdown (){12 public Countdown (){
13 this.time = 5;13 this.time = 5;
14 14
15 this.set_default_size (300, 200);15 this.set_default_size (300, 200);
16 this.window_position = WindowPosition.CENTER;16 this.window_position = WindowPosition.CENTER;
17 this.set_keep_above (true);17 this.set_keep_above (true);
@@ -19,27 +19,29 @@
19 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;19 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;
20 this.skip_pager_hint = true;20 this.skip_pager_hint = true;
21 this.skip_taskbar_hint = true;21 this.skip_taskbar_hint = true;
22 22
23 var box = new Box (Orientation.VERTICAL, 0);23 var box = new Box (Orientation.VERTICAL, 0);
24 box.margin = 40;24 box.margin = 40;
25 box.margin_left = box.margin_right = 60;25 box.margin_left = box.margin_right = 60;
26 26
27 var title = new Label ("<span size='20000' color='#fbfbfb'>"+_("Recording starts in")+"</span>");27 var title = new Label ("<span size='20000' color='#fbfbfb'>"+_("Recording starts in")+"…"+"</span>");
28 title.use_markup = true;28 title.use_markup = true;
29 29 title.margin_bottom = 20;
30
30 this.count = new Label ("<span size='40000' color='#fbfbfb'>"+time.to_string ()+"</span>");31 this.count = new Label ("<span size='40000' color='#fbfbfb'>"+time.to_string ()+"</span>");
31 this.count.use_markup = true;32 this.count.use_markup = true;
32 33
33 var tipp = new Label("<span size='10000' color='#fbfbfb'>"+_("Focus Eidete to stop recording")+"</span>");34 var tipp = new Label("<span size='10000' color='#fbfbfb' font-style='italic'>"+_("Focus Eidete to stop recording")+"</span>");
34 tipp.use_markup = true;35 tipp.use_markup = true;
35 36 tipp.margin_top = 20;
37
36 box.pack_start (title);38 box.pack_start (title);
37 box.pack_start (count);39 box.pack_start (count);
38 box.pack_start (tipp);40 box.pack_start (tipp);
39 41
40 this.add (box);42 this.add (box);
41 }43 }
42 44
43 public override bool draw (Cairo.Context ctx){45 public override bool draw (Cairo.Context ctx){
44 int w = this.get_allocated_width ();46 int w = this.get_allocated_width ();
45 int h = this.get_allocated_height ();47 int h = this.get_allocated_height ();
@@ -48,9 +50,9 @@
48 ctx.fill ();50 ctx.fill ();
49 return base.draw (ctx);51 return base.draw (ctx);
50 }52 }
51 53
52 public void start (EideteApp app){54 public void start (EideteApp app){
53 55
54 this.show_all ();56 this.show_all ();
55 Timeout.add (1000, () => {57 Timeout.add (1000, () => {
56 this.time --;58 this.time --;
@@ -68,10 +70,10 @@
68 return true;70 return true;
69 });71 });
70 }72 }
71 73
72 }74 }
73 75
74 76
75}77}
7678
7779
7880
=== modified file 'src/Widgets/end_dialog.vala'
--- src/Widgets/end_dialog.vala 2012-08-05 00:55:04 +0000
+++ src/Widgets/end_dialog.vala 2013-05-18 07:55:30 +0000
@@ -2,66 +2,64 @@
22
33
4namespace Eidete.Widgets {4namespace Eidete.Widgets {
5 5
6 private bool contractor;6 private bool contractor;
7 7
8 public class EndDialog : Window {8 public class EndDialog : Window {
9 public EndDialog (EideteApp app){9 public EndDialog (EideteApp app){
10 this.set_default_size (400, 200);10 this.set_default_size (400, 200);
11 11
12 this.set_application (app);12 this.set_application (app);
13 13
14 if (app.selectionarea != null)14 if (app.selectionarea != null)
15 app.selectionarea.destroy ();15 app.selectionarea.destroy ();
16 if (app.keyview != null)16 if (app.keyview != null)
17 app.keyview.destroy ();17 app.keyview.destroy ();
18 this.window_position = WindowPosition.CENTER;18 this.window_position = WindowPosition.CENTER;
19 this.icon_name = "eidete";19 this.icon_name = "eidete";
20 20
21 var grid = new Grid ();21 var grid = new Grid ();
22 grid.margin = 12;22 grid.margin = 12;
23 23
24 var title = new Label ("<span size='30000'>"+_("Recording done")+"</span>");24 var title = new Label ("<span size='30000'>"+_("Recording complete")+"</span>");
25 title.use_markup = true;25 title.use_markup = true;
26 title.halign = Align.START;26 title.halign = Align.START;
27 var sub_title = new Label ("<span size='15000'>"+_("And now?")+"</span>");27
28 sub_title.use_markup = true;28 var export = new Button.with_label (_("Save"));
29 sub_title.halign = Align.START;29 export.image = new Image.from_stock (Stock.SAVE, IconSize.BUTTON);
30
31 var export = new Button.with_label (_("Go"));
32 export.image = new Image.from_stock (Stock.YES, IconSize.BUTTON);
33 export.can_default = true;30 export.can_default = true;
34 this.set_default (export);31 this.set_default (export);
35 32
36 var cancel = new Button.from_stock (Stock.CANCEL);33 var cancel = new Button.with_label (_("Don't save"));
34 cancel.image = new Image.from_stock (Stock.DELETE, IconSize.BUTTON);
37 cancel.halign = Align.END;35 cancel.halign = Align.END;
38 36
39 var bbox = new ButtonBox (Orientation.HORIZONTAL);37 var bbox = new ButtonBox (Orientation.HORIZONTAL);
40 bbox.pack_end (cancel, false, true, 0);38 bbox.pack_end (cancel, false, true, 0);
41 bbox.pack_end (export, false, true, 0);39 bbox.pack_end (export, false, true, 0);
42 bbox.layout_style = ButtonBoxStyle.END;40 bbox.layout_style = ButtonBoxStyle.END;
43 41
44 //contractor42 //contractor
45 var list = new ListStore (2, typeof (Gdk.Pixbuf), typeof (string));43 var list = new ListStore (2, typeof (Gdk.Pixbuf), typeof (string));
46 var t = new TreeView.with_model (list);44 var t = new TreeView.with_model (list);
47 t.headers_visible = false;45 t.headers_visible = false;
48 t.hexpand = true;46 t.hexpand = true;
49 47
50 var cell1 = new CellRendererPixbuf ();48 var cell1 = new CellRendererPixbuf ();
51 cell1.set_padding (5, 15);49 cell1.set_padding (5, 15);
52 t.insert_column_with_attributes (-1, "", cell1, "pixbuf", 0);50 t.insert_column_with_attributes (-1, "", cell1, "pixbuf", 0);
53 var cell2 = new CellRendererText ();51 var cell2 = new CellRendererText ();
54 cell2.set_padding (2, 15);52 cell2.set_padding (2, 15);
55 t.insert_column_with_attributes (-1, "", cell2, "markup", 1);53 t.insert_column_with_attributes (-1, "", cell2, "markup", 1);
56 54
57 55
58 var c = Granite.Services.Contractor.get_contract (app.settings.destination, "video");56 var c = Granite.Services.Contractor.get_contract (app.settings.destination, "video");
59 if (c == null || c.length <= 1){57 if (c == null || c.length <= 1){
60 warning ("You should install and/or run contractor");58 warning ("You should install and/or run contractor");
61 contractor = false;59 contractor = false;
62 var info = new InfoBar ();60 var info = new InfoBar ();
63 info.message_type = MessageType.WARNING;61 info.message_type = MessageType.WARNING;
64 info.pack_start (new Label (_("Could not contact Contractor. Click Save to save the file")));62 info.pack_start (new Label (_("Could not contact Contractor. Click the Save button to save the file.")));
65 grid.attach (info, 0, 3, 2, 1);63 grid.attach (info, 0, 3, 2, 1);
66 export.label = _("Save");64 export.label = _("Save");
67 }else{65 }else{
@@ -73,19 +71,18 @@
73 try{71 try{
74 icon = IconTheme.get_default ().load_icon (c[i].lookup ("IconName"), 32, 0);72 icon = IconTheme.get_default ().load_icon (c[i].lookup ("IconName"), 32, 0);
75 }catch (Error e){warning (e.message);}73 }catch (Error e){warning (e.message);}
76 list.set (it, 0, icon, 1, 74 list.set (it, 0, icon, 1,
77 "<b>"+c[i].lookup ("Name")+"</b>\n"+c[i].lookup ("Description"));75 "<b>"+c[i].lookup ("Name")+"</b>\n"+c[i].lookup ("Description"));
78 }76 }
79 t.set_cursor (new TreePath.from_string ("0"), null, false);77 t.set_cursor (new TreePath.from_string ("0"), null, false);
80 }78 }
81 79
82 grid.attach (title, 0, 0, 2, 1);80 grid.attach (title, 0, 0, 2, 1);
83 grid.attach (sub_title, 0, 1, 2, 1);
84 grid.attach (new Label (""), 0, 2, 1, 1);81 grid.attach (new Label (""), 0, 2, 1, 1);
85 grid.attach (t, 0, 4, 1, 1);82 grid.attach (t, 0, 4, 1, 1);
86 grid.attach (new Label (""), 0, 5, 1, 1);83 grid.attach (new Label (""), 0, 5, 1, 1);
87 grid.attach (bbox, 0, 6, 1, 1);84 grid.attach (bbox, 0, 6, 1, 1);
88 85
89 if (contractor){86 if (contractor){
90 export.clicked.connect ( () => {87 export.clicked.connect ( () => {
91 TreePath path;88 TreePath path;
@@ -109,7 +106,7 @@
109 try{106 try{
110 source.copy (destination, FileCopyFlags.OVERWRITE);107 source.copy (destination, FileCopyFlags.OVERWRITE);
111 }catch (GLib.Error e){stderr.printf ("Error: %s\n", e.message);}108 }catch (GLib.Error e){stderr.printf ("Error: %s\n", e.message);}
112 109
113 file.destroy ();110 file.destroy ();
114 this.destroy ();111 this.destroy ();
115 }else{112 }else{
@@ -118,7 +115,7 @@
118 });115 });
119 }116 }
120 cancel.clicked.connect ( () => {this.destroy ();});117 cancel.clicked.connect ( () => {this.destroy ();});
121 118
122 this.add (grid);119 this.add (grid);
123 }120 }
124 }121 }
125122
=== modified file 'src/Widgets/keyview.vala'
--- src/Widgets/keyview.vala 2012-04-18 15:35:01 +0000
+++ src/Widgets/keyview.vala 2013-05-18 07:55:30 +0000
@@ -3,9 +3,9 @@
33
44
5namespace Eidete.Widgets {5namespace Eidete.Widgets {
6 6
7 public class YellowCircle : Granite.Widgets.CompositedWindow {7 public class YellowCircle : Granite.Widgets.CompositedWindow {
8 8
9 public YellowCircle (Gdk.RGBA color) {9 public YellowCircle (Gdk.RGBA color) {
10 this.skip_pager_hint = true;10 this.skip_pager_hint = true;
11 this.skip_taskbar_hint = true;11 this.skip_taskbar_hint = true;
@@ -13,26 +13,26 @@
13 this.stick ();13 this.stick ();
14 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;14 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;
15 this.accept_focus = false;15 this.accept_focus = false;
16 16
17 this.draw.connect ( (ctx) => {17 this.draw.connect ( (ctx) => {
18 ctx.arc (this.get_allocated_width () / 2, this.get_allocated_height () / 2, 18 ctx.arc (this.get_allocated_width () / 2, this.get_allocated_height () / 2,
19 this.get_allocated_width () / 2, 0, 6.28318);19 this.get_allocated_width () / 2, 0, 6.28318);
20 ctx.set_source_rgba (color.red, color.green, color.blue, color.alpha);20 ctx.set_source_rgba (color.red, color.green, color.blue, color.alpha);
21 ctx.fill ();21 ctx.fill ();
22 return false;22 return false;
23 });23 });
24 24
25 this.set_size_request (70, 70);25 this.set_size_request (70, 70);
26 this.realize ();26 this.realize ();
27 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle ({0, 0, 1, 1}), 0, 0);27 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle ({0, 0, 1, 1}), 0, 0);
28 this.show_all ();28 this.show_all ();
29 }29 }
30 30
31 public new void move (int x, int y) {31 public new void move (int x, int y) {
32 base.move (x - (int)(this.get_allocated_width ()/2), y - (int)(this.get_allocated_height ()/2));32 base.move (x - (int)(this.get_allocated_width ()/2), y - (int)(this.get_allocated_height ()/2));
33 }33 }
34 }34 }
35 35
36 public class ClickWindow : Granite.Widgets.CompositedWindow {36 public class ClickWindow : Granite.Widgets.CompositedWindow {
37 public ClickWindow (int x, int y, int button) {37 public ClickWindow (int x, int y, int button) {
38 this.skip_pager_hint = true;38 this.skip_pager_hint = true;
@@ -41,17 +41,17 @@
41 this.stick ();41 this.stick ();
42 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;42 this.type_hint = Gdk.WindowTypeHint.SPLASHSCREEN;
43 this.accept_focus = false;43 this.accept_focus = false;
44 44
45 string label = "";45 string label = "";
46 switch (button) {46 switch (button) {
47 case 1:47 case 1:
48 label = "Left";48 label = _("Left");
49 break;49 break;
50 case 2:50 case 2:
51 label = "Middle";51 label = _("Middle");
52 break;52 break;
53 case 3:53 case 3:
54 label = "Right";54 label = _("Right");
55 break;55 break;
56 default:56 default:
57 break;57 break;
@@ -65,12 +65,12 @@
65 css.load_from_data ("*{color:#fff; text-shadow:1 1 #000;}", -1);65 css.load_from_data ("*{color:#fff; text-shadow:1 1 #000;}", -1);
66 } catch (Error e) { warning (e.message); }66 } catch (Error e) { warning (e.message); }
67 lbl.get_style_context ().add_provider (css, 20000);67 lbl.get_style_context ().add_provider (css, 20000);
68 68
69 this.realize ();69 this.realize ();
70 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle ({0, 0, 1, 1}), 0, 0);70 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle ({0, 0, 1, 1}), 0, 0);
71 this.show_all ();71 this.show_all ();
72 this.move (x + 5, y + 5);72 this.move (x + 5, y + 5);
73 73
74 Timeout.add (10, () => {74 Timeout.add (10, () => {
75 this.opacity -= 0.007;75 this.opacity -= 0.007;
76 if (this.opacity < 0.1) //prevent flickering76 if (this.opacity < 0.1) //prevent flickering
@@ -83,10 +83,10 @@
83 });83 });
84 }84 }
85 }85 }
86 86
87 87
88 public class Key : Label {88 public class Key : Label {
89 89
90 public string key;90 public string key;
91 public bool ctrl;91 public bool ctrl;
92 public bool shift;92 public bool shift;
@@ -94,7 +94,7 @@
94 public bool super;94 public bool super;
95 public bool iso_level3_shift;95 public bool iso_level3_shift;
96 public int count;96 public int count;
97 97
98 public Key (string key, bool ctrl, bool shift, bool alt, bool super, bool iso_level3_shift){98 public Key (string key, bool ctrl, bool shift, bool alt, bool super, bool iso_level3_shift){
99 this.key = key;99 this.key = key;
100 this.ctrl = ctrl;100 this.ctrl = ctrl;
@@ -105,45 +105,45 @@
105 this.count = 1;105 this.count = 1;
106 }106 }
107 }107 }
108 108
109 109
110 public class KeyView : Granite.Widgets.CompositedWindow {110 public class KeyView : Granite.Widgets.CompositedWindow {
111 111
112 public int key_size;112 public int key_size;
113 public int fade_duration;113 public int fade_duration;
114 114
115 115
116 116
117 private bool ctrl;117 private bool ctrl;
118 private bool shift;118 private bool shift;
119 private bool alt;119 private bool alt;
120 private bool super;120 private bool super;
121 private bool iso_level3_shift;121 private bool iso_level3_shift;
122 122
123 private int screen_h;123 private int screen_h;
124 124
125 public Queue<Key> keys;125 public Queue<Key> keys;
126 126
127 public YellowCircle circle;127 public YellowCircle circle;
128 128
129 public Cairo.ImageSurface key_bg;129 public Cairo.ImageSurface key_bg;
130 130
131 [CCode (cname = "intercept_key_thread")]131 [CCode (cname = "intercept_key_thread")]
132 public extern void *intercept_key_thread ();132 public extern void *intercept_key_thread ();
133 133
134 public signal void captured (string keyvalue, bool released);134 public signal void captured (string keyvalue, bool released);
135 public signal void captured_mouse (int x, int y, int button);135 public signal void captured_mouse (int x, int y, int button);
136 public signal void captured_move (int x, int y);136 public signal void captured_move (int x, int y);
137 137
138 public override bool draw (Cairo.Context ctx){138 public override bool draw (Cairo.Context ctx){
139 139
140 //key140 //key
141 for (var i=0;i<keys.length;i++){141 for (var i=0;i<keys.length;i++){
142 ctx.set_source_surface (key_bg, 0, screen_h - (i+2)*key_size);142 ctx.set_source_surface (key_bg, 0, screen_h - (i+2)*key_size);
143 ctx.paint ();143 ctx.paint ();
144 144
145 ctx.set_source_rgba (1.0, 1.0, 1.0, 1.0);145 ctx.set_source_rgba (1.0, 1.0, 1.0, 1.0);
146 146
147 int [] sizes = {0, 30, 45, 55, 60};147 int [] sizes = {0, 30, 45, 55, 60};
148 print ("%i\n", keys.peek_nth (i).key.length);148 print ("%i\n", keys.peek_nth (i).key.length);
149149
@@ -155,7 +155,7 @@
155155
156 ctx.move_to (key_size - 40, screen_h - (i+1)*key_size-20);156 ctx.move_to (key_size - 40, screen_h - (i+1)*key_size-20);
157 ctx.show_text (keys.peek_nth (i).key);157 ctx.show_text (keys.peek_nth (i).key);
158 158
159 ctx.set_font_size (18);159 ctx.set_font_size (18);
160 if (keys.peek_nth (i).count > 1){160 if (keys.peek_nth (i).count > 1){
161 ctx.move_to (3, screen_h - (i+1)*key_size - (key_size-12));161 ctx.move_to (3, screen_h - (i+1)*key_size - (key_size-12));
@@ -183,21 +183,21 @@
183 ctx.show_text ("AltGr");183 ctx.show_text ("AltGr");
184 }184 }
185 }185 }
186 186
187 return base.draw (ctx);187 return base.draw (ctx);
188 }188 }
189 189
190 public void place (int x, int y, int h){190 public void place (int x, int y, int h){
191 this.set_size_request (key_size, h);191 this.set_size_request (key_size, h);
192 this.resize (key_size, h);192 this.resize (key_size, h);
193 this.move (x - key_size, y);193 this.move (x - key_size, y);
194 this.screen_h = h;194 this.screen_h = h;
195 }195 }
196 196
197 public KeyView (bool keyboard, bool mouse, bool mouse_circle, Gdk.RGBA mouse_circle_color){197 public KeyView (bool keyboard, bool mouse, bool mouse_circle, Gdk.RGBA mouse_circle_color){
198 this.key_size = 75;198 this.key_size = 75;
199 this.fade_duration = 2000;199 this.fade_duration = 2000;
200 200
201 this.stick ();201 this.stick ();
202 this.set_keep_above (true);202 this.set_keep_above (true);
203 this.deletable = false;203 this.deletable = false;
@@ -206,32 +206,32 @@
206 this.skip_pager_hint = true;206 this.skip_pager_hint = true;
207 this.skip_taskbar_hint = true;207 this.skip_taskbar_hint = true;
208 this.accept_focus = false;208 this.accept_focus = false;
209 209
210 this.type_hint = Gdk.WindowTypeHint.NOTIFICATION;210 this.type_hint = Gdk.WindowTypeHint.NOTIFICATION;
211 this.events = Gdk.EventMask.BUTTON_MOTION_MASK | Gdk.EventMask.BUTTON1_MOTION_MASK | 211 this.events = Gdk.EventMask.BUTTON_MOTION_MASK | Gdk.EventMask.BUTTON1_MOTION_MASK |
212 Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK ;212 Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK ;
213 213
214 this.realize ();214 this.realize ();
215 215
216 Cairo.RectangleInt rect = {0, 0, 1, 1};216 Cairo.RectangleInt rect = {0, 0, 1, 1};
217 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle (rect), 0, 0);217 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle (rect), 0, 0);
218 218
219 this.enter_notify_event.connect ( () => {219 this.enter_notify_event.connect ( () => {
220 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle (rect), 0, 0);220 this.get_window ().input_shape_combine_region (new Cairo.Region.rectangle (rect), 0, 0);
221 return true;221 return true;
222 });222 });
223 223
224 this.keys = new Queue<Key> ();224 this.keys = new Queue<Key> ();
225 225
226 //setup the key background226 //setup the key background
227 key_bg = new Cairo.ImageSurface (Cairo.Format.ARGB32, key_size, key_size);227 key_bg = new Cairo.ImageSurface (Cairo.Format.ARGB32, key_size, key_size);
228 var ctx = new Cairo.Context (key_bg);228 var ctx = new Cairo.Context (key_bg);
229 Granite.Drawing.Utilities.cairo_rounded_rectangle (ctx, 5, 5, key_size-10, key_size-10, 5);229 Granite.Drawing.Utilities.cairo_rounded_rectangle (ctx, 5, 5, key_size-10, key_size-10, 5);
230 ctx.set_source_rgba (0.2, 0.2, 0.2, 0.7);230 ctx.set_source_rgba (0.2, 0.2, 0.2, 0.7);
231 ctx.fill_preserve ();231 ctx.fill_preserve ();
232 232
233 capture ();233 capture ();
234 234
235 Timeout.add (fade_duration, () => {235 Timeout.add (fade_duration, () => {
236 if (!keys.is_empty ()){236 if (!keys.is_empty ()){
237 keys.pop_tail ();237 keys.pop_tail ();
@@ -239,7 +239,7 @@
239 }239 }
240 return true;240 return true;
241 });241 });
242 242
243 if (mouse_circle) {243 if (mouse_circle) {
244 this.circle = new YellowCircle (mouse_circle_color);244 this.circle = new YellowCircle (mouse_circle_color);
245 this.captured_move.connect ( (x, y) => {245 this.captured_move.connect ( (x, y) => {
@@ -247,14 +247,14 @@
247 //debug ("Moved to %i, %i\n", x, y);247 //debug ("Moved to %i, %i\n", x, y);
248 });248 });
249 }249 }
250 250
251 if (mouse)251 if (mouse)
252 this.captured_mouse.connect ( (x, y, button) => {252 this.captured_mouse.connect ( (x, y, button) => {
253 debug ("Button %i pressed at %i, %i ", button, x, y);253 debug ("Button %i pressed at %i, %i ", button, x, y);
254 if (button <= 3)254 if (button <= 3)
255 Timeout.add (10, () => { new ClickWindow (x, y, button); return false; });255 Timeout.add (10, () => { new ClickWindow (x, y, button); return false; });
256 });256 });
257 257
258 if (keyboard)258 if (keyboard)
259 this.captured.connect ( (keyvalue, released) => {259 this.captured.connect ( (keyvalue, released) => {
260 if (released){260 if (released){
@@ -289,7 +289,7 @@
289 switch (res){289 switch (res){
290 case "Control_L":290 case "Control_L":
291 case "Control_R":291 case "Control_R":
292 this.ctrl = true; 292 this.ctrl = true;
293 this.queue_draw ();293 this.queue_draw ();
294 return;294 return;
295 case "Shift_L":295 case "Shift_L":
@@ -404,10 +404,10 @@
404 res = keyvalue.substring (0, 9);404 res = keyvalue.substring (0, 9);
405 break;405 break;
406 }406 }
407 407
408 if ((!keys.is_empty ()) &&408 if ((!keys.is_empty ()) &&
409 (keys.peek_head ().key == res) && 409 (keys.peek_head ().key == res) &&
410 (keys.peek_head ().ctrl == ctrl) && 410 (keys.peek_head ().ctrl == ctrl) &&
411 (keys.peek_head ().shift == shift) &&411 (keys.peek_head ().shift == shift) &&
412 (keys.peek_head ().alt == alt) &&412 (keys.peek_head ().alt == alt) &&
413 (keys.peek_head ().iso_level3_shift == iso_level3_shift)){413 (keys.peek_head ().iso_level3_shift == iso_level3_shift)){
@@ -425,7 +425,7 @@
425 }425 }
426 });426 });
427 }427 }
428 428
429 public void capture (){429 public void capture (){
430 try{430 try{
431 Thread.create<void*> (this.intercept_key_thread, true);431 Thread.create<void*> (this.intercept_key_thread, true);
432432
=== modified file 'src/eidete.vala'
--- src/eidete.vala 2012-08-05 00:39:41 +0000
+++ src/eidete.vala 2013-05-18 07:55:30 +0000
@@ -6,7 +6,7 @@
66
77
8namespace Eidete{8namespace Eidete{
9 9
10 class LLabel : Label{10 class LLabel : Label{
11 public LLabel (string label){11 public LLabel (string label){
12 this.set_halign (Align.START);12 this.set_halign (Align.START);
@@ -30,8 +30,8 @@
30 this.label = label;30 this.label = label;
31 }31 }
32 }32 }
33 33
34 34
35 public struct Settings{35 public struct Settings{
36 public int sx;36 public int sx;
37 public int sy;37 public int sy;
@@ -45,39 +45,39 @@
45 public Gdk.RGBA mouse_circle_color;45 public Gdk.RGBA mouse_circle_color;
46 public string destination;46 public string destination;
47 }47 }
48 48
49 public class EideteApp : Granite.Application{49 public class EideteApp : Granite.Application{
50 50
51 construct{51 construct{
52 program_name = "Eidete";52 program_name = "Eidete";
53 exec_name = "eidete";53 exec_name = "eidete";
54 54
55 build_data_dir = Constants.DATADIR;55 build_data_dir = Constants.DATADIR;
56 build_pkg_data_dir = Constants.PKGDATADIR;56 build_pkg_data_dir = Constants.PKGDATADIR;
57 build_release_name = Constants.RELEASE_NAME;57 build_release_name = Constants.RELEASE_NAME;
58 build_version = Constants.VERSION;58 build_version = Constants.VERSION;
59 build_version_info = Constants.VERSION_INFO;59 build_version_info = Constants.VERSION_INFO;
60 60
61 app_years = "2011-2012";61 app_years = "2011-2012";
62 app_icon = "eidete";62 app_icon = "eidete";
63 app_launcher = "eidete.desktop";63 app_launcher = "eidete.desktop";
64 application_id = "net.launchpad.eidete";64 application_id = "net.launchpad.eidete";
65 65
66 main_url = "https://code.launchpad.net/eidete";66 main_url = "https://code.launchpad.net/eidete";
67 bug_url = "https://bugs.launchpad.net/eidete";67 bug_url = "https://bugs.launchpad.net/eidete";
68 help_url = "https://code.launchpad.net/eidete";68 help_url = "https://code.launchpad.net/eidete";
69 translate_url = "https://translations.launchpad.net/eidete";69 translate_url = "https://translations.launchpad.net/eidete";
70 70
71 about_authors = {"Tom Beckmann <tombeckmann@online.de>"};71 about_authors = {"Tom Beckmann <tombeckmann@online.de>"};
72 about_documenters = {"Tom Beckmann <tombeckmann@online.de>"};72 about_documenters = {"Tom Beckmann <tombeckmann@online.de>"};
73 about_artists = {"Harvey Cabaguio", "Sergey 'shnatsel' Davidoff"};73 about_artists = {"Harvey Cabaguio", "Sergey 'shnatsel' Davidoff"};
74 about_comments = "Development release, not all features implemented";74 about_comments = "Development release (all features not implemented)";
75 about_translators = "";75 about_translators = "";
76 about_license_type = License.GPL_3_0;76 about_license_type = License.GPL_3_0;
77 }77 }
78 78
79 public dynamic Pipeline pipeline;79 public dynamic Pipeline pipeline;
80 80
81 public Window main_window;81 public Window main_window;
82 public Eidete.Widgets.KeyView keyview;82 public Eidete.Widgets.KeyView keyview;
83 public Eidete.Widgets.SelectionArea selectionarea;83 public Eidete.Widgets.SelectionArea selectionarea;
@@ -87,9 +87,9 @@
87 public Wnck.Window win;87 public Wnck.Window win;
88 public Gdk.Screen screen;88 public Gdk.Screen screen;
89 public Gdk.Rectangle monitor_rec;89 public Gdk.Rectangle monitor_rec;
90 90
91 public Settings settings;91 public Settings settings;
92 92
93 public bool recording;93 public bool recording;
94 public bool typing_size;94 public bool typing_size;
9595
@@ -98,99 +98,121 @@
9898
99 public EideteApp (){99 public EideteApp (){
100 }100 }
101 101
102 public void start_and_build () {102 public void start_and_build () {
103 103
104 Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = true;104 Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = true;
105 105
106 this.main_window = new Window ();106 this.main_window = new Window ();
107 this.main_window.title = program_name;107 this.main_window.title = program_name;
108 this.main_window.icon_name = exec_name;108 this.main_window.icon_name = exec_name;
109 this.main_window.set_application (this);109 this.main_window.set_application (this);
110 this.main_window.window_position = WindowPosition.CENTER;110 this.main_window.window_position = WindowPosition.CENTER;
111 this.main_window.set_resizable (false);111 this.main_window.set_resizable (false);
112 112
113 113
114 if (!this.main_window.is_composited ()){114 if (!this.main_window.is_composited ()){
115 warning ("Compositing is not supported. No transparency available.");115 warning ("Compositing is not supported. No transparency available.");
116 }116 }
117 117
118 118
119 /*119 /*
120 UI120 UI
121 */121 */
122 122
123 tabs = new Granite.Widgets.StaticNotebook (false);123 tabs = new Granite.Widgets.StaticNotebook (false);
124 tabs.margin = 12;124 tabs.margin = 12;
125 125
126 pause_icon = new Image.from_icon_name ("media-playback-pause", IconSize.DIALOG);126 pause_icon = new Image.from_icon_name ("media-playback-pause", IconSize.DIALOG);
127 pause_icon.pixel_size = 64;127 pause_icon.pixel_size = 64;
128 128
129 129
130 var grid = new Grid ();130 var grid = new Grid ();
131 grid.column_spacing = 12;131 grid.column_spacing = 12;
132 grid.row_spacing = 6;132 grid.row_spacing = 6;
133 grid.hexpand = true;133 grid.hexpand = false;
134 134
135 var monitors_combo = new ComboBoxText ();135 var monitors_combo = new ComboBoxText ();
136 monitors_combo.hexpand = true;136 monitors_combo.hexpand = true;
137 monitors_combo.margin_left = 6;
138 for (var i=0;i<Gdk.Screen.get_default ().get_n_monitors (); i++)137 for (var i=0;i<Gdk.Screen.get_default ().get_n_monitors (); i++)
139 monitors_combo.append (i.to_string (), _("Monitor")+" "+(i+1).to_string ());138 monitors_combo.append (i.to_string (), _("Monitor")+" "+(i+1).to_string ());
140 monitors_combo.active = 0;139 monitors_combo.active = 0;
141 if (Gdk.Screen.get_default ().get_n_monitors () == 1)140 if (Gdk.Screen.get_default ().get_n_monitors () == 1)
142 monitors_combo.set_sensitive (false);141 monitors_combo.set_sensitive (false);
143 142
144 var width = new SpinButton.with_range (50, Gdk.Screen.get_default ().get_width (), 1);143 var width = new SpinButton.with_range (50, Gdk.Screen.get_default ().get_width (), 1);
145 width.max_length = 4;144 width.max_length = 4;
145 width.margin_left = 1;
146 width.margin_right = -4;
147
146 var height = new SpinButton.with_range (50, Gdk.Screen.get_default ().get_height (), 1);148 var height = new SpinButton.with_range (50, Gdk.Screen.get_default ().get_height (), 1);
147 height.max_length = 4;149 height.max_length = 4;
150 height.margin_left = 1;
151 height.margin_right = -4;
148 width.set_sensitive (false);152 width.set_sensitive (false);
149 height.set_sensitive (false);153 height.set_sensitive (false);
150 width.halign = Align.START;154 width.halign = Align.START;
151 height.halign = Align.START;155 height.halign = Align.START;
152 156
153 var recordingarea_combo = new ComboBoxText ();157 var recordingarea_combo = new ComboBoxText ();
154 recordingarea_combo.append ("full", _("Fullscreen"));158 recordingarea_combo.append ("full", _("Fullscreen"));
155 recordingarea_combo.append ("custom", _("Custom"));159 recordingarea_combo.append ("custom", _("Custom"));
156 recordingarea_combo.active = 0;160 recordingarea_combo.active = 0;
157 161
158 var use_comp_sounds = new CheckButton ();162 var use_comp_sounds = new CheckButton ();
159 use_comp_sounds.halign = Align.START;163 use_comp_sounds.halign = Align.START;
160 use_comp_sounds.set_sensitive (false);164 use_comp_sounds.set_sensitive (false);
165
161 var use_audio = new CheckButton ();166 var use_audio = new CheckButton ();
162 use_audio.halign = Align.END;167 use_audio.halign = Align.START;
163 168
164 var audio_source = new ComboBoxText ();169 var audio_source = new ComboBoxText ();
165 audio_source.margin_left = 6;170 audio_source.append ("0", _("Default"));
166 audio_source.append ("0", "Default");
167 audio_source.active = 0;171 audio_source.active = 0;
168 audio_source.hexpand = true;172 audio_source.hexpand = true;
169 audio_source.set_sensitive (false);173 audio_source.set_sensitive (false);
170 174
171 var audio_box = new Box (Orientation.HORIZONTAL, 0);175 var audio_box = new Box (Orientation.HORIZONTAL, 0);
172 audio_box.pack_start (use_audio, false, true, 0);176 audio_box.pack_start (use_audio, false, true, 0);
173 audio_box.pack_start (audio_source, true, true, 0);177 audio_box.pack_start (audio_source, true, true, 0);
174 178
175 var start_bt = new Button.with_label (_("Record"));179 var sound = new LLabel.markup ("<b>"+_("Sound")+":"+"</b>");
180 sound.margin_top = 18;
181
182 var video = new LLabel.markup ("<b>"+_("Video")+":"+"</b>");
183 video.margin_top = 12;
184
185 var keyboard = new LLabel.markup ("<b>"+_("Keyboard")+":"+"</b>");
186 keyboard.margin_top = 18;
187
188 var mouse = new LLabel.markup ("<b>"+_("Mouse")+":"+"</b>");
189 mouse.margin_top = 12;
190
191 var start_bt = new Button.with_label (_("Start Recording"));
192 start_bt.can_default = true;
193 start_bt.get_style_context ().add_class ("noundo");
194
176 var cancel_bt = new Button.from_stock (Stock.CANCEL);195 var cancel_bt = new Button.from_stock (Stock.CANCEL);
177 var about_bt = new Button.from_stock (Stock.ABOUT);196
197 var about_bt = new Button.with_label (_("About"));
198 about_bt.image = new Image.from_stock (Stock.ABOUT, IconSize.BUTTON);
199
178 var buttons = new Box (Orientation.HORIZONTAL, 5);200 var buttons = new Box (Orientation.HORIZONTAL, 5);
179 buttons.homogeneous = false;201 buttons.homogeneous = true;
202 buttons.pack_start (about_bt, false, true, 0);
203 buttons.pack_start (cancel_bt, false, true, 0);
180 buttons.pack_end (start_bt, false, true, 0);204 buttons.pack_end (start_bt, false, true, 0);
181 buttons.pack_end (cancel_bt, false, true, 0);205 buttons.margin_top = 24;
182 buttons.pack_start (about_bt, false, true, 0);206
183 start_bt.can_default = true;
184 start_bt.get_style_context ().add_class ("noundo");
185 this.main_window.set_default (start_bt);207 this.main_window.set_default (start_bt);
186 208
187 grid.attach (new LLabel.markup ("<b>"+_("Sound")+"</b>"), 0, 0, 2, 1);209 grid.attach ((sound), 0, 0, 1, 1);
188 grid.attach (new LLabel.right (" "+_("Record Computer Sounds")+":"), 0, 1, 1, 1);210 grid.attach (new LLabel.right (_("Record Computer Sounds")), 0, 1, 1, 1);
189 grid.attach (use_comp_sounds, 1, 1, 1, 1);211 grid.attach (use_comp_sounds, 1, 1, 1, 1);
190 grid.attach (new LLabel.right (_("Record from Microphone")+":"), 0, 2, 1, 1);212 grid.attach (new LLabel.right (_("Record from Microphone")+":"), 0, 2, 1, 1);
191 grid.attach (audio_box, 1, 2, 1, 1);213 grid.attach (audio_box, 1, 2, 1, 1);
192 grid.attach (new LLabel.markup ("<b>"+_("Video")+"</b>"), 0, 3, 2, 1);214 grid.attach ((video), 0, 3, 2, 1);
193 grid.attach (new LLabel.right (_("Record from Monitor")+":"), 0, 4, 1, 1);215 grid.attach (new LLabel.right (" "+_("Record from Monitor")+":"), 0, 4, 1, 1);
194 grid.attach (monitors_combo, 1, 4, 1, 1);216 grid.attach (monitors_combo, 1, 4, 1, 1);
195 grid.attach (new LLabel.right (_("Recording Area")+":"), 0, 5, 1, 1);217 grid.attach (new LLabel.right (_("Recording Area")+":"), 0, 5, 1, 1);
196 grid.attach (recordingarea_combo, 1, 5, 1, 1);218 grid.attach (recordingarea_combo, 1, 5, 1, 1);
@@ -199,56 +221,62 @@
199 grid.attach (new LLabel.right (_("Height")+":"), 0, 7, 1, 1);221 grid.attach (new LLabel.right (_("Height")+":"), 0, 7, 1, 1);
200 grid.attach (height, 1, 7, 1, 1);222 grid.attach (height, 1, 7, 1, 1);
201 grid.attach (buttons, 0, 8, 2, 1);223 grid.attach (buttons, 0, 8, 2, 1);
202 224
203 //grid2225 //grid2
204 var grid2 = new Grid ();226 var grid2 = new Grid ();
205 227
206 var use_keyview = new Gtk.CheckButton ();228 var use_keyview = new Gtk.CheckButton ();
207 use_keyview.halign = Gtk.Align.START;229 use_keyview.halign = Gtk.Align.START;
230
208 var use_clickview = new Gtk.CheckButton ();231 var use_clickview = new Gtk.CheckButton ();
209 use_clickview.halign = Gtk.Align.START;232 use_clickview.halign = Gtk.Align.START;
233
210 var use_circle = new Gtk.CheckButton ();234 var use_circle = new Gtk.CheckButton ();
211 use_circle.halign = Gtk.Align.START;235 use_circle.halign = Gtk.Align.START;
236
212 var circle_color = new Gtk.ColorButton ();237 var circle_color = new Gtk.ColorButton ();
238
213 var circle_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);239 var circle_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
214
215 circle_box.pack_start (use_circle, false);240 circle_box.pack_start (use_circle, false);
216 circle_box.pack_start (circle_color);241 circle_box.pack_start (circle_color);
217 242
218 grid2.attach (new LLabel.right (_("Show pressed keys on screen")+":"), 0, 0, 1, 1);243 //grid2.attach (new LLabel
219 grid2.attach (use_keyview, 1, 0, 1, 1);244 grid2.attach ((keyboard), 0, 0, 1, 1);
220 grid2.attach (new LLabel.right (_("Show clicks on screen")+":"), 0, 1, 1, 1);245 grid2.attach (new LLabel.right (_("Pressed keys on screen")+":"), 0, 1, 1, 1);
221 grid2.attach (use_clickview, 1, 1, 1, 1);246 grid2.attach (use_keyview, 1, 1, 1, 1);
222 grid2.attach (new LLabel.right (_("Show circle behind mouse")+":"), 0, 2, 1, 1);247 grid2.attach ((mouse), 0, 2, 1, 1);
223 grid2.attach (circle_box, 1, 2, 1, 1);248 grid2.attach (new LLabel.right (_("Mouse clicks on screen")+":"), 0, 3, 1, 1);
249 grid2.attach (use_clickview, 1, 3, 1, 1);
250 grid2.attach (new LLabel.right (_("Circle around the cursor")+":"), 0, 4, 1, 1);
251 grid2.attach (circle_box, 1, 4, 1, 1);
224 grid2.column_spacing = 12;252 grid2.column_spacing = 12;
225 grid2.row_spacing = 6;253 grid2.row_spacing = 6;
226 grid2.hexpand = true;254 grid2.hexpand = true;
227 255
228 tabs.append_page (grid, new Label (_("Behavior")));256 tabs.append_page (grid, new Label (_("Behavior")));
229 tabs.append_page (grid2, new Label (_("Appearance")));257 tabs.append_page (grid2, new Label (_("Appearance")));
230 258
231 this.main_window.add (tabs);259 this.main_window.add (tabs);
232 this.main_window.show_all ();260 this.main_window.show_all ();
233 this.main_window.present ();261 this.main_window.present ();
234 262
235 /*263 /*
236 Events264 Events
237 */265 */
238 266
267 about_bt.clicked.connect ( () => {
268 this.show_about (this.main_window);
269 });
270
239 cancel_bt.clicked.connect ( () => {271 cancel_bt.clicked.connect ( () => {
240 this.main_window.destroy ();272 this.main_window.destroy ();
241 });273 });
242 274
243 start_bt.clicked.connect ( () => {275 start_bt.clicked.connect ( () => {
244 var count = new Eidete.Widgets.Countdown ();276 var count = new Eidete.Widgets.Countdown ();
245 this.main_window.iconify ();277 this.main_window.iconify ();
246 count.start (this);278 count.start (this);
247 });279 });
248
249 about_bt.clicked.connect ( () => {
250 this.show_about (this.main_window);
251 });
252280
253 this.screen = Gdk.Screen.get_default();281 this.screen = Gdk.Screen.get_default();
254 settings.monitor = 0;282 settings.monitor = 0;
@@ -260,14 +288,14 @@
260 settings.ex = settings.sx + this.monitor_rec.width - 1;288 settings.ex = settings.sx + this.monitor_rec.width - 1;
261 settings.ey = settings.sy + this.monitor_rec.height - 1;289 settings.ey = settings.sy + this.monitor_rec.height - 1;
262 });290 });
263 291
264 settings.monitor = int.parse (monitors_combo.active_id);292 settings.monitor = int.parse (monitors_combo.active_id);
265 this.screen.get_monitor_geometry(settings.monitor, out this.monitor_rec);293 this.screen.get_monitor_geometry(settings.monitor, out this.monitor_rec);
266 settings.sx = this.monitor_rec.x;294 settings.sx = this.monitor_rec.x;
267 settings.sy = this.monitor_rec.y;295 settings.sy = this.monitor_rec.y;
268 settings.ex = settings.sx + this.monitor_rec.width - 1;296 settings.ex = settings.sx + this.monitor_rec.width - 1;
269 settings.ey = settings.sy + this.monitor_rec.height - 1;297 settings.ey = settings.sy + this.monitor_rec.height - 1;
270 298
271 recordingarea_combo.changed.connect ( () => {299 recordingarea_combo.changed.connect ( () => {
272 if (recordingarea_combo.active_id != "full"){300 if (recordingarea_combo.active_id != "full"){
273 selectionarea = new Eidete.Widgets.SelectionArea ();301 selectionarea = new Eidete.Widgets.SelectionArea ();
@@ -303,7 +331,7 @@
303 height.set_sensitive (false);331 height.set_sensitive (false);
304 }332 }
305 });333 });
306 334
307 width.key_release_event.connect ( (e) => {335 width.key_release_event.connect ( (e) => {
308 selectionarea.resize ((int)width.value, (int)height.value);336 selectionarea.resize ((int)width.value, (int)height.value);
309 typing_size = true;337 typing_size = true;
@@ -316,7 +344,7 @@
316 return false;344 return false;
317 });345 });
318 height.focus_out_event.connect ( (e) => {typing_size = false;return false;});346 height.focus_out_event.connect ( (e) => {typing_size = false;return false;});
319 347
320 settings.audio = false;348 settings.audio = false;
321 use_audio.toggled.connect ( () => {349 use_audio.toggled.connect ( () => {
322 settings.audio = use_audio.active;350 settings.audio = use_audio.active;
@@ -326,40 +354,40 @@
326 audio_source.set_sensitive (false);354 audio_source.set_sensitive (false);
327 }355 }
328 });356 });
329 357
330 358
331 Gdk.Screen.get_default ().monitors_changed.connect ( () => {359 Gdk.Screen.get_default ().monitors_changed.connect ( () => {
332 if (Gdk.Screen.get_default ().get_n_monitors () > 1)360 if (Gdk.Screen.get_default ().get_n_monitors () > 1)
333 monitors_combo.set_sensitive (true);361 monitors_combo.set_sensitive (true);
334 else362 else
335 monitors_combo.set_sensitive (false);363 monitors_combo.set_sensitive (false);
336 });364 });
337 365
338 settings.keyview = false;366 settings.keyview = false;
339 use_keyview.toggled.connect ( () => {367 use_keyview.toggled.connect ( () => {
340 settings.keyview = use_keyview.active;368 settings.keyview = use_keyview.active;
341 });369 });
342 370
343 settings.clickview = false;371 settings.clickview = false;
344 use_clickview.toggled.connect ( () => {372 use_clickview.toggled.connect ( () => {
345 settings.clickview = use_clickview.active;373 settings.clickview = use_clickview.active;
346 });374 });
347 375
348 settings.mouse_circle = false;376 settings.mouse_circle = false;
349 use_circle.toggled.connect ( () => {377 use_circle.toggled.connect ( () => {
350 settings.mouse_circle = use_circle.active;378 settings.mouse_circle = use_circle.active;
351 });379 });
352 380
353 settings.mouse_circle_color = {1, 1, 0, 0.3};381 settings.mouse_circle_color = {1, 1, 0, 0.3};
354 circle_color.use_alpha = true;382 circle_color.use_alpha = true;
355 circle_color.rgba = settings.mouse_circle_color;383 circle_color.rgba = settings.mouse_circle_color;
356 circle_color.color_set.connect ( () => {384 circle_color.color_set.connect ( () => {
357 settings.mouse_circle_color = circle_color.rgba;385 settings.mouse_circle_color = circle_color.rgba;
358 });386 });
359 387
360 settings.destination = GLib.Environment.get_tmp_dir ()+388 settings.destination = GLib.Environment.get_tmp_dir ()+
361 "/screencast"+new GLib.DateTime.now_local ().to_unix ().to_string ()+".webm";389 "/screencast"+new GLib.DateTime.now_local ().to_unix ().to_string ()+".webm";
362 390
363 ulong handle = 0;391 ulong handle = 0;
364 handle = Wnck.Screen.get_default().active_window_changed.connect ( () => {392 handle = Wnck.Screen.get_default().active_window_changed.connect ( () => {
365 this.win = Wnck.Screen.get_default().get_active_window ();393 this.win = Wnck.Screen.get_default().get_active_window ();
@@ -372,7 +400,7 @@
372 });400 });
373 Wnck.Screen.get_default ().disconnect (handle);401 Wnck.Screen.get_default ().disconnect (handle);
374 });402 });
375 403
376 this.main_window.focus_in_event.connect ( (ev) => {404 this.main_window.focus_in_event.connect ( (ev) => {
377 if (this.selectionarea != null && !this.selectionarea.not_visible){405 if (this.selectionarea != null && !this.selectionarea.not_visible){
378 this.selectionarea.present ();406 this.selectionarea.present ();
@@ -397,11 +425,11 @@
397 finish_recording ();425 finish_recording ();
398 }426 }
399 });427 });
400 428
401 Granite.Services.Logger.initialize ("Eidete");429 Granite.Services.Logger.initialize ("Eidete");
402 Granite.Services.Logger.DisplayLevel = Granite.Services.LogLevel.DEBUG;430 Granite.Services.Logger.DisplayLevel = Granite.Services.LogLevel.DEBUG;
403 }431 }
404 432
405 public override void activate (){433 public override void activate (){
406 if (this.get_windows ().length () == 0){434 if (this.get_windows ().length () == 0){
407 this.start_and_build ();435 this.start_and_build ();
@@ -413,50 +441,74 @@
413 }441 }
414 }442 }
415 }443 }
416 444
417 private void build_pause_ui (){445 private void build_pause_ui (){
446
418 pause_grid = new Grid ();447 pause_grid = new Grid ();
419 pause_grid.margin = 12;448 pause_grid.margin = 12;
420 449 this.main_window.title = _("Recording paused");
450
451
452 var img_text_grid = new Grid ();
453
454 var text_grid = new Grid ();
455
456 var title = new LLabel.markup ("<span weight='bold' size='larger'>"+_("Recording paused")+"</span>");
457 title.valign = Align.START;
458
459 var info = new LLabel (_("You can continue or finish the recording now"));
460 info.valign = Align.START;
461 info.margin_top = 6;
462
421 var buttons = new Box (Orientation.HORIZONTAL, 0);463 var buttons = new Box (Orientation.HORIZONTAL, 0);
422 var stop_bt = new Button ();464 buttons.homogeneous = true;
423 stop_bt.image = new Image.from_stock (Stock.MEDIA_STOP, IconSize.BUTTON);465 buttons.spacing = 6;
424 stop_bt.label = _("Finish");466 buttons.margin_top = 24;
425 stop_bt.set_tooltip_text (_("Finish recording"));467
426 var cancel_bt = new Button.from_stock (Stock.CANCEL);468 var continue_bt = new Button.with_label (_("Continue"));
427 var continue_bt = new Button.with_label (_("Record more"));469 continue_bt.set_tooltip_text (_("Continue recording"));
428 continue_bt.image = new Image.from_stock (Stock.MEDIA_RECORD, IconSize.BUTTON);470 continue_bt.image = new Image.from_stock (Stock.MEDIA_RECORD, IconSize.BUTTON);
471
472 var stop_bt = new Button.with_label (_("Finish"));
473 stop_bt.set_tooltip_text (_("Stop the recording and save the file"));
474 stop_bt.image = new Image.from_stock (Stock.APPLY, IconSize.BUTTON);
475
476 var cancel_bt = new Button.with_label (_("Cancel"));
477 cancel_bt.set_tooltip_text (_("Cancel the recording without saving the file"));
478 cancel_bt.image = new Image.from_stock (Stock.DELETE, IconSize.BUTTON);
479
429 buttons.pack_end (stop_bt, false, true, 0);480 buttons.pack_end (stop_bt, false, true, 0);
430 buttons.pack_end (cancel_bt, false, true, 0);
431 buttons.pack_end (continue_bt, false, true, 0);481 buttons.pack_end (continue_bt, false, true, 0);
432 482 buttons.pack_end (cancel_bt, false, true, 0);
483
433 var img = new Image.from_stock (Stock.MEDIA_PAUSE, IconSize.DIALOG);484 var img = new Image.from_stock (Stock.MEDIA_PAUSE, IconSize.DIALOG);
434 img.valign = Align.START;485 img.valign = Align.START;
435 img.margin_right = 12;486 img.margin_right = 12;
436 487
437 var space = new Label ("");488 text_grid.attach (title, 0, 0, 1, 1);
438 space.height_request = 24;489 text_grid.attach (info, 0, 1, 1, 1);
439 490
440 pause_grid.attach (img, 0, 0, 1, 1);491 img_text_grid.attach (img, 0, 0, 1, 1);
441 pause_grid.attach (new LLabel.markup ("<span weight='bold' size='20000'>"+_("Recording paused")+"</span>"), 1, 0, 1, 1);492 img_text_grid.attach (text_grid, 1, 0, 1, 1);
442 pause_grid.attach (new LLabel (_("You can continue or finish the recording now.")), 1, 1, 1, 1);493
443 pause_grid.attach (space, 0, 2, 1, 1);494 pause_grid.attach (img_text_grid, 0, 0, 1, 1);
444 pause_grid.attach (buttons, 0, 3, 2, 1);495 pause_grid.attach (buttons, 0, 2, 1, 1);
445 496
497
446 stop_bt.can_default = true;498 stop_bt.can_default = true;
447 this.main_window.set_default (stop_bt);499 this.main_window.set_default (stop_bt);
448 500
449 /*501 /*
450 Events502 Events
451 */503 */
452 cancel_bt.clicked.connect ( () => {504 cancel_bt.clicked.connect ( () => {
453 this.main_window.destroy ();505 this.main_window.destroy ();
454 });506 });
455 507
456 stop_bt.clicked.connect ( () => {508 stop_bt.clicked.connect ( () => {
457 finish_recording ();509 finish_recording ();
458 });510 });
459 511
460 continue_bt.clicked.connect ( () => {512 continue_bt.clicked.connect ( () => {
461 this.main_window.iconify ();513 this.main_window.iconify ();
462 this.pipeline.set_state (State.PLAYING);514 this.pipeline.set_state (State.PLAYING);
@@ -464,7 +516,7 @@
464 switch_to_paused (false);516 switch_to_paused (false);
465 });517 });
466 }518 }
467 519
468 public void record () {520 public void record () {
469 if (settings.keyview || settings.clickview || settings.mouse_circle) {521 if (settings.keyview || settings.clickview || settings.mouse_circle) {
470 keyview = new Eidete.Widgets.KeyView (settings.keyview, settings.clickview, settings.mouse_circle, settings.mouse_circle_color);522 keyview = new Eidete.Widgets.KeyView (settings.keyview, settings.clickview, settings.mouse_circle, settings.mouse_circle_color);
@@ -476,36 +528,36 @@
476 return false;528 return false;
477 });529 });
478 keyview.place (settings.ex,530 keyview.place (settings.ex,
479 settings.sy, 531 settings.sy,
480 settings.ey - settings.sy);532 settings.ey - settings.sy);
481 keyview.show_all ();533 keyview.show_all ();
482 }534 }
483 535
484 pipeline = new Pipeline ("screencast-pipe");536 pipeline = new Pipeline ("screencast-pipe");
485 dynamic Element muxer = ElementFactory.make ("webmmux", "mux");537 dynamic Element muxer = ElementFactory.make ("webmmux", "mux");
486 dynamic Element sink = ElementFactory.make ("filesink", "sink");538 dynamic Element sink = ElementFactory.make ("filesink", "sink");
487 539
488 //video bin540 //video bin
489 this.videobin = new Gst.Bin ("video");541 this.videobin = new Gst.Bin ("video");
490 try {542 try {
491 videobin = (Gst.Bin)parse_bin_from_description (543 videobin = (Gst.Bin)parse_bin_from_description (
492 "ximagesrc name=\"videosrc\" ! video/x-raw-rgb, framerate=15/1 ! 544 "ximagesrc name=\"videosrc\" ! video/x-raw-rgb, framerate=15/1 !
493 ffmpegcolorspace ! vp8enc name=\"encoder\" ! queue", true);545 ffmpegcolorspace ! vp8enc name=\"encoder\" ! queue", true);
494 }catch (Error e){ stderr.printf ("Error: %s\n", e.message);}546 }catch (Error e){ stderr.printf ("Error: %s\n", e.message);}
495 547
496 //audio bin548 //audio bin
497 this.audiobin = new Gst.Bin ("audio");549 this.audiobin = new Gst.Bin ("audio");
498 try{550 try{
499 audiobin = (Gst.Bin)parse_bin_from_description ("pulsesrc name=\"audiosrc\" ! 551 audiobin = (Gst.Bin)parse_bin_from_description ("pulsesrc name=\"audiosrc\" !
500 audioconvert ! audioresample ! audiorate ! vorbisenc ! queue", true);552 audioconvert ! audioresample ! audiorate ! vorbisenc ! queue", true);
501 }catch (Error e){ stderr.printf ("Error: %s\n", e.message);}553 }catch (Error e){ stderr.printf ("Error: %s\n", e.message);}
502 554
503 555
504 string cores;556 string cores;
505 try{557 try{
506 Process.spawn_command_line_sync ("cat /sys/devices/system/cpu/online", out cores);558 Process.spawn_command_line_sync ("cat /sys/devices/system/cpu/online", out cores);
507 }catch (Error e){warning (e.message);}559 }catch (Error e){warning (e.message);}
508 560
509 //configure561 //configure
510 sink.set ("location", settings.destination);562 sink.set ("location", settings.destination);
511 videobin.get_by_name ("videosrc").set ("startx", this.settings.sx);563 videobin.get_by_name ("videosrc").set ("startx", this.settings.sx);
@@ -514,37 +566,37 @@
514 videobin.get_by_name ("videosrc").set ("endy", this.settings.ey);566 videobin.get_by_name ("videosrc").set ("endy", this.settings.ey);
515 videobin.get_by_name ("videosrc").set ("use-damage", false);567 videobin.get_by_name ("videosrc").set ("use-damage", false);
516 videobin.get_by_name ("videosrc").set ("screen-num", this.settings.monitor);568 videobin.get_by_name ("videosrc").set ("screen-num", this.settings.monitor);
517 569
518 //videobin.get_by_name ("encoder").set ("mode", 1);570 //videobin.get_by_name ("encoder").set ("mode", 1);
519 videobin.get_by_name ("encoder").set ("quality", 8.0);571 videobin.get_by_name ("encoder").set ("quality", 8.0);
520 videobin.get_by_name ("encoder").set ("speed", 6);572 videobin.get_by_name ("encoder").set ("speed", 6);
521 videobin.get_by_name ("encoder").set ("max-keyframe-distance", 150);573 videobin.get_by_name ("encoder").set ("max-keyframe-distance", 150);
522 videobin.get_by_name ("encoder").set ("threads", int.parse (cores.substring (2)));574 videobin.get_by_name ("encoder").set ("threads", int.parse (cores.substring (2)));
523 575
524 576
525 if (pipeline==null||muxer==null||sink==null||videobin==null||audiobin==null){577 if (pipeline==null||muxer==null||sink==null||videobin==null||audiobin==null){
526 stderr.printf ("Error: Elements weren't made correctly!\n");578 stderr.printf ("Error: Elements weren't made correctly!\n");
527 }579 }
528 580
529 if (settings.audio)581 if (settings.audio)
530 pipeline.add_many (audiobin, videobin, muxer, sink);582 pipeline.add_many (audiobin, videobin, muxer, sink);
531 else583 else
532 pipeline.add_many (videobin, muxer, sink);584 pipeline.add_many (videobin, muxer, sink);
533 585
534 586
535 videobin.get_static_pad ("src").link(muxer.get_request_pad ("video_%d"));587 videobin.get_static_pad ("src").link(muxer.get_request_pad ("video_%d"));
536 if (settings.audio)588 if (settings.audio)
537 audiobin.get_static_pad ("src").link(muxer.get_request_pad ("audio_%d"));589 audiobin.get_static_pad ("src").link(muxer.get_request_pad ("audio_%d"));
538 590
539 muxer.link (sink);591 muxer.link (sink);
540 592
541 pipeline.get_bus ().add_watch (bus_message_cb);593 pipeline.get_bus ().add_watch (bus_message_cb);
542594
543 pipeline.set_state (State.READY);595 pipeline.set_state (State.READY);
544 596
545 if (selectionarea != null)597 if (selectionarea != null)
546 selectionarea.to_discrete ();598 selectionarea.to_discrete ();
547 599
548 pipeline.set_state (State.PLAYING);600 pipeline.set_state (State.PLAYING);
549 this.recording = true;601 this.recording = true;
550 }602 }
@@ -581,9 +633,10 @@
581 }633 }
582 return true;634 return true;
583 }635 }
584 636
585 //only visuals637 //only visuals
586 public void switch_to_paused (bool to_normal){638 public void switch_to_paused (bool to_normal){
639
587 if (to_normal){640 if (to_normal){
588 this.main_window.title = _("Recording paused");641 this.main_window.title = _("Recording paused");
589 this.main_window.remove (pause_icon);642 this.main_window.remove (pause_icon);
@@ -615,8 +668,8 @@
615bool finish_rec;668bool finish_rec;
616669
617static const OptionEntry[] entries = {670static const OptionEntry[] entries = {
618 {"pause", 'n', 0, OptionArg.NONE, ref pause_rec, "Pause Recording", ""},671 {"pause", 'n', 0, OptionArg.NONE, ref pause_rec, N_("Pause Recording"), ""},
619 {"finish", 'n', 0, OptionArg.NONE, ref finish_rec, "Finish Recording", ""},672 {"finish", 'n', 0, OptionArg.NONE, ref finish_rec, N_("Finish Recording"), ""},
620 { null }673 { null }
621};674};
622675
@@ -628,11 +681,11 @@
628 try{681 try{
629 context.parse (ref args);682 context.parse (ref args);
630 }catch (Error e){ error ("Error: "+e.message);}683 }catch (Error e){ error ("Error: "+e.message);}
631 684
632 Gst.init (ref args);685 Gst.init (ref args);
633 686
634 eidete = new Eidete.EideteApp ();687 eidete = new Eidete.EideteApp ();
635 688
636 return eidete.run (args);689 return eidete.run (args);
637}690}
638691

Subscribers

People subscribed via source and target branches

to all changes: