From 39ec1ba88811d4d6026b42554d94b485d0f2dcbc Mon Sep 17 00:00:00 2001 From: abakkk Date: Thu, 6 Aug 2020 00:04:12 +0200 Subject: [PATCH] toggle -> switch --- area.js | 24 +++---- extension.js | 20 +++--- prefs.js | 20 +++--- schemas/gschemas.compiled | Bin 4428 -> 4440 bytes ...extensions.draw-on-your-screen.gschema.xml | 60 +++++++++--------- 5 files changed, 62 insertions(+), 62 deletions(-) diff --git a/area.js b/area.js index 775bdeb..aad49e2 100644 --- a/area.js +++ b/area.js @@ -324,7 +324,7 @@ var DrawingArea = new Lang.Class({ } return Clutter.EVENT_STOP; } else if (button == 2) { - this.toggleFill(); + this.switchFill(); } else if (button == 3) { this._stopDrawing(); this.menu.open(x, y); @@ -858,7 +858,7 @@ var DrawingArea = new Lang.Class({ } }, - toggleColor: function() { + switchColor: function() { this.selectColor((this.currentColor == this.colors[1]) ? 2 : 1); }, @@ -878,12 +878,12 @@ var DrawingArea = new Lang.Class({ this.updatePointerCursor(); }, - toggleFill: function() { + switchFill: function() { this.fill = !this.fill; this.emit('show-osd', null, this.fill ? _("Fill") : _("Outline"), "", -1, false); }, - toggleDash: function() { + switchDash: function() { this.dashedLine = !this.dashedLine; this.emit('show-osd', null, this.dashedLine ? _("Dashed line") : _("Full line"), "", -1, false); }, @@ -893,22 +893,22 @@ var DrawingArea = new Lang.Class({ this.emit('show-osd', null, _("%d px").format(this.currentLineWidth), "", 2 * this.currentLineWidth, false); }, - toggleLineJoin: function() { + switchLineJoin: function() { this.currentLineJoin = this.currentLineJoin == 2 ? 0 : this.currentLineJoin + 1; this.emit('show-osd', null, _(LineJoinNames[this.currentLineJoin]), "", -1, false); }, - toggleLineCap: function() { + switchLineCap: function() { this.currentLineCap = this.currentLineCap == 2 ? 0 : this.currentLineCap + 1; this.emit('show-osd', null, _(LineCapNames[this.currentLineCap]), "", -1, false); }, - toggleFillRule: function() { + switchFillRule: function() { this.currentFillRule = this.currentFillRule == 1 ? 0 : this.currentFillRule + 1; this.emit('show-osd', null, _(FillRuleNames[this.currentFillRule]), "", -1, false); }, - toggleFontWeight: function() { + switchFontWeight: function() { let fontWeights = Object.keys(FontWeightNames).map(key => Number(key)); let index = fontWeights.indexOf(this.currentFontWeight); this.currentFontWeight = index == fontWeights.length - 1 ? fontWeights[0] : fontWeights[index + 1]; @@ -920,7 +920,7 @@ var DrawingArea = new Lang.Class({ `${_(FontWeightNames[this.currentFontWeight])}`, "", -1, false); }, - toggleFontStyle: function() { + switchFontStyle: function() { this.currentFontStyle = this.currentFontStyle == 2 ? 0 : this.currentFontStyle + 1; if (this.currentElement && this.currentElement.font) { this.currentElement.font.style = this.currentFontStyle; @@ -930,7 +930,7 @@ var DrawingArea = new Lang.Class({ `${_(FontStyleNames[this.currentFontStyle])}`, "", -1, false); }, - toggleFontFamily: function() { + switchFontFamily: function() { let index = Math.max(0, this.fontFamilies.indexOf(this.currentFontFamily)); this.currentFontFamily = (index == this.fontFamilies.length - 1) ? 0 : this.fontFamilies[index + 1]; if (this.currentElement && this.currentElement.font) { @@ -940,7 +940,7 @@ var DrawingArea = new Lang.Class({ this.emit('show-osd', null, `${_(this.currentFontFamily)}`, "", -1, false); }, - toggleTextAlignment: function() { + switchTextAlignment: function() { this.currentTextRightAligned = !this.currentTextRightAligned; if (this.currentElement && this.currentElement.textRightAligned !== undefined) { this.currentElement.textRightAligned = this.currentTextRightAligned; @@ -949,7 +949,7 @@ var DrawingArea = new Lang.Class({ this.emit('show-osd', null, this.currentTextRightAligned ? _("Right aligned") : _("Left aligned"), "", -1, false); }, - toggleImageFile: function() { + switchImageFile: function() { let images = this.getImages(); if (!images.length) return; diff --git a/extension.js b/extension.js index 42011a6..b0f964d 100644 --- a/extension.js +++ b/extension.js @@ -187,12 +187,12 @@ var AreaManager = new Lang.Class({ 'decrement-line-width': () => this.activeArea.incrementLineWidth(-1), 'increment-line-width-more': () => this.activeArea.incrementLineWidth(5), 'decrement-line-width-more': () => this.activeArea.incrementLineWidth(-5), - 'toggle-linejoin': this.activeArea.toggleLineJoin.bind(this.activeArea), - 'toggle-linecap': this.activeArea.toggleLineCap.bind(this.activeArea), - 'toggle-fill-rule': this.activeArea.toggleFillRule.bind(this.activeArea), - 'toggle-dash' : this.activeArea.toggleDash.bind(this.activeArea), - 'toggle-fill' : this.activeArea.toggleFill.bind(this.activeArea), - 'toggle-image-file' : this.activeArea.toggleImageFile.bind(this.activeArea), + 'switch-linejoin': this.activeArea.switchLineJoin.bind(this.activeArea), + 'switch-linecap': this.activeArea.switchLineCap.bind(this.activeArea), + 'switch-fill-rule': this.activeArea.switchFillRule.bind(this.activeArea), + 'switch-dash' : this.activeArea.switchDash.bind(this.activeArea), + 'switch-fill' : this.activeArea.switchFill.bind(this.activeArea), + 'switch-image-file' : this.activeArea.switchImageFile.bind(this.activeArea), 'select-none-shape': () => this.activeArea.selectTool(Area.Tools.NONE), 'select-line-shape': () => this.activeArea.selectTool(Area.Tools.LINE), 'select-ellipse-shape': () => this.activeArea.selectTool(Area.Tools.ELLIPSE), @@ -215,10 +215,10 @@ var AreaManager = new Lang.Class({ 'toggle-background': this.activeArea.toggleBackground.bind(this.activeArea), 'toggle-grid': this.activeArea.toggleGrid.bind(this.activeArea), 'toggle-square-area': this.activeArea.toggleSquareArea.bind(this.activeArea), - 'toggle-font-family': this.activeArea.toggleFontFamily.bind(this.activeArea), - 'toggle-font-weight': this.activeArea.toggleFontWeight.bind(this.activeArea), - 'toggle-font-style': this.activeArea.toggleFontStyle.bind(this.activeArea), - 'toggle-text-alignment': this.activeArea.toggleTextAlignment.bind(this.activeArea), + 'switch-font-family': this.activeArea.switchFontFamily.bind(this.activeArea), + 'switch-font-weight': this.activeArea.switchFontWeight.bind(this.activeArea), + 'switch-font-style': this.activeArea.switchFontStyle.bind(this.activeArea), + 'switch-text-alignment': this.activeArea.switchTextAlignment.bind(this.activeArea), 'toggle-panel-and-dock-visibility': this.togglePanelAndDockOpacity.bind(this), 'toggle-help': this.activeArea.toggleHelp.bind(this.activeArea), 'open-user-stylesheet': this.openUserStyleFile.bind(this), diff --git a/prefs.js b/prefs.js index 6939652..91abf81 100644 --- a/prefs.js +++ b/prefs.js @@ -59,22 +59,22 @@ var INTERNAL_KEYBINDINGS = { 'select-resize-tool': "Select resize", 'select-mirror-tool': "Select mirror", '-separator-2': '', - 'toggle-fill': "Toggle fill/outline", - 'toggle-fill-rule': "Toggle fill rule", + 'switch-fill': "Toggle fill/outline", + 'switch-fill-rule': "Toggle fill rule", '-separator-3': '', 'increment-line-width': "Increment line width", 'decrement-line-width': "Decrement line width", 'increment-line-width-more': "Increment line width even more", 'decrement-line-width-more': "Decrement line width even more", - 'toggle-linejoin': "Change linejoin", - 'toggle-linecap': "Change linecap", - 'toggle-dash': "Dashed line", + 'switch-linejoin': "Change linejoin", + 'switch-linecap': "Change linecap", + 'switch-dash': "Dashed line", '-separator-4': '', - 'toggle-font-family': "Change font family (generic name)", - 'toggle-font-weight': "Change font weight", - 'toggle-font-style': "Change font style", - 'toggle-text-alignment': "Toggle text alignment", - 'toggle-image-file': "Change image file", + 'switch-font-family': "Change font family (generic name)", + 'switch-font-weight': "Change font weight", + 'switch-font-style': "Change font style", + 'switch-text-alignment': "Toggle text alignment", + 'switch-image-file': "Change image file", '-separator-5': '', 'toggle-panel-and-dock-visibility': "Hide panel and dock", 'toggle-background': "Add a drawing background", diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index 61bc640a50075f4b049de2caf6c187d19fc0ae8a..e05b0aa63b886a48c11c13eb10504ac5d338bd82 100644 GIT binary patch literal 4440 zcmaJ_e~4UH8GX^jZkw7+8k26et8Q!3Oj6(MY<4%|&JpJf?8?U+ zXWbUZxrM*UO%R+fI#0q*11hYQYJqBqQdAedUlL2P2qLM1s8kKTMOOuGTeU(rs)RxW z{H;?wpiTA<+xsYhW;D8BiMtFoz-|QC^kx95I9q{jKo4-Agj5J;4{E> zUgf=5_?x+A3pE5&@JxHB=3-lwfCxE%~VI7Bj1N0{Bv%vJ(*M3BQ@=egs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@hfQ65i)+sgn ztp&UZNV&TQ=ugdZJHU?vb?57+(N4{N@WA_kSwm~oI-+KM4uRhTQe*zV^rvP&oCJRX z6z_WI1nty}a~6Ca`0khXA=;@qE=-uSfpXraX5O9)z63PAF!NLTQ>*orLjM6LwjNaN zrDl6;z%4-U-%ZsG@TaE#Hn0Uu`Tf#6v{Q3l4SF8oL->BJd zUx9xFj-LJ})c}8L`dNq3aS?=pDiQ08p1=|^n>(N!&&a8B# z-fIQ7HySgmlEbIVg#SHG*t)j8=n20yhn*zR`32kerEi8(I*GX13ChLh9*qym zT^|2iUM^P;sH!IS|D=CY{I99(ucuk3mF>;@vgqd6xp<=QIwz>dio|==V@2$}q8v9_ z51v7yc<^tI|23EWg>MDIjJm6$zeHt!skZSE$22n73@5szFX%nMTZl^sgvK2S9P{ z#m>;TvY}C}BIpi7w#^F@)hvA()lYwCBg?bJ6O}i%~ELx79pSsGPH@^cVVpwj$%!FbuS~|&WZOb+y5rYtsOzT_M?qp+Ev0-FJ!(fm`@zaPA@7JL zz+?U#0M{OacSEKr-bs1SVC>xUkC8cTmwu3c;{UT z@NUaJ3EPLd)9S7$t;F&DW$S+MMdduu<29tmOD~N8tHsAT#TOQW8 z^KNOuMSeQ2RT)I&3T+k a%4?w_&Y+G{K8FQ;`HJ_t-hr++-~A7^(jc$^ 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 683fbcb..36065fa 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 @@ -151,30 +151,30 @@ decrement the line width even more decrement the line width even more - + ["<Primary>j"] - toggle linejoin - toggle linejoin + switch linejoin + switch linejoin - + ["<Primary>k"] - toggle linecap - toggle linecap + switch linecap + switch linecap - + KP_Multiply','asterisk','asterisk']]]> - toggle fill rule - toggle fill rule + switch fill rule + switch fill rule - + ["<Primary>period"] - toggle dash - toggle dash + switch dash + switch dash - + ["<Primary>a"] - toggle fill - toggle fill + switch fill + switch fill KP_1','1']]]> @@ -221,30 +221,30 @@ select color9 select color9 - + ["<Primary>f"] - toggle font family - toggle font family + switch font family + switch font family - + ["<Primary>w"] - toggle font weight - toggle font weight + switch font weight + switch font weight - + ["<Primary><Shift>w"] - toggle font style - toggle font style + switch font style + switch font style - + ["<Primary><Shift>a"] - toggle text alignment - toggle text alignment + switch text alignment + switch text alignment - + ["<Primary><Shift>i"] - toggle image file - toggle image file + switch image file + switch image file ["<Primary>o"]