diff --git a/NEWS b/NEWS index c8590f2..bab0ca3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +v6 - March 2020 +================= + +* GS 3.36 compatibility + v5.1 - March 2020 ================= diff --git a/README.md b/README.md index 39e555a..c88b33f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Then save your beautiful work by taking a screenshot. 3. **Change the directory name** to `drawOnYourScreen@abakkk.framagit.org` 4. Xorg: type `alt + F2` and `r` to restart gnome-shell Wayland: restart or re-login -5. Enable the extension in gnome-tweaks +5. Enable the extension in gnome-tweaks or gnome-shell-extension-prefs 6. `Super + Alt + D` to test 7. [https://framagit.org/abakkk/DrawOnYourScreen/issues](https://framagit.org/abakkk/DrawOnYourScreen/issues) to say it doesn't work diff --git a/draw.js b/draw.js index ae75252..cb542ac 100644 --- a/draw.js +++ b/draw.js @@ -266,7 +266,7 @@ var DrawingArea = new Lang.Class({ }, _onKeyPressed: function(actor, event) { - if (event.get_key_symbol() == Clutter.Escape) { + if (event.get_key_symbol() == Clutter.KEY_Escape) { this.emit('stop-drawing'); return Clutter.EVENT_STOP; @@ -1075,61 +1075,62 @@ var DrawingHelper = new Lang.Class({ Extends: St.ScrollView, _init: function(params, monitor) { + params.style_class = 'osd-window draw-on-your-screen-helper'; this.parent(params); this.monitor = monitor; this.hide(); - this.vbox = new St.BoxLayout({ style_class: 'osd-window draw-on-your-screen-helper', vertical: true }); + this.vbox = new St.BoxLayout({ vertical: true }); this.add_actor(this.vbox); - this.vbox.add(new St.Label({ text: _("Global") })); + this.vbox.add_child(new St.Label({ text: _("Global") })); let settings = Convenience.getSettings(); for (let settingKey in Prefs.GLOBAL_KEYBINDINGS) { let hbox = new St.BoxLayout({ vertical: false }); if (settingKey.indexOf('-separator-') != -1) { - this.vbox.add(hbox); + this.vbox.add_child(hbox); continue; } if (!settings.get_strv(settingKey)[0]) continue; let [keyval, mods] = Gtk.accelerator_parse(settings.get_strv(settingKey)[0]); - hbox.add(new St.Label({ text: _(Prefs.GLOBAL_KEYBINDINGS[settingKey]) })); - hbox.add(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods) }), { expand: true }); - this.vbox.add(hbox); + hbox.add_child(new St.Label({ text: _(Prefs.GLOBAL_KEYBINDINGS[settingKey]) })); + hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true })); + this.vbox.add_child(hbox); } - this.vbox.add(new St.Label({ text: _("Internal") })); + this.vbox.add_child(new St.Label({ text: _("Internal") })); for (let i = 0; i < Prefs.OTHER_SHORTCUTS.length; i++) { if (Prefs.OTHER_SHORTCUTS[i].desc.indexOf('-separator-') != -1) { - this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); + this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); continue; } let hbox = new St.BoxLayout({ vertical: false }); - hbox.add(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].desc) })); - hbox.add(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].shortcut) }), { expand: true }); - this.vbox.add(hbox); + hbox.add_child(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].desc) })); + hbox.add_child(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].shortcut), x_expand: true })); + this.vbox.add_child(hbox); } - this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); + this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); for (let settingKey in Prefs.INTERNAL_KEYBINDINGS) { if (settingKey.indexOf('-separator-') != -1) { - this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); + this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' })); continue; } let hbox = new St.BoxLayout({ vertical: false }); if (!settings.get_strv(settingKey)[0]) continue; let [keyval, mods] = Gtk.accelerator_parse(settings.get_strv(settingKey)[0]); - hbox.add(new St.Label({ text: _(Prefs.INTERNAL_KEYBINDINGS[settingKey]) })); - hbox.add(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods) }), { expand: true }); - this.vbox.add(hbox); + hbox.add_child(new St.Label({ text: _(Prefs.INTERNAL_KEYBINDINGS[settingKey]) })); + hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true })); + this.vbox.add_child(hbox); } let mediaKeysSettings; try { mediaKeysSettings = Convenience.getSettings(MEDIA_KEYS_SCHEMA); } catch(e) { return; } - this.vbox.add(new St.Label({ text: _("System") })); + this.vbox.add_child(new St.Label({ text: _("System") })); for (let settingKey in MEDIA_KEYS_KEYS) { if (!mediaKeysSettings.settings_schema.has_key(settingKey)) @@ -1137,9 +1138,9 @@ var DrawingHelper = new Lang.Class({ let shortcut = GS_VERSION < '3.33.0' ? mediaKeysSettings.get_string(settingKey) : mediaKeysSettings.get_strv(settingKey)[0]; let [keyval, mods] = Gtk.accelerator_parse(shortcut); let hbox = new St.BoxLayout({ vertical: false }); - hbox.add(new St.Label({ text: _(MEDIA_KEYS_KEYS[settingKey]) })); - hbox.add(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods) }), { expand: true }); - this.vbox.add(hbox); + hbox.add_child(new St.Label({ text: _(MEDIA_KEYS_KEYS[settingKey]) })); + hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true })); + this.vbox.add_child(hbox); } }, @@ -1370,9 +1371,11 @@ const DrawingMenu = new Lang.Class({ }); } - getActor(item).add(getActor(slider), { expand: true }); - getActor(item).add(label); - getActor(item).connect('key-press-event', slider.onKeyPressEvent.bind(slider)); + getActor(slider).x_expand = true; + getActor(item).add_child(getActor(slider)); + getActor(item).add_child(label); + if (slider.onKeyPressEvent) + getActor(item).connect('key-press-event', slider.onKeyPressEvent.bind(slider)); menu.addMenuItem(item); }, @@ -1568,7 +1571,8 @@ const DrawingMenuEntry = new Lang.Class({ style_class: 'search-entry draw-on-your-screen-menu-entry', track_hover: true, reactive: true, - can_focus: true + can_focus: true, + x_expand: true }); this.entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon', @@ -1583,7 +1587,7 @@ const DrawingMenuEntry = new Lang.Class({ }); this.entry.connect('secondary-icon-clicked', this._reset.bind(this)); - getActor(this.item).add(this.entry, { expand: true }); + getActor(this.item).add_child(this.entry); getActor(this.item).connect('notify::mapped', (actor) => { if (actor.mapped) { this.entry.set_text(this.params.initialTextGetter()); diff --git a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo index feda332..a438979 100644 Binary files a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo and b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.mo differ diff --git a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po index 7fc7c82..3347c89 100644 --- a/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po +++ b/locale/it_IT/LC_MESSAGES/draw-on-your-screen.po @@ -1,3 +1,4 @@ +# translations for Draw On Your Screen. # Copyright (C) 2019 Listed translators # # This file is distributed under the same license as Draw On Your Screen. @@ -5,11 +6,11 @@ # msgid "" msgstr "" -"Project-Id-Version: Draw On Your Screen VERSION\n" +"Project-Id-Version: Draw On Your Desktop\n" "Report-Msgid-Bugs-To: https://framagit.org/abakkk/DrawOnYourScreen/issues\n" -"POT-Creation-Date: 2019-06-15 08:47+0200\n" -"PO-Revision-Date: 2019-06-15 09:52+0200\n" -"Language-Team: \n" +"POT-Creation-Date: 2020-03-06 18:46+0100\n" +"PO-Revision-Date: 2020-03-06 19:05+0100\n" +"Language-Team: Albano Battistella \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -18,12 +19,19 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Language: it_IT\n" -# add your name here, for example: -# "Albano Battistella\n" -# "Ali\n" -# "" -# It will be displayed in About page -msgid "Translators" +# Add your name here, for example: +# (add "\n" as separator if there is many translators) +# msgid "translator-credits" +# msgstr "Me" +# or, with mail: +# msgid "translator-credits" +# msgstr "Me" +# or, with page: +# msgid "translator-credits" +# msgstr "Me" +# else keep it empty. +# It will be displayed in about page +msgid "translator-credits" msgstr "Albano Battistella" #: extension.js @@ -90,7 +98,7 @@ msgid "Undo" msgstr "Annulla" msgid "Redo" -msgstr "Ripeti" +msgstr "Rifai" msgid "Erase" msgstr "Cancella" @@ -99,11 +107,17 @@ msgid "Smooth" msgstr "Liscio" msgid "Dashed" -msgstr "tratteggiato" +msgstr "Tratteggiato" msgid "Color" msgstr "Colore" +msgid "Open drawing" +msgstr "Apri disegno" + +msgid "Save drawing" +msgstr "Salva disegno" + #: prefs.js msgid "Preferences" msgstr "Preferenze" @@ -135,19 +149,19 @@ msgid "Select line" msgstr "Seleziona la linea" msgid "Select ellipse" -msgstr "Seleziona l'ellisse" +msgstr "Seleziona ellisse" msgid "Select rectangle" -msgstr "Seleziona il rettangolo" +msgstr "Seleziona rettangolo" msgid "Select text" -msgstr "Seleziona il testo" +msgstr "Seleziona testo" msgid "Unselect shape (free drawing)" msgstr "Deseleziona forma (disegno libero)" msgid "Toggle fill/stroke" -msgstr "Attiva / disattiva riempimento / tratto" +msgstr "Attiva/disattiva riempimento/tratto" msgid "Increment line width" msgstr "Incrementa la larghezza della linea" @@ -162,7 +176,7 @@ msgid "Decrement line width even more" msgstr "Decrementa la larghezza della linea ancora di più" msgid "Change linejoin" -msgstr "Cambia linejoin" +msgstr "Cambia entrata linea" msgid "Change linecap" msgstr "Cambia il limite di riga" @@ -188,18 +202,27 @@ msgstr "Aggiungi uno sfondo di disegno" msgid "Square drawing area" msgstr "Area di disegno quadrata" +msgid "Open previous drawing" +msgstr "Apri il disegno precedente" + +msgid "Open next drawing" +msgstr "Apri il prossimo disegno" + +# already in draw.js +# msgid "Save drawing" +# msgstr "" msgid "Save drawing as a SVG file" msgstr "Salva disegno come file SVG" -msgid "Open stylesheet.css" -msgstr "Apri stylesheet.css" +msgid "Edit style" +msgstr "Modifica stile" msgid "Show help" msgstr "Mostra aiuto" # OTHER_SHORTCUTS msgid "Draw" -msgstr "Disegna" +msgstr "Disegno" msgid "Left click" msgstr "Clic sinistro" @@ -211,7 +234,7 @@ msgid "Right click" msgstr "Clic destro" msgid "Center click" -msgstr "clic centro" +msgstr "Clic centrale" msgid "Transform shape (when drawing)" msgstr "Trasforma la forma (quando si disegna)" @@ -237,11 +260,17 @@ msgstr "Seleziona gomma" msgid "Shift key held" msgstr "Tasto MAIUSC premuto" +msgid "Ignore pointer movement" +msgstr "Ignora il movimento del puntatore" + +msgid "Space key held" +msgstr "Tasto spazio tenuto" + msgid "Leave" msgstr "Lascia" msgid "Escape key" -msgstr "tasto Esc" +msgstr "Tasto Esc" # About page # you are free to translate the extension name @@ -254,30 +283,30 @@ msgid "" "Start drawing with Super+Alt+D and save your beautiful work by taking a " "screenshot" msgstr "" -"Inizia a disegnare con Super + Alt + D e salva il tuo bellissimo lavoro " +"Inizia a disegnare con Super+Alt+D e salva il tuo bellissimo lavoro " "scattando uno screenshot" # Prefs page msgid "Global" msgstr "Globale" -msgid "Drawing on the desktop" -msgstr "Disegno sul desktop" - -msgid "Draw On Your Screen becomes Draw On Your Desktop" -msgstr "Draw On Your Screen diventa Draw On Your Desktop" - msgid "Persistent" msgstr "Persistente" msgid "Persistent drawing through session restart" msgstr "Disegno persistente attraverso il riavvio della sessione" +msgid "Drawing on the desktop" +msgstr "Disegno sul desktop" + +msgid "Draw On Your Screen becomes Draw On Your Desktop" +msgstr "Draw On Your Screen diventa Draw On Your Desktop" + msgid "Disable on-screen notifications" msgstr "Disabilita le notifiche sullo schermo" msgid "Disable panel indicator" -msgstr "Disabilita indicatore del pannello" +msgstr "Disabilita indicatore pannello" msgid "Internal" msgstr "Interno" @@ -289,37 +318,33 @@ msgid "" "By pressing Ctrl key during the drawing process, you can:\n" " . rotate a rectangle or a text area\n" " . extend and rotate an ellipse\n" -" . curve a line (cubic Bezier curve)" +" . curve a line (cubic Bezier curve)\n" +" . smooth a free drawing stroke (you may prefer to smooth the stroke " +"afterward, see “%s”)" msgstr "" -"Premendo il tasto Ctrl durante del processo di disegno, " -"puoi:\n" -" . ruotare un rettangolo o un'area di testo\n" -" . estendere e ruotare un'ellisse\n" -" . curvare una linea (curva Bezier cubica)" - -msgid "Smooth stroke during the drawing process" -msgstr "Colpo liscio durante il processo di disegno" +" . ruota un rettangolo o area di testo\n" +" . estendere e ruotare un'ellisse\n" +" . curva una lineA (curva cubica di Bezier)\n" +" . uniforma un tratto di disegno libero (in seguito se preferisci levigare " +"il tratto , vedi “%s”)" msgid "" -"You can also smooth the stroke afterward\n" -"See “%s”" +"Default drawing style attributes (color palette, font, line, dash) " +"are defined in an editable css file.\n" +"See “%s”." msgstr "" -"Puoi anche lisciare il tratto in seguito\n" -"Vedi \"% s\"" - -msgid "Change the style" -msgstr "Cambia lo stile" - -msgid "See stylesheet.css" -msgstr "Vedi stylesheet.css" +"Predefinito gli attributi dello stile di disegno (tavolozza dei " +"colori, font, linea, tratto) sono definiti in modo modificabile css " +"file.\n" +"Vedi “%s”." msgid "" "Note: When you save elements made with eraser in a SVG " -"file,\n" -"they are colored with background color, transparent if it is disabled.\n" -"(See “%s” or edit the SVG file afterwards)" +"file, they are colored with background color, transparent if it is " +"disabled.\n" +"See “%s” or edit the SVG file afterwards." msgstr "" -" Nota : quando salvi gli elementi creati con gomma da " -"cancellare in un file SVG ,\n" -"questi sono colorati con il colore di sfondo, trasparente se disabilitati.\n" -"(Vedi \"% s\" o modifica il file SVG in seguito)" +"Nota: Quando salvi elementi realizzati con la gomma in un " +"SVG file, sono colorati con il colore di sfondo, trasparenti se " +"disabilitati.\n" +"Vedi “%s” o modificare il file SVG in seguito." diff --git a/metadata.json b/metadata.json index fe0a0cd..9412998 100644 --- a/metadata.json +++ b/metadata.json @@ -14,7 +14,8 @@ "3.28", "3.30", "3.32", - "3.34" + "3.34", + "3.36" ], - "version": 5.1 + "version": 6 } diff --git a/stylesheet.css b/stylesheet.css index bd02a07..4d7e94f 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -13,17 +13,22 @@ } /* "Ctrl + F1" on-screen-display */ - + .draw-on-your-screen-helper { - margin: 0; + margin: 0px; +} + +.draw-on-your-screen-helper > StBoxLayout { + margin: 8px; + margin-right: 16px; spacing: 0.5em; } -.draw-on-your-screen-helper StBoxLayout { +.draw-on-your-screen-helper > StBoxLayout StBoxLayout { spacing: 7em; } -.draw-on-your-screen-helper StBoxLayout StLabel { +.draw-on-your-screen-helper > StBoxLayout StBoxLayout StLabel { text-align: right; font-weight: normal; }