Commit Graph

155 Commits

Author SHA1 Message Date
abakkk 5e8cb0ea1f close menu when showing helper 2020-03-01 11:35:33 +01:00
abakkk acb728a117 .pot: "Translators" --> "translator-credits"
"translator-credits" as in Gtk.AboutDialog
2020-02-09 18:03:36 +01:00
abakkk c9bde10ff0 cursor -> textCursor
Not to be confused with pointer cursor.
2020-02-09 17:56:40 +01:00
abakkk cc7e208c35 minor, imports ByteArray module in header 2020-02-09 17:45:28 +01:00
abakkk 528a62fa57 minor, menuCloseFunction
Fixes 'TypeError: this.saveDrawingSubMenu is undefined'
2020-02-09 16:43:21 +01:00
abakkk e0ce5e0096 do not override peristent.json with an empty drawing when changing persistency setting 2020-01-10 13:01:26 +01:00
abakkk aa0a984878 define 'persistent-file-name' and 'svg-file-name' in metadata
instead of 'DEFAULT-FILE-NAME' const
2020-01-10 12:32:28 +01:00
abakkk 4cc28cf100 small rework of prefs.js 2020-01-07 22:15:18 +01:00
abakkk 662f229a64 user.css outside extension directory
* Move drawing style to `default.css`.
* Generate (when opening) and handle `user.css` in `~/.local/share/drawOnYourScreen/`.
2020-01-06 21:24:29 +01:00
abakkk e4d6e327b8 icons/ -> data/icons/ 2020-01-06 15:46:49 +01:00
abakkk 738d06cde6 replace DATA_SUB_DIR const with 'data-dir' metadata property 2020-01-06 15:32:38 +01:00
abakkk 8159ff3f7a minor, metadata 2020-01-06 15:29:01 +01:00
abakkk f4ff709fd3 change imports
* Extension -> Me
* ExtensionJs -> Extension
* Use ExtensionUtils instead of convenience with GS 3.32+
2020-01-05 15:44:51 +01:00
abakkk bc5acc7472 change prefs order and style 2020-01-05 14:50:38 +01:00
abakkk 8f3fbe7aa9 replace 'smoothed-stroke' pref with 'Ctrl' key modifier 2020-01-05 13:42:05 +01:00
abakkk 5b1816d29a change some keybindings
* increment/decrement line width more: `Primary + Page_Up/Down` --> `Primary + Shift + KP_Add/Subtract`
* open previous/next json: `Primary + Left/Right` --> `Primary + Page_Up/Down`
* save drawing as svg file: `Primary + S` --> `Primary + Shift + S`
* save drawing: `Primary + Shift + S` --> `Primary + S`
2020-01-05 12:40:35 +01:00
abakkk 74f602b268 fix cursor update when closing the menu from save entry
St.Entry clutter_text set the DEFAULT cursor on leave event with a delay and overrides the cursor set by area.updatePointerCursor().
In order to update drawing cursor on menu closed, we need to leave the saveEntry before closing menu.
Since escape key press event can't be captured easily, the job is done in the menu close function.
2020-01-05 12:36:42 +01:00
abakkk 04b119557f fix commit ec2348b1e (drawingContentsHasChanged) 2020-01-04 16:07:53 +01:00
abakkk 5997c9cba3 small trick to prevent the menu from "jumping" on first opening 2020-01-04 12:58:05 +01:00
abakkk ec2348b1ec Add asterisk to the drawing name item if the drawing has changed since last save or open operation 2020-01-04 12:50:43 +01:00
abakkk 17bbe345af new "Open" and "Save" drawing features
* Use a "drawOnYourScreen" subdir in the xdg user data dir
* Info item with the name of the last saved/open json file
* "Open drawing" sub menu with data dir content
* "Save drawing" sub menu with entry
* "Save", "Open previous" and "Open next" keybindings
2020-01-04 00:16:20 +01:00
abakkk 7c7d75a2ba minor, true -> GLib.SOURCE_CONTINUE 2020-01-02 01:44:08 +01:00
abakkk 97c8393835 getActor() utility function
Prepare save and open drawing features.
2020-01-02 01:38:57 +01:00
abakkk 7878af7157 DEFAULT_FILE_NAME and getDateString()
Prepare save and open drawing features.
2020-01-02 01:22:25 +01:00
abakkk f0ac2a21b0 add iconName param to showOsd function
Prepare save and open drawing features.
2020-01-02 00:56:40 +01:00
abakkk 6d27a37478 drawing menu separator item style improvement 2020-01-02 00:32:14 +01:00
abakkk 1c6fa54d69 drawing menu style improvement
* Set 'max-height' property to menu actor.
* Reduce size of menu items.
* Rename 'draw-on-your-screen-menu-separator' style class to 'draw-on-your-screen-menu-separator-item' because it is relative to the item actor, not the item._separator actor.
* Rename 'draw-on-your-screen-separator' style class to 'draw-on-your-screen-helper-separator' not to confuse with menu separator.
2019-12-29 15:26:20 +01:00
abakkk 944500fc24 do not create menu when leaving drawing mode
'this.menu.close()' called the getter 'this.menu' that create the menu if it's not exist, which is not wanted when leaving drawing mode.
2019-12-28 13:28:25 +01:00
abakkk bb78937d60 minor, 'DrowOnYourScreen' -> 'DrawOnYourScreen' in licence headers 2019-12-28 13:25:41 +01:00
abakkk e391a3522e Merge branch 'master' into 'master'
Add russian localize

See merge request abakkk/DrawOnYourScreen!5
2019-12-06 17:56:16 +01:00
abakkk f8e4b843b9 Merge branch 'dev' into 'master'
v5

See merge request abakkk/DrawOnYourScreen!6
2019-12-06 16:38:54 +01:00
abakkk 8d30b480a2 version -> 5 2019-12-01 01:37:08 +01:00
abakkk 6dd552ae7e fixes after test on GS 3.24
* use var to export extensionJs.manager
* remove duplicated (old) buildPrefsWidget
* set OsdWindow.HIDE_TIMEOUT in a try/catch because HIDE_TIMEOUT is not exported with 'var'
* capture i in callbacks in for(){} (i is changing)
* add 3.24 version as supported
2019-11-29 18:43:42 +01:00
abakkk fbd6ad709c replace separate emitter (DrawingAreaEmitter) by GObject signal
* signals 'show-osd' and 'stop-drawing'
* use level to set no level (null)
* increase maxLevel when level bar is full
2019-11-27 19:01:07 +01:00
abakkk 1af3554f5c improve pointer cursor management
* cross cursor for geometric shapes
* 'hand' cursor for 'ctrl' actions
* default cursor in menu
2019-11-27 06:04:37 +01:00
abakkk fb8e46bb45 fix text shape that displayed 'ctrl' shortcuts 2019-11-25 11:44:18 +01:00
abakkk 2d92334fe9 update metadata 2019-11-25 11:25:35 +01:00
Sazonow Andrew fab077b7a9 Add russian localize 2019-10-24 10:57:17 +02:00
abakkk 4133492989 Merge branch 'dev' into 'master'
Dev

See merge request abakkk/DrawOnYourScreen!4
2019-10-11 14:26:17 +02:00
abakkk 3f2fb189c7 minor, readme 2019-10-11 14:21:04 +02:00
abakkk e9445ca2c9 version -> 4.1 2019-10-11 13:33:41 +02:00
abakkk 99369f0d42 minor, .pot comments 2019-10-11 13:32:41 +02:00
abakkk 52ca619294 Fix lineWidth
* GS 3.34 compatibility for barLevel, see for example status/volume.js StreamSlider.getLevel():
  * 3.32 : "return 100 * this._stream.volume / this._control.get_vol_max_norm();"
  * 3.34 : "return this._stream.volume / this._control.get_vol_max_norm();"
* allow 0 px lineWidth because stroke lines cannot have color with some transparency
* use warning color in OSD and drawing menu when lineWidth is 0 px
2019-10-11 13:26:08 +02:00
abakkk 7d9bb459b4 Create drawing menu on demand 2019-10-11 09:39:17 +02:00
abakkk 8671a9e502 GS 3.34 compatibility
* PanelMenu.Button actor
* PopupMenu.PopupBaseMenuItem, PopupMenu.PopupSwitchMenuItem and PopupMenu.PopupSeparatorMenuItem actor
* Slider.Slider actor and 'value-changed' signal
* PopupMenu.PopupMenuManager init params
* 'org.gnome.settings-daemon.plugins.media-keys' setting values : string -> array of strings
2019-10-11 09:22:37 +02:00
Aerowolf 71c2309eb8 update Simplified Chinese translation #5 2019-04-03 14:38:56 +02:00
abakkk 98030f870d add Simplified Chinese translation #5 2019-04-02 14:02:29 +02:00
abakkk 62c1ac3e96 '%s' -> '%d' 2019-04-01 22:09:33 +02:00
abakkk d543ba5c90 minor 2019-04-01 21:26:56 +02:00
abakkk 31e540e128 i18n 2019-04-01 21:05:18 +02:00