From 8f3fbe7aa95da25ad039f61913bb88999ed8595e Mon Sep 17 00:00:00 2001 From: abakkk Date: Sun, 5 Jan 2020 13:42:05 +0100 Subject: [PATCH] replace 'smoothed-stroke' pref with 'Ctrl' key modifier --- draw.js | 4 +--- locale/draw-on-your-screen.pot | 10 ++------- prefs.js | 20 +++++------------- schemas/gschemas.compiled | Bin 3524 -> 3448 bytes ...extensions.draw-on-your-screen.gschema.xml | 5 ----- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/draw.js b/draw.js index c13e0ef..5112071 100644 --- a/draw.js +++ b/draw.js @@ -311,8 +311,6 @@ var DrawingArea = new Lang.Class({ this._stopDrawing(); }); - this.smoothedStroke = this.settings.get_boolean('smoothed-stroke'); - this.currentElement = new DrawingElement ({ shape: this.currentShape, color: this.currentColor.to_string(), @@ -383,7 +381,7 @@ var DrawingArea = new Lang.Class({ if (!this.currentElement) return; if (this.currentElement.shape == Shapes.NONE) - this.currentElement.addPoint(x, y, this.smoothedStroke); + this.currentElement.addPoint(x, y, controlPressed); else if ((this.currentElement.shape == Shapes.RECTANGLE || this.currentElement.shape == Shapes.TEXT) && (controlPressed || this.currentElement.transform.active)) this.currentElement.transformRectangle(x, y); else if (this.currentElement.shape == Shapes.ELLIPSE && (controlPressed || this.currentElement.transform.active)) diff --git a/locale/draw-on-your-screen.pot b/locale/draw-on-your-screen.pot index d19a5a8..133392b 100644 --- a/locale/draw-on-your-screen.pot +++ b/locale/draw-on-your-screen.pot @@ -313,15 +313,9 @@ 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)" -msgstr "" +" . curve a line (cubic Bezier curve)\n" +" . smooth a free drawing stroke (you may prefer to smooth the stroke afterward, see “%s”)" -msgid "Smooth stroke during the drawing process" -msgstr "" - -msgid "" -"You can also smooth the stroke afterward\n" -"See “%s”" msgstr "" msgid "Change the style" diff --git a/prefs.js b/prefs.js index 6ec03a4..42fa58b 100644 --- a/prefs.js +++ b/prefs.js @@ -274,27 +274,17 @@ var PrefsPage = new GObject.Class({ let controlBox = new Gtk.Box({ margin_top: MARGIN, margin_left: MARGIN, margin_right: MARGIN, margin_bottom:MARGIN }); let controlLabel = new Gtk.Label({ use_markup: true, - label: _("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)") + label: _("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)\n" + + " . smooth a free drawing stroke (you may prefer to smooth the stroke afterward, see “%s”)").format(_("Smooth last brushstroke")) }); controlLabel.set_halign(1); controlLabel.get_style_context().add_class("dim-label"); controlBox.pack_start(controlLabel, true, true, 4); listBox.add(controlBox); - let smoothBox = new Gtk.Box({ margin: MARGIN }); - let smoothLabelBox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL }); - let smoothLabel1 = new Gtk.Label({label: _("Smooth stroke during the drawing process")}); - let smoothLabel2 = new Gtk.Label({ use_markup: true, halign: 1, label: "" + _("You can also smooth the stroke afterward\nSee “%s”").format(_("Smooth last brushstroke")) + "" }); - smoothLabel1.set_halign(1); - smoothLabel2.get_style_context().add_class("dim-label"); - smoothLabelBox.pack_start(smoothLabel1, true, true, 0); - smoothLabelBox.pack_start(smoothLabel2, true, true, 0); - let smoothSwitch = new Gtk.Switch({valign: 3}); - this.settings.bind("smoothed-stroke", smoothSwitch, "active", 0); - smoothBox.pack_start(smoothLabelBox, true, true, 4); - smoothBox.pack_start(smoothSwitch, false, false, 4); - listBox.add(smoothBox); - let internalKeybindingsWidget = new KeybindingsWidget(INTERNAL_KEYBINDINGS, this.settings); internalKeybindingsWidget.margin = MARGIN; listBox.add(internalKeybindingsWidget); diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index b02d63a6b6e109af942dfcd432c7dacc44156b03..40539055c244f546c1590cfddd7a22af81b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5VoLdA^FRV%G@s7icvmUK?UpJ?dRJ zPqDh|RqEbSrS2_Jwk_rSWbu49!PvEpEdBENj-92AvGa^|Z;Y%rPVpOT$|mFzt_${? zqHmk3*|$!yZ;k9*tJ$|rv2Tm)+sgLwu`?))TweZ%5#}{0*C`D%TDCvu+C{50L?Vxw z%6i~`3B$pKDAz9ZCo28vn#VB^`N4%TY#s0Z++ZEW^+m-&pfNt3!4tGhnjxEM{bZz^ zk8C8~0Eb%?N1kI(_M2ejIj$Hm>|)e)V)nt@>$C?gv|Glk)_>yuv7c->rFAf}qWllp CwlQ%4 diff --git a/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml b/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml index 5847658..1236d96 100644 --- a/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml +++ b/schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml @@ -1,11 +1,6 @@ - - false - smoothed stroke - smoothed stroke - false move drawing on desktop