├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .travis.yml ├── 01-setup.sh ├── 02-build-bin.sh ├── 03-build-snap.sh ├── LICENSE ├── README.md ├── data ├── Application.css ├── com.github.bytepixie.snippetpixie.appdata.xml.in ├── com.github.bytepixie.snippetpixie.desktop.in ├── com.github.bytepixie.snippetpixie.gresource.xml ├── com.github.bytepixie.snippetpixie.gschema.xml ├── icons │ ├── 32 │ │ └── com.github.bytepixie.snippetpixie.svg │ ├── 48 │ │ └── com.github.bytepixie.snippetpixie.svg │ ├── 64 │ │ └── com.github.bytepixie.snippetpixie.svg │ ├── 128 │ │ └── com.github.bytepixie.snippetpixie.svg │ └── 256 │ │ └── com.github.bytepixie.snippetpixie.svg ├── meson.build ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png ├── screenshot-5.png ├── screenshot-6.png ├── screenshot.png ├── snap-banner.png ├── snap-banner.xcf └── snippetpixiedemo.gif ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules └── source │ └── format ├── man ├── snippetpixie-placeholders.5 ├── snippetpixie-placeholders.5.scd ├── snippetpixie.1 └── snippetpixie.1.scd ├── meson.build ├── meson └── post_install.py ├── po ├── LINGUAS ├── POTFILES ├── com.github.bytepixie.snippetpixie.pot ├── extra │ ├── LINGUAS │ ├── POTFILES │ ├── extra.pot │ ├── fr.po │ ├── meson.build │ └── nl.po ├── fr.po ├── meson.build └── nl.po ├── snapcraft.yaml └── src ├── Application.vala ├── Settings ├── CustomShortcutSettings.vala └── Shortcut.vala ├── Snippet.vala ├── SnippetsManager.vala ├── Utils.vala ├── Widgets ├── FramedTextView.vala ├── MainWindowHeader.vala ├── SearchAndPasteList.vala ├── SearchAndPasteListRow.vala ├── ShortcutEntry.vala ├── SnippetsList.vala ├── SnippetsListItem.vala ├── ViewStack.vala └── WelcomeView.vala └── Windows ├── MainWindow.vala └── SearchAndPasteWindow.vala /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behaviour: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behaviour** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. elementary OS 5.0 Juno] 25 | - Snippet Pixie Version [e.g. 1.0] 26 | - Related Application [e.g. Chrome, Firefox, Mail, Quilter] 27 | 28 | **Additional context** 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | build/ 3 | .idea/ 4 | .buildconfig 5 | parts/ 6 | prime/ 7 | snap/ 8 | stage/ 9 | *.snap 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - 10.17.0 7 | 8 | services: 9 | - docker 10 | 11 | addons: 12 | apt: 13 | sources: 14 | - ubuntu-toolchain-r-test 15 | packages: 16 | - libstdc++-5-dev 17 | 18 | install: 19 | - npm i -g @elementaryos/houston 20 | 21 | script: 22 | - houston ci 23 | -------------------------------------------------------------------------------- /01-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd `dirname "$0"` 4 | 5 | # 6 | # Clean out any previous artifacts. 7 | # 8 | rm -rf ./build ./parts ./prime ./stage ./snap ./snippetpixie_* 9 | 10 | # 11 | # Set up local environment. 12 | # 13 | meson build --prefix=/usr 14 | -------------------------------------------------------------------------------- /02-build-bin.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd `dirname "$0"` 4 | 5 | # 6 | # We'll update translations and then just run tests as they also build the binary. 7 | # 8 | cd build/ 9 | ninja com.github.bytepixie.snippetpixie-pot 10 | ninja com.github.bytepixie.snippetpixie-update-po 11 | ninja extra-pot 12 | ninja extra-update-po 13 | ninja test 14 | -------------------------------------------------------------------------------- /03-build-snap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd `dirname "$0"` 4 | 5 | # 6 | # Clean out any previous artifacts and then build. 7 | # 8 | snapcraft clean --use-lxd 9 | snapcraft --use-lxd 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Status 2 | Snippet Pixie is no longer being developed or maintained, please use [Snippet Expander](https://snippetexpander.org) instead. 3 | 4 | Snippet Expander is Snippet Pixie's successor, re-developed from scratch for better functionality, speed and stability. 5 | 6 | You can export your snippets from Snippet Pixie and [import them into Snippet Expander](https://snippetexpander.org/#import-and-export). 7 | 8 | --- 9 |

10 | Icon 11 |

12 |

Snippet Pixie

13 |

14 | Get it on AppCenter 15 | Get it from the Snap Store 16 |

17 |

18 | Demo 19 |

20 | 21 | Your little expandable text snippet helper. 22 | 23 | Save your often used text snippets and then expand them whenever you type their abbreviation. 24 | 25 | For example:- "spr\`" expands to "Snippet Pixie rules!" 26 | 27 | For non-accessible applications such as browsers and Electron apps, there's a shortcut (default is Ctrl+\`) for opening a search window that pastes the selected snippet. 28 | 29 | The Search and Paste window, opened with Ctrl+\` (can be changed), is very convenient for quickly finding and pasting snippets, and shows the most recently used snippets first for quick access. Using `Shift`+`Return` or `Shift`+`Click` on an entry in the Search and Paste window will `Shift`+`Ctrl`+`V` paste, great for terminal emulators, vim etc. 30 | 31 | Snippets can be imported and exported in a simple JSON format. 32 | 33 | Supports [placeholders](#placeholders):- 34 | 35 | * **[Date/Time](#date):** Insert the current or calculated date/time with configurable format. 36 | * **[Clipboard](#clipboard):** Insert the text contents of the clipboard. 37 | * **[Snippets](#snippet):** Insert snippets in your snippets! 38 | * **[Cursor](#cursor):** Set where the cursor should end up after the snippet has expanded. 39 | 40 | ![Snippet Pixie Edit Screen](data/screenshot.png?raw=true) 41 | 42 | ![Snippet Pixie Welcome Screen](data/screenshot-2.png?raw=true) 43 | 44 | ![Snippet Pixie Search and Paste Shortcut Window](data/screenshot-3.png?raw=true) 45 | 46 | ## Placeholders 47 | 48 | All placeholders are delimited (wrapped) by `$$`, with the placeholder name starting with an `@` symbol. 49 | 50 | For example, today's date can be inserted with `$$@date$$`. 51 | 52 | Some placeholders allow for extra arguments when `:` follows their name and that is followed by the argument. For example a format for a date, or the abbreviation for a snippet. Check the following descriptions for each placeholder for more details. 53 | 54 | To use `$$` in your snippet body, escape the second `$` with a backslash like so: `$\$`. 55 | 56 | ### @date 57 | 58 | Quick Examples: 59 | 60 | * Today's date with system format: `$$@date$$` 61 | * Today's date with custom format: `$$@date:%Y-%m-%d %H:%M:%S$$` 62 | * Tomorrow's date with system format: `$$@date@+1D$$` 63 | * Date 2 weeks from today with custom format: `$$@date@+2W:%x$$` 64 | * Time 3 hours from now: `$$@time@+3H$$` 65 | 66 | `@time` is an alias for `@date`, with one important difference, the default output if no format specified is the default time format (`%X`) rather than default date format (`%x`). 67 | 68 | The optional format specified after `:` can take a format string as detailed in the [GLib.DateTime.format function's docs](https://valadoc.org/glib-2.0/GLib.DateTime.format.html). 69 | 70 | The optional date calculation starts with an `@` after the placeholder name, followed by a signed integer and unit. The unit types are as follows: 71 | 72 | * **Y:** Years 73 | * **M:** Months 74 | * **W:** Weeks 75 | * **D:** Days 76 | * **h:** Hours 77 | * **m:** Minutes 78 | * **s:** Seconds 79 | 80 | You can apply more than one date calculation, for example `+2h+30m` adds 2 hours and 30 minutes to the current time. 81 | 82 | You can use both positive (`+`) and negative calculations, for example `-3D` takes 3 days from the current date. 83 | 84 | ### @clipboard 85 | 86 | When `$$@clipboard$$` is part of a snippet's body, when its abbreviation is expanded the current text contents of the clipboard will replace the placeholder. 87 | 88 | ### @snippet 89 | 90 | You can have up to three levels of embedded snippets with the `@snippet` placeholder. 91 | 92 | The abbreviation for the snippet to be embedded is entered after `:`, for example `$$@snippet:sigg;$$` expands the snippet with abbreviation `sigg;` in place of the placeholder. 93 | 94 | ### @cursor 95 | 96 | Adding `$$@cursor$$` to a snippet's body will put the cursor in its place after expansion instead of at the end of the expanded text. 97 | 98 | If `$$@cursor$$` is entered more than once in a snippet's body or via snippet embedding, then the last occurrence of the cursor placeholder wins. 99 | 100 | ## Known Issues 101 | 102 | * Auto-expansion only works on accessible applications, use the shortcut to open the search and paste window for other applications such as browsers and Electron based apps. 103 | * Auto-expansion does not work in terminals, but the shortcut method works with terminals that accept `Ctrl`+`v` for paste such as the elementary OS terminal. 104 | * The cursor placeholder is not supported when using the shortcut method rather than auto-expansion. 105 | 106 | ## Roadmap 107 | 108 | * ~~Automatically add to Startup apps~~ 109 | * ~~Export/Import snippets~~ 110 | * ~~Date/Time, clipboard, other snippets and cursor placeholders~~ 111 | * ~~Snippet search~~ 112 | * Group snippets? 113 | * Undo/Redo of snippet edits 114 | * Right To Left (RTL) language support 115 | * Rich text? 116 | 117 | ## Building, Testing, and Installation 118 | 119 | You'll need the following dependencies to build: 120 | * meson 121 | * valac 122 | * appstream 123 | * desktop-file-utils 124 | * libatspi2.0-dev 125 | * libgee-0.8-dev 126 | * libglib2.0-dev 127 | * libgranite-dev 128 | * libgtk-3-dev 129 | * libibus-1.0-dev 130 | * libjson-glib-dev 131 | * libsqlite3-dev 132 | * libxtst-dev 133 | * libx11-dev 134 | 135 | Run `meson build` to configure the build environment and then change to the build directory and run `ninja test` to build and run automated tests 136 | 137 | meson build --prefix=/usr 138 | cd build 139 | ninja test 140 | 141 | There's also a convenient `01-setup.sh` script that should need only be run once to set up the `build` directory. 142 | 143 | `02-build-bin.sh` is a neat way of building `build/com.github.bytepixie.snippetpixie` after changing the source while keeping the translation templates and language files up to date with any changes and running the automated tests. 144 | 145 | To install, use `ninja install`, then execute with `com.github.bytepixie.snippetpixie` 146 | 147 | sudo ninja install 148 | com.github.bytepixie.snippetpixie 149 | -------------------------------------------------------------------------------- /data/Application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | .h1 { 21 | font-size: 32px; 22 | } 23 | 24 | 25 | .dim-label.h2 { 26 | font-size: 24px; 27 | } 28 | -------------------------------------------------------------------------------- /data/com.github.bytepixie.snippetpixie.appdata.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.github.bytepixie.snippetpixie 5 | CC0 6 | GPL-2.0+ 7 | Snippet Pixie 8 | Your little expandable text snippet helper 9 | 10 |

Save your often used text snippets and then expand them whenever you type their abbreviation.

11 |

For example:- "spr`" expands to "Snippet Pixie rules!"

12 |

For non-accessible applications such as browsers and Electron apps, there's a shortcut (default is Ctrl+`) for opening a search window that pastes the selected snippet.

13 |

The Search and Paste window, opened with Ctrl+` (can be changed), is very convenient for quickly finding and pasting snippets, and shows the most recently used snippets first for quick access. Using `Shift`+`Return` or `Shift`+`Click` on an entry in the Search and Paste window will `Shift`+`Ctrl`+`V` paste, great for terminal emulators, vim etc.

14 |

Snippets can be imported and exported in a simple JSON format.

15 |

Supports placeholders:-

16 | 22 |

All placeholders are delimited (wrapped) by "$$", with the placeholder name starting with an "@" symbol.

23 |

For example, today's date can be inserted with "$$@date$$".

24 |
25 | 26 | com.github.bytepixie.snippetpixie 27 | 28 | 29 | 30 | 31 |
    32 |
  • Add an auto start on login menu setting.
  • 33 |
34 |
35 |
36 | 37 | 38 |
    39 |
  • Enable Shift-Return to Shift-Ctrl-V into terminal emulators from the Search and Paste window.
  • 40 |
41 |
42 |
43 | 44 | 45 |
    46 |
  • Fixed search box showing when there are no Snippets to search.
  • 47 |
  • Updated Dutch translations. Thanks @Vistaus on GitHub! 🇳🇱
  • 48 |
49 |
50 |
51 | 52 | 53 |
    54 |
  • Added search of Snippets in main window.
  • 55 |
  • Added last used Snippets shown first in Search and Paste window.
  • 56 |
  • Added shortcuts for main window actions such as Add Snippet (Ctrl+n).
  • 57 |
  • Added support for system Light and Dark appearance preference.
  • 58 |
  • Improved theming of window controls to be more consistent with system.
  • 59 |
60 |
61 |
62 | 63 | 64 |
    65 |
  • Added Dutch translations. Huge thanks to @Vistaus on GitHub! 🇳🇱
  • 66 |
  • Fixed occasional performance issues when auto-expand turned on.
  • 67 |
  • Fixed incorrect shortcut command being saved when binary file renamed.
  • 68 |
  • Fixed visibility of Search and Paste entry text in some circumstances.
  • 69 |
70 |
71 |
72 | 73 | 74 |
    75 |
  • Added Search and Paste window, opened with shortcut Ctrl+` by default.
  • 76 |
  • Added "Auto expand snippets" checkbox to preferences menu for enabling/disabling snippet expansion while typing in accessible apps.
  • 77 |
  • Added ability to change Search and Paste shortcut in preferences menu.
  • 78 |
  • Added preference for whether text selected before using shortcut is used for initial search.
  • 79 |
  • Added option to focus search box when using the search and paste shortcut.
  • 80 |
  • Fixed support for Wayland.
  • 81 |
  • Removed auto expanding of snippets in non-accessible applications such as browsers and electron apps (use shortcut for search and paste window instead).
  • 82 |
83 |
84 |
85 | 86 | 87 |
    88 |
  • Fixed Snippet Pixie stopping Super+[other-key] from working.
  • 89 |
90 |
91 |
92 | 93 | 94 |
    95 |
  • Improved speed of abbreviation expansion.
  • 96 |
  • Fixed abbreviations randomly stopping to expand.
  • 97 |
  • Fixed reliability of abbreviations being recognised.
  • 98 |
  • Fixed abbreviations sometimes expanding with clipboard's contents.
  • 99 |
100 |
101 |
102 | 103 | 104 |
    105 |
  • Fixed abbreviations sometimes not expanding.
  • 106 |
107 |
108 |
109 | 110 | 111 |
    112 |
  • Vastly improved compatibility with a wide variety of applications.
  • 113 |
  • Now works with Chrome, Chromium and Electron apps.
  • 114 |
  • Much faster abbreviation detection.
  • 115 |
  • Much nicer to the system in general.
  • 116 |
  • Alas, recent Firefox versions no longer compatible, hope to support in the future.
  • 117 |
  • A few terminal emulators blacklisted to avoid problems, hope to support in the future.
  • 118 |
119 |
120 |
121 | 122 | 123 |
    124 |
  • Added man pages for snippetpixie and snippetpixie-placeholders.
  • 125 |
  • Minor fixes for compile time warnings.
  • 126 |
127 |
128 |
129 | 130 | 131 |
    132 |
  • Various fixes for snap.
  • 133 |
  • Updated credits to use GitHub handles and add Nathan as a translator (long overdue)!
  • 134 |
135 |
136 |
137 | 138 | 139 |

Added support for placeholders.

140 |
    141 |
  • Date/Time: Insert the current or calculated date/time with configurable format.
  • 142 |
  • Clipboard: Insert the text contents of the clipboard.
  • 143 |
  • Snippets: Insert snippets in your snippets!
  • 144 |
  • Cursor: Set where the cursor should end up after the snippet has expanded.
  • 145 |
146 |
147 |
148 | 149 | 150 |
    151 |
  • Improved active window/control detection when switching via Alt-Tab.
  • 152 |
153 |
154 |
155 | 156 | 157 |
    158 |
  • Improved performance, compatibility, and stability.
  • 159 |
  • Added French translations. Huge thanks to @NathanBnm on GitHub! 🇨🇵️
  • 160 |
161 |
162 |
163 | 164 | 165 |
    166 |
  • Added ability to export snippets to a JSON file via menu button.
  • 167 |
  • Added ability to export snippets to a JSON file via `--export` or `-e` CLI options.
  • 168 |
  • Added ability to import snippets from an exported JSON file via menu button or welcome screen. Shocking! 😱
  • 169 |
  • Added ability to import snippets from an exported JSON file via `--import` or `-i` CLI options. Bet you didn't see that coming! 😉
  • 170 |
171 |
172 |
173 | 174 | 175 |
    176 |
  • 1.0 Release!
  • 177 |
  • Added Snippet Pixie to login startup items by default.
  • 178 |
  • Added --autostart={on|off|status} option to CLI for turning autostart on, off, or getting settings status.
  • 179 |
  • Changed body field to select all text when tabbed into.
  • 180 |
181 |
182 |
183 | 184 | 185 |
    186 |
  • Fixed crash when an application with a large number of controls was activated.
  • 187 |
  • Fixed problem with snippets sometimes not expanding when returning to an application.
  • 188 |
  • Added a splash of colour to the window header.
  • 189 |
  • Added a new application icon.
  • 190 |
191 |
192 |
193 | 194 | 195 |

Initial pre-release.

196 |
197 |
198 |
199 | 200 | 201 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot.png 202 | 203 | 204 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot-2.png 205 | 206 | 207 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot-3.png 208 | 209 | 210 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot-4.png 211 | 212 | 213 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot-5.png 214 | 215 | 216 | https://raw.githubusercontent.com/bytepixie/snippetpixie/master/data/screenshot-6.png 217 | 218 | 219 | 220 | none 221 | none 222 | none 223 | none 224 | none 225 | none 226 | none 227 | none 228 | none 229 | none 230 | none 231 | none 232 | none 233 | none 234 | none 235 | none 236 | none 237 | none 238 | none 239 | none 240 | none 241 | none 242 | none 243 | none 244 | none 245 | none 246 | none 247 | 248 | Byte Pixie 249 | https://www.snippetpixie.com 250 | https://github.com/bytepixie/snippetpixie/issues 251 | https://github.com/bytepixie/snippetpixie/tree/master/po 252 | 253 | #52658d 254 | #fafafa 255 | 10 256 | pk_live_fnFj4PJkcN1zLsDXY9xraz1l 257 | 258 |
259 | -------------------------------------------------------------------------------- /data/com.github.bytepixie.snippetpixie.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Snippet Pixie 3 | Comment=Your little expandable text snippet helper 4 | Exec=com.github.bytepixie.snippetpixie 5 | Icon=com.github.bytepixie.snippetpixie 6 | Keywords=expand;text;snippet; 7 | Terminal=false 8 | Type=Application 9 | StartupNotify=true 10 | Categories=GTK;Office;TextTools;Utility; 11 | Actions=Start;Stop; 12 | 13 | [Desktop Action Start] 14 | Name=Start Snippet Pixie 15 | Exec=com.github.bytepixie.snippetpixie --start 16 | 17 | [Desktop Action Stop] 18 | Name=Stop Snippet Pixie 19 | Exec=com.github.bytepixie.snippetpixie --stop 20 | -------------------------------------------------------------------------------- /data/com.github.bytepixie.snippetpixie.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Application.css 5 | 6 | 7 | -------------------------------------------------------------------------------- /data/com.github.bytepixie.snippetpixie.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -1 8 | Most recent x position of Snippet Pixie 9 | Most recent x position of Snippet Pixie 10 | 11 | 12 | -1 13 | Most recent y position of Snippet Pixie 14 | Most recent y position of Snippet Pixie 15 | 16 | 17 | -1 18 | Most recent width of Snippet Pixie 19 | Most recent width of Snippet Pixie 20 | 21 | 22 | -1 23 | Most recent height of Snippet Pixie 24 | Most recent height of Snippet Pixie 25 | 26 | 27 | true 28 | Should Snippet Pixie autostart on log in? 29 | If turned on, then Snippet Pixie will automatically start in the background when you log in to the desktop 30 | 31 | 32 | true 33 | Should Snippet Pixie auto-expand typed abbreviations? 34 | If turned on, then Snippet Pixie will monitor keystrokes in accessible applications and expand an abbreviation when its last character is entered 35 | 36 | 37 | false 38 | Should Snippet Pixie's search and paste search box be populated with selected text? 39 | If turned on, when Snippet Pixie's shortcut is used to open the search and paste window, the last selected text will be used for the initial snippet search 40 | 41 | 42 | true 43 | Should Snippet Pixie's search and paste search box be focused when opened? 44 | If turned on, when Snippet Pixie's shortcut is used to open the search and paste window, the search box will have focus and any initial search text will be selected 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /data/icons/128/com.github.bytepixie.snippetpixie.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 40 | 41 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 68 | 72 | 73 | 83 | 85 | 89 | 93 | 94 | 104 | 106 | 110 | 114 | 115 | 117 | 121 | 125 | 129 | 130 | 138 | 147 | 156 | 157 | 159 | 160 | 162 | image/svg+xml 163 | 165 | 166 | 167 | 168 | 169 | 173 | 180 | 188 | 195 | 196 | 205 | 208 | 211 | 214 | 218 | 227 | 232 | 242 | 246 | SP` 257 | SP` 268 | 269 | 270 | -------------------------------------------------------------------------------- /data/icons/256/com.github.bytepixie.snippetpixie.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 40 | 41 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 68 | 72 | 73 | 83 | 85 | 89 | 93 | 94 | 104 | 106 | 110 | 114 | 115 | 117 | 121 | 125 | 129 | 130 | 138 | 147 | 156 | 157 | 159 | 160 | 162 | image/svg+xml 163 | 165 | 166 | 167 | 168 | 169 | 173 | 180 | 188 | 195 | 196 | 205 | 208 | 211 | 214 | 218 | 227 | 232 | 242 | 246 | SP` 257 | SP` 268 | 269 | 270 | -------------------------------------------------------------------------------- /data/icons/32/com.github.bytepixie.snippetpixie.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 40 | 41 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 68 | 72 | 73 | 83 | 85 | 89 | 93 | 94 | 104 | 106 | 110 | 114 | 115 | 123 | 125 | 129 | 133 | 137 | 138 | 147 | 155 | 156 | 158 | 159 | 161 | image/svg+xml 162 | 164 | 165 | 166 | 167 | 168 | 172 | 176 | 183 | 191 | 198 | 199 | 200 | 209 | 218 | 228 | 232 | 236 | SP` 247 | SP` 258 | 259 | 260 | -------------------------------------------------------------------------------- /data/icons/48/com.github.bytepixie.snippetpixie.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 40 | 41 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 68 | 72 | 73 | 83 | 85 | 89 | 93 | 94 | 104 | 106 | 110 | 114 | 115 | 117 | 121 | 125 | 129 | 130 | 138 | 147 | 155 | 156 | 158 | 159 | 161 | image/svg+xml 162 | 164 | 165 | 166 | 167 | 168 | 172 | 179 | 187 | 194 | 195 | 204 | 213 | 223 | 227 | 231 | SP` 242 | SP` 253 | 254 | 255 | -------------------------------------------------------------------------------- /data/icons/64/com.github.bytepixie.snippetpixie.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 40 | 41 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 68 | 72 | 73 | 83 | 85 | 89 | 93 | 94 | 104 | 106 | 110 | 114 | 115 | 117 | 121 | 125 | 129 | 130 | 138 | 147 | 155 | 156 | 158 | 159 | 161 | image/svg+xml 162 | 164 | 165 | 166 | 167 | 168 | 172 | 179 | 187 | 194 | 195 | 204 | 207 | 210 | 213 | 217 | 226 | 230 | 240 | 244 | SP` 255 | SP` 266 | 267 | 268 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | icon_sizes = ['32', '48', '64', '128', '256'] 2 | 3 | foreach i : icon_sizes 4 | install_data( 5 | join_paths('icons', i, meson.project_name() + '.svg'), 6 | install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps') 7 | ) 8 | install_data( 9 | join_paths('icons', i, meson.project_name() + '.svg'), 10 | install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps') 11 | ) 12 | endforeach 13 | 14 | install_data( 15 | meson.project_name() + '.gschema.xml', 16 | install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas') 17 | ) 18 | 19 | i18n.merge_file( 20 | input: meson.project_name() + '.desktop.in', 21 | output: meson.project_name() + '.desktop', 22 | po_dir: join_paths(meson.source_root(), 'po', 'extra'), 23 | type: 'desktop', 24 | install: true, 25 | install_dir: join_paths(get_option('datadir'), 'applications') 26 | ) 27 | 28 | i18n.merge_file( 29 | input: meson.project_name() + '.appdata.xml.in', 30 | output: meson.project_name() + '.appdata.xml', 31 | po_dir: join_paths(meson.source_root(), 'po', 'extra'), 32 | install: true, 33 | install_dir: join_paths(get_option('datadir'), 'metainfo') 34 | ) 35 | 36 | 37 | test ( 38 | 'Validate desktop file', 39 | find_program('desktop-file-validate'), 40 | args: join_paths(meson.current_build_dir (), meson.project_name() + '.desktop') 41 | ) 42 | -------------------------------------------------------------------------------- /data/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot-2.png -------------------------------------------------------------------------------- /data/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot-3.png -------------------------------------------------------------------------------- /data/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot-4.png -------------------------------------------------------------------------------- /data/screenshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot-5.png -------------------------------------------------------------------------------- /data/screenshot-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot-6.png -------------------------------------------------------------------------------- /data/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/screenshot.png -------------------------------------------------------------------------------- /data/snap-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/snap-banner.png -------------------------------------------------------------------------------- /data/snap-banner.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/snap-banner.xcf -------------------------------------------------------------------------------- /data/snippetpixiedemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianmjones/snippetpixie/c0ef62440fe99a22ba030f047dcbe8cdea777957/data/snippetpixiedemo.gif -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | com.github.bytepixie.snippetpixie (1.5.3) xenial; urgency=medium 2 | 3 | * Add an auto start on login menu setting. 4 | 5 | -- Byte Pixie Tue, 24 Aug 2021 21:30:00 +0000 6 | 7 | com.github.bytepixie.snippetpixie (1.5.2) xenial; urgency=medium 8 | 9 | * Enable Shift-Return to Shift-Ctrl-V into terminal emulators from the Search and Paste window. 10 | 11 | -- Byte Pixie Thu, 26 May 2021 19:30:00 +0000 12 | 13 | com.github.bytepixie.snippetpixie (1.5.1) xenial; urgency=medium 14 | 15 | * Fixed search box showing when there are no Snippets to search. 16 | * Updated Dutch translations. Thanks @Vistaus on GitHub! 🇳🇱 17 | 18 | -- Byte Pixie Thu, 02 Mar 2021 23:24:25 +0000 19 | 20 | com.github.bytepixie.snippetpixie (1.5.0) xenial; urgency=medium 21 | 22 | * Added search of Snippets in main window. 23 | * Added last used Snippets shown first in Search and Paste window. 24 | * Added shortcuts for main window actions such as Add Snippet (Ctrl+n). 25 | * Added support for system Light and Dark appearance preference. 26 | * Improved theming of window controls to be more consistent with system. 27 | 28 | -- Byte Pixie Thu, 05 Nov 2020 23:24:25 +0000 29 | 30 | com.github.bytepixie.snippetpixie (1.4.1) xenial; urgency=medium 31 | 32 | * Added Dutch translations. Huge thanks to @Vistaus on GitHub! 🇳🇱 33 | * Fixed occasional performance issues when auto-expand turned on. 34 | * Fixed incorrect shortcut command being saved when binary file renamed. 35 | * Fixed visibility of Search and Paste entry text in some circumstances. 36 | 37 | -- Byte Pixie Wed, 02 Sep 2020 00:11:22 +0000 38 | 39 | com.github.bytepixie.snippetpixie (1.4.0) xenial; urgency=medium 40 | 41 | * Added Search and Paste window, opened with shortcut Ctrl+` by default. 42 | * Added "Auto expand snippets" checkbox to preferences menu for enabling/disabling snippet expansion while typing in accessible apps. 43 | * Added ability to change Search and Paste shortcut in preferences menu. 44 | * Added preference for whether text selected before using shortcut is used for initial search. 45 | * Added option to focus search box when using the search and paste shortcut. 46 | * Fixed support for Wayland. 47 | * Removed auto expanding of snippets in non-accessible applications such as browsers and electron apps (use shortcut for search and paste window instead). 48 | 49 | -- Byte Pixie Sun, 30 Aug 2020 00:11:22 +0000 50 | 51 | com.github.bytepixie.snippetpixie (1.3.3) xenial; urgency=medium 52 | 53 | * Fixed Snippet Pixie stopping Super+[other-key] from working. 54 | 55 | -- Byte Pixie Mon, 01 Jun 2020 13:31:33 +0000 56 | 57 | com.github.bytepixie.snippetpixie (1.3.2) xenial; urgency=medium 58 | 59 | * Improved speed of abbreviation expansion. 60 | * Fixed abbreviations randomly stopping to expand. 61 | * Fixed reliability of abbreviations being recognised. 62 | * Fixed abbreviations sometimes expanding with clipboard's contents. 63 | 64 | -- Byte Pixie Wed, 06 May 2020 12:34:56 +0000 65 | 66 | com.github.bytepixie.snippetpixie (1.3.1) xenial; urgency=medium 67 | 68 | * Fixed abbreviations sometimes not expanding. 69 | 70 | -- Byte Pixie Thu, 27 Feb 2020 12:34:56 +0000 71 | 72 | com.github.bytepixie.snippetpixie (1.3.0) xenial; urgency=medium 73 | 74 | * Vastly improved compatibility with a wide variety of applications. 75 | * Now works with Chrome, Chromium and Electron apps. 76 | * Much faster abbreviation detection. 77 | * Much nicer to the system in general. 78 | * Alas, recent Firefox versions no longer compatible, hope to support in the future. 79 | * A few terminal emulators blacklisted to avoid problems, hope to support in the future. 80 | 81 | -- Byte Pixie Sun, 23 Feb 2020 12:34:56 +0000 82 | 83 | com.github.bytepixie.snippetpixie (1.2.2) xenial; urgency=medium 84 | 85 | * Added man pages for snippetpixie and snippetpixie-placeholders. 86 | * Minor fixes for compile time warnings. 87 | 88 | -- Byte Pixie Tue, 10 Dec 2019 12:34:56 +0000 89 | 90 | com.github.bytepixie.snippetpixie (1.2.1) xenial; urgency=medium 91 | 92 | * Various fixes for snap. 93 | * Updated credits to use GitHub handles and add Nathan as a translator (long overdue)! 94 | 95 | -- Byte Pixie Wed, 10 Jul 2019 12:34:56 +0000 96 | 97 | com.github.bytepixie.snippetpixie (1.2.0) xenial; urgency=medium 98 | 99 | Added support for placeholders. 100 | 101 | * Date/Time: Insert the current or calculated date/time with configurable format. 102 | * Clipboard: Insert the text contents of the clipboard. 103 | * Snippets: Insert snippets in your snippets! 104 | * Cursor: Set where the cursor should end up after the snippet has expanded. 105 | 106 | -- Byte Pixie Mon, 22 Apr 2019 12:34:56 +0000 107 | 108 | com.github.bytepixie.snippetpixie (1.1.2) xenial; urgency=medium 109 | 110 | * Improved active window/control detection when switching via Alt-Tab. 111 | 112 | -- Byte Pixie Sat, 06 Apr 2019 12:34:56 +0000 113 | 114 | com.github.bytepixie.snippetpixie (1.1.1) xenial; urgency=medium 115 | 116 | * Improved performance, compatibility, and stability. 117 | * Added French translations. Huge thanks to @NathanBnm on GitHub! 🇨🇵️ 118 | 119 | -- Byte Pixie Wed, 03 Apr 2019 12:34:56 +0000 120 | 121 | com.github.bytepixie.snippetpixie (1.1.0) xenial; urgency=medium 122 | 123 | * Added ability to export snippets to a JSON file via menu button. 124 | * Added ability to export snippets to a JSON file via `--export` or `-e` CLI options. 125 | * Added ability to import snippets from an exported JSON file via menu button or welcome screen. Shocking! 😱 126 | * Added ability to import snippets from an exported JSON file via `--import` or `-i` CLI options. Bet you didn't see that coming! 😉 127 | 128 | -- Byte Pixie Tue, 05 Feb 2019 12:34:56 +0000 129 | 130 | com.github.bytepixie.snippetpixie (1.0.0) xenial; urgency=medium 131 | 132 | * 1.0 Release! 133 | * Added Snippet Pixie to login startup items by default. 134 | * Added --autostart={on|off|status} option to CLI for turning autostart on, off, or getting settings status. 135 | * Changed body field to select all text when tabbed into. 136 | 137 | -- Byte Pixie Tue, 15 Jan 2019 12:34:56 +0000 138 | 139 | com.github.bytepixie.snippetpixie (0.9.3) xenial; urgency=medium 140 | 141 | * Fixed crash when an application with a large number of controls was activated. 142 | * Fixed problem with snippets sometimes not expanding when returning to an application. 143 | * Added a splash of colour to the window header. 144 | * Added a new application icon. 145 | 146 | -- Byte Pixie Sat, 08 Dec 2018 12:34:56 +0000 147 | 148 | com.github.bytepixie.snippetpixie (0.9.2) xenial; urgency=medium 149 | 150 | * Initial pre-release. 151 | 152 | -- Byte Pixie Sat, 01 Dec 2018 12:34:56 +0000 153 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: com.github.bytepixie.snippetpixie 2 | Section: x11 3 | Priority: extra 4 | Maintainer: Byte Pixie 5 | Build-Depends: appstream, 6 | debhelper (>= 9), 7 | meson, 8 | valac, 9 | desktop-file-utils, 10 | libatspi2.0-dev, 11 | libgee-0.8-dev, 12 | libglib2.0-dev, 13 | libgranite-dev, 14 | libgtk-3-dev, 15 | libibus-1.0-dev, 16 | libjson-glib-dev, 17 | libsqlite3-dev, 18 | libxtst-dev, 19 | libx11-dev 20 | Standards-Version: 3.9.3 21 | 22 | Package: com.github.bytepixie.snippetpixie 23 | Architecture: any 24 | Depends: ${misc:Depends}, ${shlibs:Depends} 25 | Description: Your little expandable text snippet helper. 26 | Save your often used text snippets and then expand them whenever you type their abbreviation. 27 | For example:- "spr`" expands to "Snippet Pixie rules!" 28 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5 2 | Upstream-Name: snippetpixie 3 | Source: https://github.com/bytepixie/snippetpixie 4 | 5 | Files: * 6 | Copyright: 2018 Byte Pixie Limited 7 | License: GPL-2.0+ 8 | 9 | License: GPL-2.0+ 10 | This program is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 2 of the License, or 13 | (at your option) any later version. 14 | . 15 | This package is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | . 20 | You should have received a copy of the GNU General Public License 21 | along with this program. If not, see . 22 | . 23 | On Debian systems, the complete text of the GNU General 24 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 25 | 26 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_auto_clean: 16 | rm -rf debian/build 17 | 18 | override_dh_auto_configure: 19 | mkdir -p debian/build 20 | cd debian/build && meson --prefix=/usr ../.. 21 | 22 | override_dh_auto_build: 23 | cd debian/build && ninja -v 24 | 25 | override_dh_auto_test: 26 | cd debian/build && ninja test 27 | 28 | override_dh_auto_install: 29 | cd debian/build && DESTDIR=${CURDIR}/debian/com.github.bytepixie.snippetpixie ninja install 30 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /man/snippetpixie-placeholders.5: -------------------------------------------------------------------------------- 1 | .\" Generated by scdoc 1.11.0 2 | .\" Complete documentation for this program is not available as a GNU info page 3 | .ie \n(.g .ds Aq \(aq 4 | .el .ds Aq ' 5 | .nh 6 | .ad l 7 | .\" Begin generated content: 8 | .TH "snippetpixie-placeholders" "5" "2020-08-25" "" "Placeholders Format Manual" 9 | .P 10 | .SH NAME 11 | .P 12 | snippetpixie-placeholders - placeholders that can be used in snippetpixie abbreviation bodies 13 | .P 14 | .SH SYNTAX 15 | .P 16 | All placeholders are delimited (wrapped) by \fB$$\fR, with the placeholder name starting with an \fB@\fR symbol. 17 | .P 18 | For example, today's date can be inserted with \fB$$@date$$\fR. 19 | .P 20 | Some placeholders allow for extra arguments when \fB:\fR follows their name and that is followed by the argument. For example a format for a date, or the abbreviation for a snippet. Check the following descriptions for each placeholder for more details. 21 | .P 22 | To use \fB$$\fR in your snippet body, escape the second \fB$\fR with a backslash like so: \fB$\\$\fR. 23 | .P 24 | .SH @DATE & @TIME 25 | .P 26 | Quick Examples: 27 | .P 28 | .RS 4 29 | .ie n \{\ 30 | \h'-04'\(bu\h'+03'\c 31 | .\} 32 | .el \{\ 33 | .IP \(bu 4 34 | .\} 35 | Today's date with system format: \fB$$@date$$\fR 36 | .RE 37 | .RS 4 38 | .ie n \{\ 39 | \h'-04'\(bu\h'+03'\c 40 | .\} 41 | .el \{\ 42 | .IP \(bu 4 43 | .\} 44 | Today's date with custom format: \fB$$@date:%Y-%m-%d %H:%M:%S$$\fR 45 | .RE 46 | .RS 4 47 | .ie n \{\ 48 | \h'-04'\(bu\h'+03'\c 49 | .\} 50 | .el \{\ 51 | .IP \(bu 4 52 | .\} 53 | Tomorrow's date with system format: \fB$$@date@+1D$$\fR 54 | .RE 55 | .RS 4 56 | .ie n \{\ 57 | \h'-04'\(bu\h'+03'\c 58 | .\} 59 | .el \{\ 60 | .IP \(bu 4 61 | .\} 62 | Date 2 weeks from today with custom format: \fB$$@date@+2W:%x$$\fR 63 | .RE 64 | .RS 4 65 | .ie n \{\ 66 | \h'-04'\(bu\h'+03'\c 67 | .\} 68 | .el \{\ 69 | .IP \(bu 4 70 | .\} 71 | Time 3 hours from now: \fB$$@time@+3H$$\fR 72 | 73 | .RE 74 | .P 75 | \fB@time\fR is an alias for \fB@date\fR, with one important difference, the default output if no format specified is the default time format (\fB%X\fR) rather than default date format (\fB%x\fR). 76 | .P 77 | The optional format specified after \fB:\fR can take a format string as detailed in the GLib.DateTime.format function's docs, see https://valadoc.org/glib-2.0/GLib.DateTime.format.html. 78 | .P 79 | The optional date calculation starts with an \fB@\fR after the placeholder name, followed by a signed integer and unit. The unit types are as follows: 80 | .P 81 | .RS 4 82 | .ie n \{\ 83 | \h'-04'\(bu\h'+03'\c 84 | .\} 85 | .el \{\ 86 | .IP \(bu 4 87 | .\} 88 | \fBY:\fR Years 89 | .RE 90 | .RS 4 91 | .ie n \{\ 92 | \h'-04'\(bu\h'+03'\c 93 | .\} 94 | .el \{\ 95 | .IP \(bu 4 96 | .\} 97 | \fBM:\fR Months 98 | .RE 99 | .RS 4 100 | .ie n \{\ 101 | \h'-04'\(bu\h'+03'\c 102 | .\} 103 | .el \{\ 104 | .IP \(bu 4 105 | .\} 106 | \fBW:\fR Weeks 107 | .RE 108 | .RS 4 109 | .ie n \{\ 110 | \h'-04'\(bu\h'+03'\c 111 | .\} 112 | .el \{\ 113 | .IP \(bu 4 114 | .\} 115 | \fBD:\fR Days 116 | .RE 117 | .RS 4 118 | .ie n \{\ 119 | \h'-04'\(bu\h'+03'\c 120 | .\} 121 | .el \{\ 122 | .IP \(bu 4 123 | .\} 124 | \fBh:\fR Hours 125 | .RE 126 | .RS 4 127 | .ie n \{\ 128 | \h'-04'\(bu\h'+03'\c 129 | .\} 130 | .el \{\ 131 | .IP \(bu 4 132 | .\} 133 | \fBm:\fR Minutes 134 | .RE 135 | .RS 4 136 | .ie n \{\ 137 | \h'-04'\(bu\h'+03'\c 138 | .\} 139 | .el \{\ 140 | .IP \(bu 4 141 | .\} 142 | \fBs:\fR Seconds 143 | 144 | .RE 145 | .P 146 | You can apply more than one date calculation, for example \fB+2h+30m\fR adds 2 hours and 30 minutes to the current time. 147 | .P 148 | You can use both positive (\fB+\fR) and negative calculations, for example \fB-3D\fR takes 3 days from the current date. 149 | .P 150 | .SH @CLIPBOARD 151 | .P 152 | When \fB$$@clipboard$$\fR is part of a snippet's body, when its abbreviation is expanded the current text contents of the clipboard will replace the placeholder. 153 | .P 154 | .SH @SNIPPET 155 | .P 156 | You can have up to three levels of embedded snippets with the \fB@snippet\fR placeholder. 157 | .P 158 | The abbreviation for the snippet to be embedded is entered after \fB:\fR, for example \fB$$@snippet:sigg;$$\fR expands the snippet with abbreviation \fBsigg;\fR in place of the placeholder. 159 | .P 160 | .SH @CURSOR 161 | .P 162 | Adding \fB$$@cursor$$\fR to a snippet's body will put the cursor in its place after expansion instead of at the end of the expanded text. 163 | .P 164 | If \fB$$@cursor$$\fR is entered more than once in a snippet's body or via snippet embedding, then the last occurrence of the cursor placeholder wins. 165 | .P 166 | The @cursor placeholder does not work when using the shortcut to open the search and paste window rather than auto-expansion. 167 | .P 168 | .SH SEE ALSO 169 | .P 170 | snippetpixie(1) 171 | .P 172 | .SH AUTHORS 173 | .P 174 | Created and maintained by Ian Jones , supported by Byte Pixie Limited and other generous contributors of skills, time, and funds. Up to date sources can be found at https://github.com/bytepixie/snippetpixie, where bug reports and feature requests may also be submitted. 175 | -------------------------------------------------------------------------------- /man/snippetpixie-placeholders.5.scd: -------------------------------------------------------------------------------- 1 | snippetpixie-placeholders(5) "" "Placeholders Format Manual" 2 | 3 | # NAME 4 | 5 | snippetpixie-placeholders - placeholders that can be used in snippetpixie abbreviation bodies 6 | 7 | # SYNTAX 8 | 9 | All placeholders are delimited (wrapped) by *$$*, with the placeholder name starting with an *@* symbol. 10 | 11 | For example, today's date can be inserted with *$$@date$$*. 12 | 13 | Some placeholders allow for extra arguments when *:* follows their name and that is followed by the argument. For example a format for a date, or the abbreviation for a snippet. Check the following descriptions for each placeholder for more details. 14 | 15 | To use *$$* in your snippet body, escape the second *$* with a backslash like so: *$\\$*. 16 | 17 | # @DATE & @TIME 18 | 19 | Quick Examples: 20 | 21 | - Today's date with system format: *$$@date$$* 22 | - Today's date with custom format: *$$@date:%Y-%m-%d %H:%M:%S$$* 23 | - Tomorrow's date with system format: *$$@date@+1D$$* 24 | - Date 2 weeks from today with custom format: *$$@date@+2W:%x$$* 25 | - Time 3 hours from now: *$$@time@+3H$$* 26 | 27 | *@time* is an alias for *@date*, with one important difference, the default output if no format specified is the default time format (*%X*) rather than default date format (*%x*). 28 | 29 | The optional format specified after *:* can take a format string as detailed in the GLib.DateTime.format function's docs, see https://valadoc.org/glib-2.0/GLib.DateTime.format.html. 30 | 31 | The optional date calculation starts with an *@* after the placeholder name, followed by a signed integer and unit. The unit types are as follows: 32 | 33 | - *Y:* Years 34 | - *M:* Months 35 | - *W:* Weeks 36 | - *D:* Days 37 | - *h:* Hours 38 | - *m:* Minutes 39 | - *s:* Seconds 40 | 41 | You can apply more than one date calculation, for example *+2h+30m* adds 2 hours and 30 minutes to the current time. 42 | 43 | You can use both positive (*+*) and negative calculations, for example *-3D* takes 3 days from the current date. 44 | 45 | # @CLIPBOARD 46 | 47 | When *$$@clipboard$$* is part of a snippet's body, when its abbreviation is expanded the current text contents of the clipboard will replace the placeholder. 48 | 49 | # @SNIPPET 50 | 51 | You can have up to three levels of embedded snippets with the *@snippet* placeholder. 52 | 53 | The abbreviation for the snippet to be embedded is entered after *:*, for example *$$@snippet:sigg;$$* expands the snippet with abbreviation *sigg;* in place of the placeholder. 54 | 55 | # @CURSOR 56 | 57 | Adding *$$@cursor$$* to a snippet's body will put the cursor in its place after expansion instead of at the end of the expanded text. 58 | 59 | If *$$@cursor$$* is entered more than once in a snippet's body or via snippet embedding, then the last occurrence of the cursor placeholder wins. 60 | 61 | The @cursor placeholder does not work when using the shortcut to open the search and paste window rather than auto-expansion. 62 | 63 | # SEE ALSO 64 | 65 | snippetpixie(1) 66 | 67 | # AUTHORS 68 | 69 | Created and maintained by Ian Jones , supported by Byte Pixie Limited and other generous contributors of skills, time, and funds. Up to date sources can be found at https://github.com/bytepixie/snippetpixie, where bug reports and feature requests may also be submitted. 70 | -------------------------------------------------------------------------------- /man/snippetpixie.1: -------------------------------------------------------------------------------- 1 | .\" Generated by scdoc 1.11.0 2 | .\" Complete documentation for this program is not available as a GNU info page 3 | .ie \n(.g .ds Aq \(aq 4 | .el .ds Aq ' 5 | .nh 6 | .ad l 7 | .\" Begin generated content: 8 | .TH "snippetpixie" "1" "2020-08-29" 9 | .P 10 | .SH NAME 11 | .P 12 | snippetpixie - Your little expandable text snippet helper. 13 | .P 14 | .SH DESCRIPTION 15 | .P 16 | Save your often used text snippets and then expand them whenever you type their 17 | abbreviation. 18 | .P 19 | For example:- "spr`" expands to "Snippet Pixie rules!" 20 | .P 21 | .SH SYNOPSIS 22 | .P 23 | \fBcom.github.bytepixie.snippetpixie\fR [\fB--show\fR] 24 | .P 25 | \fBcom.github.bytepixie.snippetpixie\fR \fB--search-and-paste\fR 26 | .P 27 | \fBcom.github.bytepixie.snippetpixie\fR \fB--start\fR 28 | .P 29 | \fBcom.github.bytepixie.snippetpixie\fR \fB--stop\fR 30 | .P 31 | \fBcom.github.bytepixie.snippetpixie\fR \fB--autostart=\fR{\fBon\fR|\fBoff\fR|\fBstatus\fR} 32 | .P 33 | \fBcom.github.bytepixie.snippetpixie\fR \fB--status\fR 34 | .P 35 | \fBcom.github.bytepixie.snippetpixie\fR \fB-e\fR|\fB--export\fR \fIfilename\fR 36 | .P 37 | \fBcom.github.bytepixie.snippetpixie\fR \fB-i\fR|\fB--import\fR \fIfilename\fR [\fB--force\fR] 38 | .P 39 | \fBcom.github.bytepixie.snippetpixie\fR \fB--version\fR 40 | .P 41 | \fBcom.github.bytepixie.snippetpixie\fR \fB-h\fR|\fB--help\fR 42 | .P 43 | .SH OPTIONS 44 | .P 45 | \fB--show\fR 46 | .RS 4 47 | Show Snippet Pixie's window (default action). 48 | .P 49 | .RE 50 | \fB--search-and-paste\fR 51 | .RS 4 52 | Show Snippet Pixie's quick search and paste window. 53 | .P 54 | A default shortcut of \fBCtrl\fR+\fB`\fR for using the search and replace window is installed on first run. 55 | .P 56 | You should change this to your preferred shortcut via Snippet Pixie's preferences menu or your operating system's settings UI or files. 57 | .P 58 | .RE 59 | \fB--start\fR 60 | .RS 4 61 | Start with no window. 62 | .P 63 | .RE 64 | \fB--stop\fR 65 | .RS 4 66 | Fully quit the application, including the background process. 67 | .P 68 | .RE 69 | \fB--autostart=\fR{\fBon\fR|\fBoff\fR|\fBstatus\fR} 70 | .RS 4 71 | Turn auto start of Snippet Pixie on login, on, off, or show status of 72 | setting. 73 | .P 74 | .RE 75 | \fB--status\fR 76 | .RS 4 77 | Shows status of the application, exits with status 0 if running, 1 if not. 78 | .P 79 | .RE 80 | \fB-e\fR, \fB--export=\fR\fIfilename\fR 81 | .RS 4 82 | Export snippets to file. 83 | .P 84 | .RE 85 | \fB-i\fR, \fB--import=\fR\fIfilename\fR 86 | .RS 4 87 | Import snippets from file, skips snippets where abbreviation already exists. 88 | .P 89 | .RE 90 | \fB--force\fR 91 | .RS 4 92 | If used in conjunction with import, existing snippets with same abbreviation 93 | are updated. 94 | .P 95 | .RE 96 | \fB--version\fR 97 | .RS 4 98 | Display version number. 99 | .P 100 | .RE 101 | \fB-h\fR, \fB--help\fR 102 | .RS 4 103 | Display help. 104 | .P 105 | .RE 106 | .SH NOTES 107 | .P 108 | Abbreviations should be short, easy to remember and hard to trigger accidentally. 109 | .P 110 | It helps if an abbreviation includes either a key word from the fully expanded text, or an initialization or acronym that is part of it. 111 | .P 112 | For example, if you regularly wrote "Snippet Pixie" 😉 you might use "\fBsp\fR". 113 | .P 114 | However, there are a lot of words that include the letter combination "\fBsp\fR", (see https://www.wordfind.com/contains/sp/), so there's a reasonably high chance that Snippet Pixie would expand that abbreviation when you didn't want it to. 115 | .P 116 | So instead it's common to add a "\fBtrigger character\fR" to the end of the abbreviation. This is commonly a character that isn't found in normal sentences such as "\fB`\fR" or "\fB~\fR" that is easy to find on your keyboard. Often just appending a space is enough, or doubling up characters. 117 | .P 118 | I personally use "\fB`\fR" (commonly known as grav or backtick) a lot as it's a single keystroke on my British layout keyboard just below my Escape key. So for me "\fBsp`\fR" is a natural abbreviation for "\fBSnippet Pixie\fR". 119 | .P 120 | However, I could see using "\fBsp \fR" or "\fBspp\fR" for the abbreviation. 121 | .P 122 | If you do use a trailing space as your trigger character you might find it useful to include a trailing space in the text that is expanded, e.g. "\fBsp \fR" expands to "\fBSnippet Pixie \fR" as it's more natural when typing. 123 | .P 124 | .SH LIMITATIONS 125 | .P 126 | .RS 4 127 | .ie n \{\ 128 | \h'-04'\(bu\h'+03'\c 129 | .\} 130 | .el \{\ 131 | .IP \(bu 4 132 | .\} 133 | Auto-expansion only works on accessible applications, use the shortcut to open the search and paste window for other applications such as browsers and Electron based apps. 134 | .RE 135 | .RS 4 136 | .ie n \{\ 137 | \h'-04'\(bu\h'+03'\c 138 | .\} 139 | .el \{\ 140 | .IP \(bu 4 141 | .\} 142 | Auto-expansion does not work in terminals, but the shortcut method works with terminals that accept \fBCtrl\fR+\fBv\fR for paste such as the elementary OS terminal. 143 | .RE 144 | .RS 4 145 | .ie n \{\ 146 | \h'-04'\(bu\h'+03'\c 147 | .\} 148 | .el \{\ 149 | .IP \(bu 4 150 | .\} 151 | The cursor placeholder is not supported when using the shortcut method rather than auto-expansion. 152 | 153 | .RE 154 | .P 155 | .SH SEE ALSO 156 | .P 157 | snippetpixie-placeholders(5) 158 | .P 159 | .SH AUTHORS 160 | .P 161 | Created and maintained by Ian Jones , supported by Byte Pixie Limited and other generous contributors of skills, time, and funds. Up to date sources can be found at https://github.com/bytepixie/snippetpixie, where bug reports and feature requests may also be submitted. 162 | -------------------------------------------------------------------------------- /man/snippetpixie.1.scd: -------------------------------------------------------------------------------- 1 | snippetpixie(1) 2 | 3 | # NAME 4 | 5 | snippetpixie - Your little expandable text snippet helper. 6 | 7 | # DESCRIPTION 8 | 9 | Save your often used text snippets and then expand them whenever you type their 10 | abbreviation. 11 | 12 | For example:- "spr`" expands to "Snippet Pixie rules!" 13 | 14 | # SYNOPSIS 15 | 16 | *com.github.bytepixie.snippetpixie* [*--show*] 17 | 18 | *com.github.bytepixie.snippetpixie* *--search-and-paste* 19 | 20 | *com.github.bytepixie.snippetpixie* *--start* 21 | 22 | *com.github.bytepixie.snippetpixie* *--stop* 23 | 24 | *com.github.bytepixie.snippetpixie* *--autostart=*{*on*|*off*|*status*} 25 | 26 | *com.github.bytepixie.snippetpixie* *--status* 27 | 28 | *com.github.bytepixie.snippetpixie* *-e*|*--export* _filename_ 29 | 30 | *com.github.bytepixie.snippetpixie* *-i*|*--import* _filename_ [*--force*] 31 | 32 | *com.github.bytepixie.snippetpixie* *--version* 33 | 34 | *com.github.bytepixie.snippetpixie* *-h*|*--help* 35 | 36 | # OPTIONS 37 | 38 | *--show* 39 | Show Snippet Pixie's window (default action). 40 | 41 | *--search-and-paste* 42 | Show Snippet Pixie's quick search and paste window. 43 | 44 | A default shortcut of *Ctrl*+*`* for using the search and replace window is installed on first run. 45 | 46 | You should change this to your preferred shortcut via Snippet Pixie's preferences menu or your operating system's settings UI or files. 47 | 48 | *--start* 49 | Start with no window. 50 | 51 | *--stop* 52 | Fully quit the application, including the background process. 53 | 54 | *--autostart=*{*on*|*off*|*status*} 55 | Turn auto start of Snippet Pixie on login, on, off, or show status of 56 | setting. 57 | 58 | *--status* 59 | Shows status of the application, exits with status 0 if running, 1 if not. 60 | 61 | *-e*, *--export=*_filename_ 62 | Export snippets to file. 63 | 64 | *-i*, *--import=*_filename_ 65 | Import snippets from file, skips snippets where abbreviation already exists. 66 | 67 | *--force* 68 | If used in conjunction with import, existing snippets with same abbreviation 69 | are updated. 70 | 71 | *--version* 72 | Display version number. 73 | 74 | *-h*, *--help* 75 | Display help. 76 | 77 | # NOTES 78 | 79 | Abbreviations should be short, easy to remember and hard to trigger accidentally. 80 | 81 | It helps if an abbreviation includes either a key word from the fully expanded text, or an initialization or acronym that is part of it. 82 | 83 | For example, if you regularly wrote "Snippet Pixie" 😉 you might use "*sp*". 84 | 85 | However, there are a lot of words that include the letter combination "*sp*", (see https://www.wordfind.com/contains/sp/), so there's a reasonably high chance that Snippet Pixie would expand that abbreviation when you didn't want it to. 86 | 87 | So instead it's common to add a "*trigger character*" to the end of the abbreviation. This is commonly a character that isn't found in normal sentences such as "*`*" or "*~*" that is easy to find on your keyboard. Often just appending a space is enough, or doubling up characters. 88 | 89 | I personally use "*`*" (commonly known as grav or backtick) a lot as it's a single keystroke on my British layout keyboard just below my Escape key. So for me "*sp`*" is a natural abbreviation for "*Snippet Pixie*". 90 | 91 | However, I could see using "*sp *" or "*spp*" for the abbreviation. 92 | 93 | If you do use a trailing space as your trigger character you might find it useful to include a trailing space in the text that is expanded, e.g. "*sp *" expands to "*Snippet Pixie *" as it's more natural when typing. 94 | 95 | # LIMITATIONS 96 | 97 | - Auto-expansion only works on accessible applications, use the shortcut to open the search and paste window for other applications such as browsers and Electron based apps. 98 | - Auto-expansion does not work in terminals, but the shortcut method works with terminals that accept *Ctrl*+*v* for paste such as the elementary OS terminal. 99 | - The cursor placeholder is not supported when using the shortcut method rather than auto-expansion. 100 | 101 | # SEE ALSO 102 | 103 | snippetpixie-placeholders(5) 104 | 105 | # AUTHORS 106 | 107 | Created and maintained by Ian Jones , supported by Byte Pixie Limited and other generous contributors of skills, time, and funds. Up to date sources can be found at https://github.com/bytepixie/snippetpixie, where bug reports and feature requests may also be submitted. 108 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('com.github.bytepixie.snippetpixie', 'vala', 'c') 2 | 3 | gnome = import('gnome') 4 | i18n = import('i18n') 5 | 6 | add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c') 7 | 8 | asresources = gnome.compile_resources( 9 | 'as-resources', 'data/' + meson.project_name() + '.gresource.xml', 10 | source_dir: 'data', 11 | c_name: 'as' 12 | ) 13 | 14 | executable( 15 | meson.project_name(), 16 | 'src/Application.vala', 17 | 'src/Snippet.vala', 18 | 'src/SnippetsManager.vala', 19 | 'src/Utils.vala', 20 | 'src/Settings/CustomShortcutSettings.vala', 21 | 'src/Settings/Shortcut.vala', 22 | 'src/Widgets/FramedTextView.vala', 23 | 'src/Widgets/MainWindowHeader.vala', 24 | 'src/Widgets/SearchAndPasteList.vala', 25 | 'src/Widgets/SearchAndPasteListRow.vala', 26 | 'src/Widgets/ShortcutEntry.vala', 27 | 'src/Widgets/SnippetsList.vala', 28 | 'src/Widgets/SnippetsListItem.vala', 29 | 'src/Widgets/ViewStack.vala', 30 | 'src/Widgets/WelcomeView.vala', 31 | 'src/Windows/MainWindow.vala', 32 | 'src/Windows/SearchAndPasteWindow.vala', 33 | asresources, 34 | dependencies: [ 35 | dependency('atspi-2', version: '>=2.0'), 36 | dependency('gdk-x11-3.0'), 37 | dependency('gee-0.8'), 38 | dependency('glib-2.0'), 39 | dependency('gobject-2.0'), 40 | dependency('granite', version: '>=5.4'), 41 | dependency('gtk+-3.0'), 42 | dependency('ibus-1.0'), 43 | dependency('json-glib-1.0'), 44 | dependency('sqlite3'), 45 | dependency('xtst'), 46 | dependency('x11', version: '>=1.0'), 47 | meson.get_compiler('c').find_library('m', required : false) 48 | ], 49 | install: true 50 | ) 51 | subdir('data') 52 | subdir('po') 53 | 54 | meson.add_install_script('meson/post_install.py') 55 | 56 | install_man('man/snippetpixie.1') 57 | install_man('man/snippetpixie-placeholders.5') 58 | -------------------------------------------------------------------------------- /meson/post_install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import subprocess 5 | 6 | schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') 7 | 8 | if not os.environ.get('DESTDIR'): 9 | print('Compiling gsettings schemas...') 10 | subprocess.call(['glib-compile-schemas', schemadir]) 11 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | fr 2 | nl 3 | -------------------------------------------------------------------------------- /po/POTFILES: -------------------------------------------------------------------------------- 1 | src/Settings/CustomShortcutSettings.vala 2 | src/Settings/Shortcut.vala 3 | src/Widgets/FramedTextView.vala 4 | src/Widgets/MainWindowHeader.vala 5 | src/Widgets/SearchAndPasteList.vala 6 | src/Widgets/SearchAndPasteListRow.vala 7 | src/Widgets/ShortcutEntry.vala 8 | src/Widgets/SnippetsList.vala 9 | src/Widgets/SnippetsListItem.vala 10 | src/Widgets/ViewStack.vala 11 | src/Widgets/WelcomeView.vala 12 | src/Windows/MainWindow.vala 13 | src/Windows/SearchAndPasteWindow.vala 14 | src/Application.vala 15 | src/Snippet.vala 16 | src/SnippetsManager.vala 17 | src/Utils.vala 18 | -------------------------------------------------------------------------------- /po/com.github.bytepixie.snippetpixie.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the com.github.bytepixie.snippetpixie package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: com.github.bytepixie.snippetpixie\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2021-08-19 09:43+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/Settings/Shortcut.vala:30 21 | msgid "Disabled" 22 | msgstr "" 23 | 24 | #: src/Settings/Shortcut.vala:39 25 | msgid "Ctrl" 26 | msgstr "" 27 | 28 | #: src/Widgets/MainWindowHeader.vala:32 src/Widgets/WelcomeView.vala:23 29 | msgid "Add Snippet" 30 | msgstr "" 31 | 32 | #: src/Widgets/MainWindowHeader.vala:45 33 | msgid "Auto start on login" 34 | msgstr "" 35 | 36 | #: src/Widgets/MainWindowHeader.vala:48 37 | msgid "Auto expand Snippets" 38 | msgstr "" 39 | 40 | #: src/Widgets/MainWindowHeader.vala:51 src/Widgets/MainWindowHeader.vala:86 41 | msgid "Shortcut" 42 | msgstr "" 43 | 44 | #: src/Widgets/MainWindowHeader.vala:54 src/Widgets/MainWindowHeader.vala:58 45 | msgid "Import Snippets…" 46 | msgstr "" 47 | 48 | #: src/Widgets/MainWindowHeader.vala:61 src/Widgets/MainWindowHeader.vala:65 49 | msgid "Export Snippets…" 50 | msgstr "" 51 | 52 | #: src/Widgets/MainWindowHeader.vala:68 53 | msgid "About…" 54 | msgstr "" 55 | 56 | #: src/Widgets/MainWindowHeader.vala:91 57 | msgid "Search selected text" 58 | msgstr "" 59 | 60 | #: src/Widgets/MainWindowHeader.vala:94 61 | msgid "Focus search box" 62 | msgstr "" 63 | 64 | #: src/Widgets/MainWindowHeader.vala:108 65 | msgid "Shortcut:" 66 | msgstr "" 67 | 68 | #: src/Widgets/MainWindowHeader.vala:154 69 | msgid "Search Snippets" 70 | msgstr "" 71 | 72 | #: src/Widgets/MainWindowHeader.vala:157 73 | #: src/Windows/SearchAndPasteWindow.vala:56 74 | msgid "Search Snippets…" 75 | msgstr "" 76 | 77 | #: src/Widgets/ViewStack.vala:54 78 | msgid "Abbreviation" 79 | msgstr "" 80 | 81 | #: src/Widgets/ViewStack.vala:63 82 | msgid "Body" 83 | msgstr "" 84 | 85 | #: src/Widgets/ViewStack.vala:72 86 | msgid "Remove Snippet" 87 | msgstr "" 88 | 89 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 90 | #: src/Windows/SearchAndPasteWindow.vala:100 91 | msgid "No Snippets Found" 92 | msgstr "" 93 | 94 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 95 | msgid "Please try entering a different search term." 96 | msgstr "" 97 | 98 | #: src/Widgets/WelcomeView.vala:22 99 | msgid "No snippets found." 100 | msgstr "" 101 | 102 | #: src/Widgets/WelcomeView.vala:23 103 | msgid "Create your first snippet." 104 | msgstr "" 105 | 106 | #: src/Widgets/WelcomeView.vala:24 src/Windows/MainWindow.vala:155 107 | msgid "Import Snippets" 108 | msgstr "" 109 | 110 | #: src/Widgets/WelcomeView.vala:24 111 | msgid "Import previously exported snippets." 112 | msgstr "" 113 | 114 | #: src/Widgets/WelcomeView.vala:25 115 | msgid "Quick Start Guide" 116 | msgstr "" 117 | 118 | #: src/Widgets/WelcomeView.vala:25 119 | msgid "Learn the basics of how to use Snippet Pixie." 120 | msgstr "" 121 | 122 | #: src/Windows/MainWindow.vala:155 123 | msgid "Import" 124 | msgstr "" 125 | 126 | #: src/Windows/MainWindow.vala:162 127 | msgid "Overwrite Duplicate Snippets?" 128 | msgstr "" 129 | 130 | #: src/Windows/MainWindow.vala:162 131 | msgid "" 132 | "If any of the snippet abbreviations about to be imported already exist, do " 133 | "you want to skip importing them or update the existing snippet?" 134 | msgstr "" 135 | 136 | #: src/Windows/MainWindow.vala:163 137 | msgid "Update Existing" 138 | msgstr "" 139 | 140 | #: src/Windows/MainWindow.vala:164 141 | msgid "Cancel" 142 | msgstr "" 143 | 144 | #: src/Windows/MainWindow.vala:165 145 | msgid "Skip Duplicates" 146 | msgstr "" 147 | 148 | #: src/Windows/MainWindow.vala:192 149 | msgid "Imported Snippets" 150 | msgstr "" 151 | 152 | #: src/Windows/MainWindow.vala:192 153 | msgid "Your snippets were successfully imported." 154 | msgstr "" 155 | 156 | #: src/Windows/MainWindow.vala:196 157 | msgid "Failed to import selected file" 158 | msgstr "" 159 | 160 | #: src/Windows/MainWindow.vala:196 161 | msgid "" 162 | "Snippet Pixie can currently only import the JSON format files that it also " 163 | "exports." 164 | msgstr "" 165 | 166 | #: src/Windows/MainWindow.vala:204 167 | msgid "Export Snippets" 168 | msgstr "" 169 | 170 | #: src/Windows/MainWindow.vala:212 171 | msgid "Exported Snippets" 172 | msgstr "" 173 | 174 | #: src/Windows/MainWindow.vala:212 175 | msgid "Your snippets were successfully exported." 176 | msgstr "" 177 | 178 | #: src/Windows/MainWindow.vala:216 179 | msgid "Failed to export to file" 180 | msgstr "" 181 | 182 | #: src/Windows/MainWindow.vala:216 183 | msgid "Something went wrong, sorry." 184 | msgstr "" 185 | 186 | #: src/Windows/MainWindow.vala:236 187 | msgid "" 188 | "@NathanBnm https://github.com/NathanBnm/\n" 189 | " @Vistaus https://github.com/Vistaus/" 190 | msgstr "" 191 | 192 | #: src/Windows/MainWindow.vala:240 193 | msgid "Copyright © Byte Pixie Limited" 194 | msgstr "" 195 | 196 | #: src/Windows/SearchAndPasteWindow.vala:100 197 | msgid "Please add some snippets!" 198 | msgstr "" 199 | 200 | #: src/Application.vala:652 201 | msgid "snippet" 202 | msgstr "" 203 | 204 | #: src/Application.vala:694 src/Application.vala:812 205 | msgid "date" 206 | msgstr "" 207 | 208 | #: src/Application.vala:694 src/Application.vala:816 209 | msgid "time" 210 | msgstr "" 211 | 212 | #: src/Application.vala:728 213 | #, c-format 214 | msgid "" 215 | "Date adjustment does not seem to have a positive or negative integer in " 216 | "placeholder '%1$s'." 217 | msgstr "" 218 | 219 | #: src/Application.vala:743 220 | #, c-format 221 | msgid "" 222 | "Date adjustment number %1$d does not seem to start with a positive or " 223 | "negative integer in placeholder '%2$s'." 224 | msgstr "" 225 | 226 | #: src/Application.vala:774 227 | #, c-format 228 | msgid "" 229 | "Date adjustment number %1$d does not seem to end with either 'Y', 'M', 'W', " 230 | "'D', 'h', 'm' or 's' in placeholder '%2$s'." 231 | msgstr "" 232 | 233 | #: src/Application.vala:782 src/Application.vala:795 234 | #, c-format 235 | msgid "Oops, date format '%1$s' could not be parsed." 236 | msgstr "" 237 | 238 | #: src/Application.vala:824 239 | msgid "clipboard" 240 | msgstr "" 241 | 242 | #: src/Application.vala:860 243 | msgid "cursor" 244 | msgstr "" 245 | 246 | #: src/Application.vala:1203 247 | msgid "Show Snippet Pixie's window (default action)" 248 | msgstr "" 249 | 250 | #: src/Application.vala:1204 251 | msgid "Show Snippet Pixie's quick search and paste window" 252 | msgstr "" 253 | 254 | #: src/Application.vala:1205 255 | msgid "Start with no window" 256 | msgstr "" 257 | 258 | #: src/Application.vala:1206 259 | msgid "Fully quit the application, including the background process" 260 | msgstr "" 261 | 262 | #: src/Application.vala:1207 263 | msgid "" 264 | "Turn auto start of Snippet Pixie on login, on, off, or show status of setting" 265 | msgstr "" 266 | 267 | #: src/Application.vala:1208 268 | msgid "" 269 | "Shows status of the application, exits with status 0 if running, 1 if not" 270 | msgstr "" 271 | 272 | #: src/Application.vala:1209 273 | msgid "Export snippets to file" 274 | msgstr "" 275 | 276 | #: src/Application.vala:1210 277 | msgid "" 278 | "Import snippets from file, skips snippets where abbreviation already exists" 279 | msgstr "" 280 | 281 | #: src/Application.vala:1210 282 | msgid "filename" 283 | msgstr "" 284 | 285 | #: src/Application.vala:1211 286 | msgid "" 287 | "If used in conjunction with import, existing snippets with same abbreviation " 288 | "are updated" 289 | msgstr "" 290 | 291 | #: src/Application.vala:1212 292 | msgid "Display version number" 293 | msgstr "" 294 | 295 | #: src/Application.vala:1213 296 | msgid "Display this help" 297 | msgstr "" 298 | 299 | #: src/Application.vala:1232 300 | #, c-format 301 | msgid "error: %s\n" 302 | msgstr "" 303 | 304 | #: src/Application.vala:1233 305 | #, c-format 306 | msgid "Run '%s --help' to see a full list of available command line options.\n" 307 | msgstr "" 308 | 309 | #: src/Application.vala:1249 310 | msgid "Quitting…\n" 311 | msgstr "" 312 | 313 | #: src/Application.vala:1257 314 | msgid "Running.\n" 315 | msgstr "" 316 | 317 | #: src/Application.vala:1260 318 | msgid "Not Running.\n" 319 | msgstr "" 320 | 321 | #: src/Application.vala:1285 322 | #, c-format 323 | msgid "Invalid autostart value \"%s\".\n" 324 | msgstr "" 325 | 326 | #: src/Application.vala:1330 327 | msgid "Cannot run without threads.\n" 328 | msgstr "" 329 | 330 | #: src/Snippet.vala:22 331 | msgid "new" 332 | msgstr "" 333 | 334 | #: src/Snippet.vala:23 335 | msgid "Something to be replaced" 336 | msgstr "" 337 | -------------------------------------------------------------------------------- /po/extra/LINGUAS: -------------------------------------------------------------------------------- 1 | fr 2 | nl 3 | -------------------------------------------------------------------------------- /po/extra/POTFILES: -------------------------------------------------------------------------------- 1 | data/com.github.bytepixie.snippetpixie.appdata.xml.in 2 | data/com.github.bytepixie.snippetpixie.desktop.in 3 | -------------------------------------------------------------------------------- /po/extra/extra.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the extra package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: extra\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2021-08-19 09:43+0100\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:7 21 | #: data/com.github.bytepixie.snippetpixie.desktop.in:3 22 | msgid "Snippet Pixie" 23 | msgstr "" 24 | 25 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:8 26 | #: data/com.github.bytepixie.snippetpixie.desktop.in:4 27 | msgid "Your little expandable text snippet helper" 28 | msgstr "" 29 | 30 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:10 31 | msgid "" 32 | "Save your often used text snippets and then expand them whenever you type " 33 | "their abbreviation." 34 | msgstr "" 35 | 36 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:11 37 | msgid "For example:- \"spr`\" expands to \"Snippet Pixie rules!\"" 38 | msgstr "" 39 | 40 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:12 41 | msgid "" 42 | "For non-accessible applications such as browsers and Electron apps, there's " 43 | "a shortcut (default is Ctrl+`) for opening a search window that pastes the " 44 | "selected snippet." 45 | msgstr "" 46 | 47 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:13 48 | msgid "Supports placeholders:-" 49 | msgstr "" 50 | 51 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:15 52 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:132 53 | msgid "" 54 | "Date/Time: Insert the current or calculated date/time with configurable " 55 | "format." 56 | msgstr "" 57 | 58 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:16 59 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:133 60 | msgid "Clipboard: Insert the text contents of the clipboard." 61 | msgstr "" 62 | 63 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:17 64 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:134 65 | msgid "Snippets: Insert snippets in your snippets!" 66 | msgstr "" 67 | 68 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:18 69 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:135 70 | msgid "" 71 | "Cursor: Set where the cursor should end up after the snippet has expanded." 72 | msgstr "" 73 | 74 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:20 75 | msgid "" 76 | "All placeholders are delimited (wrapped) by \"$$\", with the placeholder " 77 | "name starting with an \"@\" symbol." 78 | msgstr "" 79 | 80 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:21 81 | msgid "For example, today's date can be inserted with \"$$@date$$\"." 82 | msgstr "" 83 | 84 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:30 85 | msgid "" 86 | "Enable Shift-Return to Shift-Ctrl-V into terminal emulators from the Search " 87 | "and Paste window." 88 | msgstr "" 89 | 90 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:37 91 | msgid "Fixed search box showing when there are no Snippets to search." 92 | msgstr "" 93 | 94 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:38 95 | msgid "Updated Dutch translations. Thanks @Vistaus on GitHub! 🇳🇱" 96 | msgstr "" 97 | 98 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:45 99 | msgid "Added search of Snippets in main window." 100 | msgstr "" 101 | 102 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:46 103 | msgid "Added last used Snippets shown first in Search and Paste window." 104 | msgstr "" 105 | 106 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:47 107 | msgid "Added shortcuts for main window actions such as Add Snippet (Ctrl+n)." 108 | msgstr "" 109 | 110 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:48 111 | msgid "Added support for system Light and Dark appearance preference." 112 | msgstr "" 113 | 114 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:49 115 | msgid "Improved theming of window controls to be more consistent with system." 116 | msgstr "" 117 | 118 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:56 119 | msgid "Added Dutch translations. Huge thanks to @Vistaus on GitHub! 🇳🇱" 120 | msgstr "" 121 | 122 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:57 123 | msgid "Fixed occasional performance issues when auto-expand turned on." 124 | msgstr "" 125 | 126 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:58 127 | msgid "Fixed incorrect shortcut command being saved when binary file renamed." 128 | msgstr "" 129 | 130 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:59 131 | msgid "Fixed visibility of Search and Paste entry text in some circumstances." 132 | msgstr "" 133 | 134 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:66 135 | msgid "Added Search and Paste window, opened with shortcut Ctrl+` by default." 136 | msgstr "" 137 | 138 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:67 139 | msgid "" 140 | "Added \"Auto expand snippets\" checkbox to preferences menu for enabling/" 141 | "disabling snippet expansion while typing in accessible apps." 142 | msgstr "" 143 | 144 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:68 145 | msgid "Added ability to change Search and Paste shortcut in preferences menu." 146 | msgstr "" 147 | 148 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:69 149 | msgid "" 150 | "Added preference for whether text selected before using shortcut is used for " 151 | "initial search." 152 | msgstr "" 153 | 154 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:70 155 | msgid "" 156 | "Added option to focus search box when using the search and paste shortcut." 157 | msgstr "" 158 | 159 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:71 160 | msgid "Fixed support for Wayland." 161 | msgstr "" 162 | 163 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:72 164 | msgid "" 165 | "Removed auto expanding of snippets in non-accessible applications such as " 166 | "browsers and electron apps (use shortcut for search and paste window " 167 | "instead)." 168 | msgstr "" 169 | 170 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:79 171 | msgid "Fixed Snippet Pixie stopping Super+[other-key] from working." 172 | msgstr "" 173 | 174 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:86 175 | msgid "Improved speed of abbreviation expansion." 176 | msgstr "" 177 | 178 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:87 179 | msgid "Fixed abbreviations randomly stopping to expand." 180 | msgstr "" 181 | 182 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:88 183 | msgid "Fixed reliability of abbreviations being recognised." 184 | msgstr "" 185 | 186 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:89 187 | msgid "Fixed abbreviations sometimes expanding with clipboard's contents." 188 | msgstr "" 189 | 190 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:96 191 | msgid "Fixed abbreviations sometimes not expanding." 192 | msgstr "" 193 | 194 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:103 195 | msgid "Vastly improved compatibility with a wide variety of applications." 196 | msgstr "" 197 | 198 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:104 199 | msgid "Now works with Chrome, Chromium and Electron apps." 200 | msgstr "" 201 | 202 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:105 203 | msgid "Much faster abbreviation detection." 204 | msgstr "" 205 | 206 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:106 207 | msgid "Much nicer to the system in general." 208 | msgstr "" 209 | 210 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:107 211 | msgid "" 212 | "Alas, recent Firefox versions no longer compatible, hope to support in the " 213 | "future." 214 | msgstr "" 215 | 216 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:108 217 | msgid "" 218 | "A few terminal emulators blacklisted to avoid problems, hope to support in " 219 | "the future." 220 | msgstr "" 221 | 222 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:115 223 | msgid "Added man pages for snippetpixie and snippetpixie-placeholders." 224 | msgstr "" 225 | 226 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:116 227 | msgid "Minor fixes for compile time warnings." 228 | msgstr "" 229 | 230 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:123 231 | msgid "Various fixes for snap." 232 | msgstr "" 233 | 234 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:124 235 | msgid "" 236 | "Updated credits to use GitHub handles and add Nathan as a translator (long " 237 | "overdue)!" 238 | msgstr "" 239 | 240 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:130 241 | msgid "Added support for placeholders." 242 | msgstr "" 243 | 244 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:142 245 | msgid "Improved active window/control detection when switching via Alt-Tab." 246 | msgstr "" 247 | 248 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:149 249 | msgid "Improved performance, compatibility, and stability." 250 | msgstr "" 251 | 252 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:150 253 | msgid "Added French translations. Huge thanks to @NathanBnm on GitHub! 🇨🇵️" 254 | msgstr "" 255 | 256 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:157 257 | msgid "Added ability to export snippets to a JSON file via menu button." 258 | msgstr "" 259 | 260 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:158 261 | msgid "" 262 | "Added ability to export snippets to a JSON file via `--export` or `-e` CLI " 263 | "options." 264 | msgstr "" 265 | 266 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:159 267 | msgid "" 268 | "Added ability to import snippets from an exported JSON file via menu button " 269 | "or welcome screen. Shocking! 😱" 270 | msgstr "" 271 | 272 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:160 273 | msgid "" 274 | "Added ability to import snippets from an exported JSON file via `--import` " 275 | "or `-i` CLI options. Bet you didn't see that coming! 😉" 276 | msgstr "" 277 | 278 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:167 279 | msgid "1.0 Release!" 280 | msgstr "" 281 | 282 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:168 283 | msgid "Added Snippet Pixie to login startup items by default." 284 | msgstr "" 285 | 286 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:169 287 | msgid "" 288 | "Added --autostart={on|off|status} option to CLI for turning autostart on, " 289 | "off, or getting settings status." 290 | msgstr "" 291 | 292 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:170 293 | msgid "Changed body field to select all text when tabbed into." 294 | msgstr "" 295 | 296 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:177 297 | msgid "" 298 | "Fixed crash when an application with a large number of controls was " 299 | "activated." 300 | msgstr "" 301 | 302 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:178 303 | msgid "" 304 | "Fixed problem with snippets sometimes not expanding when returning to an " 305 | "application." 306 | msgstr "" 307 | 308 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:179 309 | msgid "Added a splash of colour to the window header." 310 | msgstr "" 311 | 312 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:180 313 | msgid "Added a new application icon." 314 | msgstr "" 315 | 316 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:186 317 | msgid "Initial pre-release." 318 | msgstr "" 319 | 320 | #: data/com.github.bytepixie.snippetpixie.appdata.xml.in:236 321 | msgid "Byte Pixie" 322 | msgstr "" 323 | 324 | #: data/com.github.bytepixie.snippetpixie.desktop.in:6 325 | msgid "com.github.bytepixie.snippetpixie" 326 | msgstr "" 327 | 328 | #: data/com.github.bytepixie.snippetpixie.desktop.in:7 329 | msgid "expand;text;snippet;" 330 | msgstr "" 331 | 332 | #: data/com.github.bytepixie.snippetpixie.desktop.in:15 333 | msgid "Start Snippet Pixie" 334 | msgstr "" 335 | 336 | #: data/com.github.bytepixie.snippetpixie.desktop.in:19 337 | msgid "Stop Snippet Pixie" 338 | msgstr "" 339 | -------------------------------------------------------------------------------- /po/extra/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext('extra', 2 | args: [ 3 | '--directory=' + meson.source_root(), 4 | '--from-code=UTF-8' 5 | ], 6 | install: false 7 | ) -------------------------------------------------------------------------------- /po/fr.po: -------------------------------------------------------------------------------- 1 | # French translations for com.github.bytepixie.snippetpixie package. 2 | # Copyright (C) 2019 THE com.github.bytepixie.snippetpixie'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the com.github.bytepixie.snippetpixie package. 4 | # NathanBnm, 2019. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: com.github.bytepixie.snippetpixie\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2021-08-19 09:43+0100\n" 11 | "PO-Revision-Date: 2019-02-06 22:35+0100\n" 12 | "Last-Translator: NathanBnm\n" 13 | "Language-Team: Français\n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 19 | 20 | #: src/Settings/Shortcut.vala:30 21 | msgid "Disabled" 22 | msgstr "" 23 | 24 | #: src/Settings/Shortcut.vala:39 25 | msgid "Ctrl" 26 | msgstr "" 27 | 28 | #: src/Widgets/MainWindowHeader.vala:32 src/Widgets/WelcomeView.vala:23 29 | msgid "Add Snippet" 30 | msgstr "Ajouter un raccourci" 31 | 32 | #: src/Widgets/MainWindowHeader.vala:45 33 | msgid "Auto start on login" 34 | msgstr "" 35 | 36 | #: src/Widgets/MainWindowHeader.vala:48 37 | #, fuzzy 38 | msgid "Auto expand Snippets" 39 | msgstr "Ajouter un raccourci" 40 | 41 | #: src/Widgets/MainWindowHeader.vala:51 src/Widgets/MainWindowHeader.vala:86 42 | msgid "Shortcut" 43 | msgstr "" 44 | 45 | #: src/Widgets/MainWindowHeader.vala:54 src/Widgets/MainWindowHeader.vala:58 46 | #, fuzzy 47 | msgid "Import Snippets…" 48 | msgstr "Importer des raccourcis…" 49 | 50 | #: src/Widgets/MainWindowHeader.vala:61 src/Widgets/MainWindowHeader.vala:65 51 | #, fuzzy 52 | msgid "Export Snippets…" 53 | msgstr "Exporter des raccourcis…" 54 | 55 | #: src/Widgets/MainWindowHeader.vala:68 56 | msgid "About…" 57 | msgstr "À propos…" 58 | 59 | #: src/Widgets/MainWindowHeader.vala:91 60 | msgid "Search selected text" 61 | msgstr "" 62 | 63 | #: src/Widgets/MainWindowHeader.vala:94 64 | msgid "Focus search box" 65 | msgstr "" 66 | 67 | #: src/Widgets/MainWindowHeader.vala:108 68 | msgid "Shortcut:" 69 | msgstr "" 70 | 71 | #: src/Widgets/MainWindowHeader.vala:154 72 | #, fuzzy 73 | msgid "Search Snippets" 74 | msgstr "Importer des raccourcis…" 75 | 76 | #: src/Widgets/MainWindowHeader.vala:157 77 | #: src/Windows/SearchAndPasteWindow.vala:56 78 | #, fuzzy 79 | msgid "Search Snippets…" 80 | msgstr "Importer des raccourcis…" 81 | 82 | #: src/Widgets/ViewStack.vala:54 83 | msgid "Abbreviation" 84 | msgstr "Abbréviation" 85 | 86 | #: src/Widgets/ViewStack.vala:63 87 | msgid "Body" 88 | msgstr "Corps" 89 | 90 | #: src/Widgets/ViewStack.vala:72 91 | msgid "Remove Snippet" 92 | msgstr "Supprimer le raccourci" 93 | 94 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 95 | #: src/Windows/SearchAndPasteWindow.vala:100 96 | #, fuzzy 97 | msgid "No Snippets Found" 98 | msgstr "Aucun raccourci trouvé." 99 | 100 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 101 | msgid "Please try entering a different search term." 102 | msgstr "" 103 | 104 | #: src/Widgets/WelcomeView.vala:22 105 | msgid "No snippets found." 106 | msgstr "Aucun raccourci trouvé." 107 | 108 | #: src/Widgets/WelcomeView.vala:23 109 | msgid "Create your first snippet." 110 | msgstr "Créez votre premier raccourci." 111 | 112 | #: src/Widgets/WelcomeView.vala:24 src/Windows/MainWindow.vala:155 113 | msgid "Import Snippets" 114 | msgstr "Importer des raccourcis" 115 | 116 | #: src/Widgets/WelcomeView.vala:24 117 | msgid "Import previously exported snippets." 118 | msgstr "Importez vos raccourcis précédemment exportés." 119 | 120 | #: src/Widgets/WelcomeView.vala:25 121 | msgid "Quick Start Guide" 122 | msgstr "Guide de démarrage rapide" 123 | 124 | #: src/Widgets/WelcomeView.vala:25 125 | msgid "Learn the basics of how to use Snippet Pixie." 126 | msgstr "Apprenez les bases de l'utilisation de Snippet Pixie." 127 | 128 | #: src/Windows/MainWindow.vala:155 129 | msgid "Import" 130 | msgstr "Importer" 131 | 132 | #: src/Windows/MainWindow.vala:162 133 | msgid "Overwrite Duplicate Snippets?" 134 | msgstr "Écraser les raccourcis en double ?" 135 | 136 | #: src/Windows/MainWindow.vala:162 137 | msgid "" 138 | "If any of the snippet abbreviations about to be imported already exist, do " 139 | "you want to skip importing them or update the existing snippet?" 140 | msgstr "" 141 | "Si l'un des raccourcis d'abréviation sur le point d'être importé existe " 142 | "déjà, voulez-vous sauter l'importation ou mettre à jour le raccourci " 143 | "existant ?" 144 | 145 | #: src/Windows/MainWindow.vala:163 146 | msgid "Update Existing" 147 | msgstr "Mettre à jour l'existant" 148 | 149 | #: src/Windows/MainWindow.vala:164 150 | msgid "Cancel" 151 | msgstr "Annuler" 152 | 153 | #: src/Windows/MainWindow.vala:165 154 | msgid "Skip Duplicates" 155 | msgstr "Ignorer les doublons" 156 | 157 | #: src/Windows/MainWindow.vala:192 158 | msgid "Imported Snippets" 159 | msgstr "Raccourcis importés" 160 | 161 | #: src/Windows/MainWindow.vala:192 162 | msgid "Your snippets were successfully imported." 163 | msgstr "Vos raccourcis ont été importés avec succès." 164 | 165 | #: src/Windows/MainWindow.vala:196 166 | msgid "Failed to import selected file" 167 | msgstr "Échec de l'importation du fichier sélectionné" 168 | 169 | #: src/Windows/MainWindow.vala:196 170 | msgid "" 171 | "Snippet Pixie can currently only import the JSON format files that it also " 172 | "exports." 173 | msgstr "" 174 | "Snippet Pixie ne peut actuellement importer que les fichiers au format JSON " 175 | "qu'il exporte également." 176 | 177 | #: src/Windows/MainWindow.vala:204 178 | msgid "Export Snippets" 179 | msgstr "Exporter les raccourcis" 180 | 181 | #: src/Windows/MainWindow.vala:212 182 | msgid "Exported Snippets" 183 | msgstr "Raccourcis exportés" 184 | 185 | #: src/Windows/MainWindow.vala:212 186 | msgid "Your snippets were successfully exported." 187 | msgstr "Vos raccourcis ont été exportés avec succès." 188 | 189 | #: src/Windows/MainWindow.vala:216 190 | msgid "Failed to export to file" 191 | msgstr "Échec de l'exportation du fichier" 192 | 193 | #: src/Windows/MainWindow.vala:216 194 | msgid "Something went wrong, sorry." 195 | msgstr "Une erreur s'est produite, désolé." 196 | 197 | #: src/Windows/MainWindow.vala:236 198 | msgid "" 199 | "@NathanBnm https://github.com/NathanBnm/\n" 200 | " @Vistaus https://github.com/Vistaus/" 201 | msgstr "" 202 | 203 | #: src/Windows/MainWindow.vala:240 204 | #, fuzzy 205 | msgid "Copyright © Byte Pixie Limited" 206 | msgstr "Copyright © Byte Pixie Limited" 207 | 208 | #: src/Windows/SearchAndPasteWindow.vala:100 209 | msgid "Please add some snippets!" 210 | msgstr "" 211 | 212 | #: src/Application.vala:652 213 | #, fuzzy 214 | msgid "snippet" 215 | msgstr "Ajouter un raccourci" 216 | 217 | #: src/Application.vala:694 src/Application.vala:812 218 | msgid "date" 219 | msgstr "" 220 | 221 | #: src/Application.vala:694 src/Application.vala:816 222 | msgid "time" 223 | msgstr "" 224 | 225 | #: src/Application.vala:728 226 | #, c-format 227 | msgid "" 228 | "Date adjustment does not seem to have a positive or negative integer in " 229 | "placeholder '%1$s'." 230 | msgstr "" 231 | 232 | #: src/Application.vala:743 233 | #, c-format 234 | msgid "" 235 | "Date adjustment number %1$d does not seem to start with a positive or " 236 | "negative integer in placeholder '%2$s'." 237 | msgstr "" 238 | 239 | #: src/Application.vala:774 240 | #, c-format 241 | msgid "" 242 | "Date adjustment number %1$d does not seem to end with either 'Y', 'M', 'W', " 243 | "'D', 'h', 'm' or 's' in placeholder '%2$s'." 244 | msgstr "" 245 | 246 | #: src/Application.vala:782 src/Application.vala:795 247 | #, c-format 248 | msgid "Oops, date format '%1$s' could not be parsed." 249 | msgstr "" 250 | 251 | #: src/Application.vala:824 252 | msgid "clipboard" 253 | msgstr "" 254 | 255 | #: src/Application.vala:860 256 | msgid "cursor" 257 | msgstr "" 258 | 259 | #: src/Application.vala:1203 260 | msgid "Show Snippet Pixie's window (default action)" 261 | msgstr "Afficher la fenêtre de Snippet Pixie (action par défaut)" 262 | 263 | #: src/Application.vala:1204 264 | #, fuzzy 265 | msgid "Show Snippet Pixie's quick search and paste window" 266 | msgstr "Afficher la fenêtre de Snippet Pixie (action par défaut)" 267 | 268 | #: src/Application.vala:1205 269 | msgid "Start with no window" 270 | msgstr "Lancer sans fenêtre" 271 | 272 | #: src/Application.vala:1206 273 | msgid "Fully quit the application, including the background process" 274 | msgstr "" 275 | "Quitter complétement l'application, ainsi que le processus en arrière-plan" 276 | 277 | #: src/Application.vala:1207 278 | msgid "" 279 | "Turn auto start of Snippet Pixie on login, on, off, or show status of setting" 280 | msgstr "" 281 | "Activer le démarrage automatique de Snippet Pixie lors de la connexion, " 282 | "activer, désactiver ou afficher l'état des paramètres" 283 | 284 | #: src/Application.vala:1208 285 | msgid "" 286 | "Shows status of the application, exits with status 0 if running, 1 if not" 287 | msgstr "" 288 | "Affiche l'état de l'application, quitte avec le statut 0 si en cours " 289 | "d'exécution, 1 sinon" 290 | 291 | #: src/Application.vala:1209 292 | msgid "Export snippets to file" 293 | msgstr "Exporter les raccourcis vers un fichier" 294 | 295 | #: src/Application.vala:1210 296 | msgid "" 297 | "Import snippets from file, skips snippets where abbreviation already exists" 298 | msgstr "" 299 | "Importer des raccourcis à partir d'un fichier, ignore les raccourcis où " 300 | "l'abréviation existe déjà" 301 | 302 | #: src/Application.vala:1210 303 | msgid "filename" 304 | msgstr "Nom du fichier" 305 | 306 | #: src/Application.vala:1211 307 | msgid "" 308 | "If used in conjunction with import, existing snippets with same abbreviation " 309 | "are updated" 310 | msgstr "" 311 | "S'ils sont utilisés conjointement avec l'importation, les raccourcis " 312 | "existants avec la même abréviation sont mis à jour" 313 | 314 | #: src/Application.vala:1212 315 | msgid "Display version number" 316 | msgstr "Afficher le numéro de version" 317 | 318 | #: src/Application.vala:1213 319 | msgid "Display this help" 320 | msgstr "Afficher cette aide" 321 | 322 | #: src/Application.vala:1232 323 | #, c-format 324 | msgid "error: %s\n" 325 | msgstr "Erreur : %s\n" 326 | 327 | #: src/Application.vala:1233 328 | #, c-format 329 | msgid "Run '%s --help' to see a full list of available command line options.\n" 330 | msgstr "" 331 | "Exécutez « %s --help » pour visualiser la liste complète des options " 332 | "disponibles en ligne de commande.\n" 333 | 334 | #: src/Application.vala:1249 335 | msgid "Quitting…\n" 336 | msgstr "Fermeture…\n" 337 | 338 | #: src/Application.vala:1257 339 | msgid "Running.\n" 340 | msgstr "En cours d'exécution.\n" 341 | 342 | #: src/Application.vala:1260 343 | msgid "Not Running.\n" 344 | msgstr "Pas en cours d'exécution.\n" 345 | 346 | #: src/Application.vala:1285 347 | #, c-format 348 | msgid "Invalid autostart value \"%s\".\n" 349 | msgstr "Valeur de démarrage automatique invalide « %s ».\n" 350 | 351 | #: src/Application.vala:1330 352 | msgid "Cannot run without threads.\n" 353 | msgstr "" 354 | 355 | #: src/Snippet.vala:22 356 | msgid "new" 357 | msgstr "Nouveau" 358 | 359 | #: src/Snippet.vala:23 360 | msgid "Something to be replaced" 361 | msgstr "Quelque chose à remplacer" 362 | 363 | #~ msgid "Add snippet" 364 | #~ msgstr "Ajouter un raccourci" 365 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(meson.project_name(), 2 | args: [ 3 | '--directory=' + meson.source_root(), 4 | '--from-code=UTF-8' 5 | ] 6 | ) 7 | 8 | subdir('extra') -------------------------------------------------------------------------------- /po/nl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the com.github.bytepixie.snippetpixie package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: com.github.bytepixie.snippetpixie\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2021-08-19 09:43+0100\n" 11 | "PO-Revision-Date: 2021-08-26 17:08+0200\n" 12 | "Last-Translator: Heimen Stoffels \n" 13 | "Language-Team: \n" 14 | "Language: nl\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 3.0\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #: src/Settings/Shortcut.vala:30 22 | msgid "Disabled" 23 | msgstr "Uitgeschakeld" 24 | 25 | #: src/Settings/Shortcut.vala:39 26 | msgid "Ctrl" 27 | msgstr "Ctrl" 28 | 29 | #: src/Widgets/MainWindowHeader.vala:32 src/Widgets/WelcomeView.vala:23 30 | msgid "Add Snippet" 31 | msgstr "Knipsel toevoegen" 32 | 33 | #: src/Widgets/MainWindowHeader.vala:45 34 | msgid "Auto start on login" 35 | msgstr "Automatisch opstarten" 36 | 37 | #: src/Widgets/MainWindowHeader.vala:48 38 | msgid "Auto expand Snippets" 39 | msgstr "Knipsels automatisch aanvullen" 40 | 41 | #: src/Widgets/MainWindowHeader.vala:51 src/Widgets/MainWindowHeader.vala:86 42 | msgid "Shortcut" 43 | msgstr "Sneltoets" 44 | 45 | #: src/Widgets/MainWindowHeader.vala:54 src/Widgets/MainWindowHeader.vala:58 46 | msgid "Import Snippets…" 47 | msgstr "Knipsels importeren…" 48 | 49 | #: src/Widgets/MainWindowHeader.vala:61 src/Widgets/MainWindowHeader.vala:65 50 | msgid "Export Snippets…" 51 | msgstr "Knipsels exporteren…" 52 | 53 | #: src/Widgets/MainWindowHeader.vala:68 54 | msgid "About…" 55 | msgstr "Over…" 56 | 57 | #: src/Widgets/MainWindowHeader.vala:91 58 | msgid "Search selected text" 59 | msgstr "Zoeken naar geselecteerde tekst" 60 | 61 | #: src/Widgets/MainWindowHeader.vala:94 62 | msgid "Focus search box" 63 | msgstr "Zoekvak focussen" 64 | 65 | #: src/Widgets/MainWindowHeader.vala:108 66 | msgid "Shortcut:" 67 | msgstr "Sneltoets:" 68 | 69 | #: src/Widgets/MainWindowHeader.vala:154 70 | msgid "Search Snippets" 71 | msgstr "Knipsels doorzoeken" 72 | 73 | #: src/Widgets/MainWindowHeader.vala:157 74 | #: src/Windows/SearchAndPasteWindow.vala:56 75 | msgid "Search Snippets…" 76 | msgstr "Knipsels doorzoeken…" 77 | 78 | #: src/Widgets/ViewStack.vala:54 79 | msgid "Abbreviation" 80 | msgstr "Afkorting" 81 | 82 | #: src/Widgets/ViewStack.vala:63 83 | msgid "Body" 84 | msgstr "Inhoud" 85 | 86 | #: src/Widgets/ViewStack.vala:72 87 | msgid "Remove Snippet" 88 | msgstr "Knipsel verwijderen" 89 | 90 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 91 | #: src/Windows/SearchAndPasteWindow.vala:100 92 | msgid "No Snippets Found" 93 | msgstr "Geen knipsel gevonden" 94 | 95 | #: src/Widgets/ViewStack.vala:84 src/Windows/SearchAndPasteWindow.vala:99 96 | msgid "Please try entering a different search term." 97 | msgstr "Probeer een andere zoekopdracht." 98 | 99 | #: src/Widgets/WelcomeView.vala:22 100 | msgid "No snippets found." 101 | msgstr "Je hebt nog geen knipsels." 102 | 103 | #: src/Widgets/WelcomeView.vala:23 104 | msgid "Create your first snippet." 105 | msgstr "Maak je eerste knipsel." 106 | 107 | #: src/Widgets/WelcomeView.vala:24 src/Windows/MainWindow.vala:155 108 | msgid "Import Snippets" 109 | msgstr "Knipsels importeren" 110 | 111 | #: src/Widgets/WelcomeView.vala:24 112 | msgid "Import previously exported snippets." 113 | msgstr "Importeer eerder geëxporteerde knipsels." 114 | 115 | #: src/Widgets/WelcomeView.vala:25 116 | msgid "Quick Start Guide" 117 | msgstr "Snelstartgids" 118 | 119 | #: src/Widgets/WelcomeView.vala:25 120 | msgid "Learn the basics of how to use Snippet Pixie." 121 | msgstr "Leer hoe je met Snippet Pixie werkt." 122 | 123 | #: src/Windows/MainWindow.vala:155 124 | msgid "Import" 125 | msgstr "Importeren" 126 | 127 | #: src/Windows/MainWindow.vala:162 128 | msgid "Overwrite Duplicate Snippets?" 129 | msgstr "Duplicaten overschrijven?" 130 | 131 | #: src/Windows/MainWindow.vala:162 132 | msgid "" 133 | "If any of the snippet abbreviations about to be imported already exist, do " 134 | "you want to skip importing them or update the existing snippet?" 135 | msgstr "" 136 | "Als de te importeren knipsels al bestaan, wil je ze dan overslaan of de " 137 | "bestaande knipsels bijwerken?" 138 | 139 | #: src/Windows/MainWindow.vala:163 140 | msgid "Update Existing" 141 | msgstr "Bestaande bijwerken" 142 | 143 | #: src/Windows/MainWindow.vala:164 144 | msgid "Cancel" 145 | msgstr "Annuleren" 146 | 147 | #: src/Windows/MainWindow.vala:165 148 | msgid "Skip Duplicates" 149 | msgstr "Duplicaten overslaan" 150 | 151 | #: src/Windows/MainWindow.vala:192 152 | msgid "Imported Snippets" 153 | msgstr "Geïmporteerde knipsels" 154 | 155 | #: src/Windows/MainWindow.vala:192 156 | msgid "Your snippets were successfully imported." 157 | msgstr "Je knipsels zijn geïmporteerd." 158 | 159 | #: src/Windows/MainWindow.vala:196 160 | msgid "Failed to import selected file" 161 | msgstr "Importeren mislukt" 162 | 163 | #: src/Windows/MainWindow.vala:196 164 | msgid "" 165 | "Snippet Pixie can currently only import the JSON format files that it also " 166 | "exports." 167 | msgstr "" 168 | "Snippet Pixie kan alleen eerder geëxporteerde json-bestanden importeren." 169 | 170 | #: src/Windows/MainWindow.vala:204 171 | msgid "Export Snippets" 172 | msgstr "Knipsels exporteren" 173 | 174 | #: src/Windows/MainWindow.vala:212 175 | msgid "Exported Snippets" 176 | msgstr "Geëxporteerde knipsels" 177 | 178 | #: src/Windows/MainWindow.vala:212 179 | msgid "Your snippets were successfully exported." 180 | msgstr "Je knipsels zijn geëxporteerd." 181 | 182 | #: src/Windows/MainWindow.vala:216 183 | msgid "Failed to export to file" 184 | msgstr "Exporteren mislukt" 185 | 186 | #: src/Windows/MainWindow.vala:216 187 | msgid "Something went wrong, sorry." 188 | msgstr "Er is iets misgegaan." 189 | 190 | #: src/Windows/MainWindow.vala:236 191 | msgid "" 192 | "@NathanBnm https://github.com/NathanBnm/\n" 193 | " @Vistaus https://github.com/Vistaus/" 194 | msgstr "" 195 | "@NathanBnm https://github.com/NathanBnm/\n" 196 | " @Vistaus https://github.com/Vistaus/" 197 | 198 | #: src/Windows/MainWindow.vala:240 199 | msgid "Copyright © Byte Pixie Limited" 200 | msgstr "Copyright © Byte Pixie Limited" 201 | 202 | #: src/Windows/SearchAndPasteWindow.vala:100 203 | msgid "Please add some snippets!" 204 | msgstr "Voeg knipsels toe!" 205 | 206 | #: src/Application.vala:652 207 | msgid "snippet" 208 | msgstr "knipsel" 209 | 210 | #: src/Application.vala:694 src/Application.vala:812 211 | msgid "date" 212 | msgstr "datum" 213 | 214 | #: src/Application.vala:694 src/Application.vala:816 215 | msgid "time" 216 | msgstr "tijd" 217 | 218 | #: src/Application.vala:728 219 | #, c-format 220 | msgid "" 221 | "Date adjustment does not seem to have a positive or negative integer in " 222 | "placeholder '%1$s'." 223 | msgstr "" 224 | "De datumaanpassing lijkt geen positief of negatief geheel getal te bevatten " 225 | "in plaatshouder ‘%1$s’." 226 | 227 | #: src/Application.vala:743 228 | #, c-format 229 | msgid "" 230 | "Date adjustment number %1$d does not seem to start with a positive or " 231 | "negative integer in placeholder '%2$s'." 232 | msgstr "" 233 | "De datumaanpassing %1$d lijkt niet te beginnen met een positief of negatief " 234 | "geheel in plaatshouder ‘%2$s’." 235 | 236 | #: src/Application.vala:774 237 | #, c-format 238 | msgid "" 239 | "Date adjustment number %1$d does not seem to end with either 'Y', 'M', 'W', " 240 | "'D', 'h', 'm' or 's' in placeholder '%2$s'." 241 | msgstr "" 242 | "De datumaanpassing %1$d lijkt niet te eindigen op 'Y', 'M', 'W', 'D', 'h', " 243 | "'m' of 's' in plaatshouder ‘%2$s’." 244 | 245 | #: src/Application.vala:782 src/Application.vala:795 246 | #, c-format 247 | msgid "Oops, date format '%1$s' could not be parsed." 248 | msgstr "De datumopmaak ‘%1$s’ kan niet worden verwerkt." 249 | 250 | #: src/Application.vala:824 251 | msgid "clipboard" 252 | msgstr "klembord" 253 | 254 | #: src/Application.vala:860 255 | msgid "cursor" 256 | msgstr "cursor" 257 | 258 | #: src/Application.vala:1203 259 | msgid "Show Snippet Pixie's window (default action)" 260 | msgstr "Toon Snippet Pixie's venster (standaardactie)" 261 | 262 | #: src/Application.vala:1204 263 | msgid "Show Snippet Pixie's quick search and paste window" 264 | msgstr "Toon Snippet Pixie's snelzoekvak-en-plakvenster" 265 | 266 | #: src/Application.vala:1205 267 | msgid "Start with no window" 268 | msgstr "Geminimaliseerd opstarten" 269 | 270 | #: src/Application.vala:1206 271 | msgid "Fully quit the application, including the background process" 272 | msgstr "Sluit de toepassing volledig af, inclusief het achtergrondproces" 273 | 274 | #: src/Application.vala:1207 275 | msgid "" 276 | "Turn auto start of Snippet Pixie on login, on, off, or show status of setting" 277 | msgstr "" 278 | "Start Snippet Pixie automatisch op of toon de status van deze instelling" 279 | 280 | #: src/Application.vala:1208 281 | msgid "" 282 | "Shows status of the application, exits with status 0 if running, 1 if not" 283 | msgstr "" 284 | "Toon de toepassingsstatus, sluit af met status 0 (indien actief) of (indien " 285 | "niet actief)" 286 | 287 | #: src/Application.vala:1209 288 | msgid "Export snippets to file" 289 | msgstr "Knipsels exporteren naar bestand" 290 | 291 | #: src/Application.vala:1210 292 | msgid "" 293 | "Import snippets from file, skips snippets where abbreviation already exists" 294 | msgstr "Importeer knipsels uit een bestand en sla bestaande knipsels over" 295 | 296 | #: src/Application.vala:1210 297 | msgid "filename" 298 | msgstr "bestandsnaam" 299 | 300 | #: src/Application.vala:1211 301 | msgid "" 302 | "If used in conjunction with import, existing snippets with same abbreviation " 303 | "are updated" 304 | msgstr "Gebruik tezamen met importeren om bestaande knipsels ook bij te werken" 305 | 306 | #: src/Application.vala:1212 307 | msgid "Display version number" 308 | msgstr "Toon het versienummer" 309 | 310 | #: src/Application.vala:1213 311 | msgid "Display this help" 312 | msgstr "Toon deze hulp" 313 | 314 | #: src/Application.vala:1232 315 | #, c-format 316 | msgid "error: %s\n" 317 | msgstr "fout: %s\n" 318 | 319 | #: src/Application.vala:1233 320 | #, c-format 321 | msgid "Run '%s --help' to see a full list of available command line options.\n" 322 | msgstr "" 323 | "Voer ‘%s --help’ uit om een volledige lijst met opdrachtregelopties te " 324 | "tonen.\n" 325 | 326 | #: src/Application.vala:1249 327 | msgid "Quitting…\n" 328 | msgstr "Bezig met afsluiten…\n" 329 | 330 | #: src/Application.vala:1257 331 | msgid "Running.\n" 332 | msgstr "Actief.\n" 333 | 334 | #: src/Application.vala:1260 335 | msgid "Not Running.\n" 336 | msgstr "Niet actief.\n" 337 | 338 | #: src/Application.vala:1285 339 | #, c-format 340 | msgid "Invalid autostart value \"%s\".\n" 341 | msgstr "Ongeldige automatische opstartwaarde “%s”.\n" 342 | 343 | #: src/Application.vala:1330 344 | msgid "Cannot run without threads.\n" 345 | msgstr "Kan niet worden uitgevoerd zonder threads.\n" 346 | 347 | #: src/Snippet.vala:22 348 | msgid "new" 349 | msgstr "nieuw" 350 | 351 | #: src/Snippet.vala:23 352 | msgid "Something to be replaced" 353 | msgstr "Te vervangen" 354 | 355 | #~ msgid "Add snippet" 356 | #~ msgstr "Knipsel toevoegen" 357 | 358 | #~ msgid "Try changing search terms." 359 | #~ msgstr "Probeer andere zoektermen." 360 | -------------------------------------------------------------------------------- /snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: snippetpixie 2 | base: core20 3 | version: 1.5.3 4 | summary: Your little expandable text snippet helper 5 | description: | 6 | Save your often used text snippets and then expand them whenever you type their abbreviation. 7 | 8 | For example:- "spr\`" expands to "Snippet Pixie rules!" 9 | 10 | For non-accessible applications such as browsers and Electron apps, there's a shortcut (default is Ctrl+\`) for opening a search window that pastes the selected snippet. 11 | 12 | The Search and Paste window, opened with Ctrl+\` (can be changed), is very convenient for quickly finding and pasting snippets, and shows the most recently used snippets first for quick access. Using `Shift`+`Return` or `Shift`+`Click` on an entry in the Search and Paste window will `Shift`+`Ctrl`+`V` paste, great for terminal emulators, vim etc. 13 | 14 | Snippets can be imported and exported in a simple JSON format. 15 | 16 | Supports placeholders:- 17 | 18 | * Date/Time: Insert the current or calculated date/time with configurable format. 19 | * Clipboard: Insert the text contents of the clipboard. 20 | * Snippets: Insert snippets in your snippets! 21 | * Cursor: Set where the cursor should end up after the snippet has expanded. 22 | 23 | All placeholders are delimited (wrapped) by "$$", with the placeholder name starting with an "@" symbol. 24 | For example, today's date can be inserted with "$$@date$$". 25 | 26 | grade: stable 27 | confinement: classic 28 | architectures: 29 | - build-on: amd64 30 | - build-on: arm64 31 | - build-on: armhf 32 | icon: data/icons/256/com.github.bytepixie.snippetpixie.svg 33 | 34 | apps: 35 | snippetpixie: 36 | command: bin/desktop-launch $SNAP/usr/bin/com.github.bytepixie.snippetpixie 37 | autostart: snippetpixie_snippetpixie.desktop 38 | desktop: usr/share/applications/com.github.bytepixie.snippetpixie.desktop 39 | environment: 40 | GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas 41 | 42 | parts: 43 | snippetpixie: 44 | after: [ granite, desktop-gnome-platform ] 45 | plugin: meson 46 | meson-parameters: 47 | - --prefix=/usr 48 | source: . 49 | override-build: | 50 | snapcraftctl build 51 | sed -i 's|Icon=com.github.bytepixie.snippetpixie|Icon=\${SNAP}/meta/gui/icon.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/com.github.bytepixie.snippetpixie.desktop 52 | build-environment: 53 | - VALAFLAGS: " --vapidir $SNAPCRAFT_STAGE/usr/share/vala/vapi" 54 | build-packages: 55 | - valac 56 | - desktop-file-utils 57 | - appstream 58 | - libatspi2.0-dev 59 | - libgee-0.8-dev 60 | - libglib2.0-dev 61 | - libgranite-dev 62 | - libgtk-3-dev 63 | - libibus-1.0-dev 64 | - libjson-glib-dev 65 | - libsqlite3-dev 66 | - libxtst-dev 67 | - libx11-dev 68 | stage-packages: 69 | - libatk-bridge2.0-0 70 | - libatk1.0-0 71 | - libatspi2.0-0 72 | - libcairo-gobject2 73 | - libcairo2 74 | - libdatrie1 75 | - libepoxy0 76 | - libfontconfig1 77 | - libfreetype6 78 | - libgdk-pixbuf2.0-0 79 | - libgee-0.8-2 80 | - libglib2.0-0 81 | - libgraphite2-3 82 | - libgtk-3-0 83 | - libharfbuzz0b 84 | - libjson-glib-1.0-0 85 | - libpango-1.0-0 86 | - libpangocairo-1.0-0 87 | - libpangoft2-1.0-0 88 | - libpixman-1-0 89 | - libpng16-16 90 | - libstartup-notification0 91 | - libthai0 92 | - libwayland-client0 93 | - libwayland-cursor0 94 | - libwayland-egl1 95 | - libx11-6 96 | - libx11-xcb1 97 | - libxau6 98 | - libxcb-render0 99 | - libxcb-shm0 100 | - libxcb-util1 101 | - libxcb1 102 | - libxcomposite1 103 | - libxcursor1 104 | - libxdamage1 105 | - libxdmcp6 106 | - libxext6 107 | - libxfixes3 108 | - libxi6 109 | - libxinerama1 110 | - libxkbcommon0 111 | - libxrandr2 112 | - libxrender1 113 | - libxres1 114 | - libxtst6 115 | granite: 116 | plugin: meson 117 | meson-parameters: 118 | - --prefix=/usr 119 | source: https://github.com/elementary/granite/archive/5.5.0.tar.gz 120 | source-type: tar 121 | override-build: | 122 | snapcraftctl build 123 | build-packages: 124 | - gobject-introspection 125 | - libgee-0.8-dev 126 | - libgirepository1.0-dev 127 | - libgtk-3-dev 128 | - valac 129 | stage-packages: 130 | - libatk-bridge2.0-0 131 | - libatk1.0-0 132 | - libatspi2.0-0 133 | - libcairo-gobject2 134 | - libcairo2 135 | - libdatrie1 136 | - libepoxy0 137 | - libfontconfig1 138 | - libfreetype6 139 | - libgdk-pixbuf2.0-0 140 | - libgee-0.8-2 141 | - libgraphite2-3 142 | - libgtk-3-0 143 | - libharfbuzz0b 144 | - libpango-1.0-0 145 | - libpangocairo-1.0-0 146 | - libpangoft2-1.0-0 147 | - libpixman-1-0 148 | - libpng16-16 149 | - libthai0 150 | - libwayland-client0 151 | - libwayland-cursor0 152 | - libwayland-egl1 153 | - libx11-6 154 | - libxau6 155 | - libxcb-render0 156 | - libxcb-shm0 157 | - libxcb1 158 | - libxcomposite1 159 | - libxcursor1 160 | - libxdamage1 161 | - libxdmcp6 162 | - libxext6 163 | - libxfixes3 164 | - libxi6 165 | - libxinerama1 166 | - libxkbcommon0 167 | - libxrandr2 168 | - libxrender1 169 | desktop-gnome-platform: 170 | source: https://github.com/ubuntu/snapcraft-desktop-helpers.git 171 | source-subdir: gtk 172 | plugin: make 173 | make-parameters: [ "FLAVOR=gtk3" ] 174 | build-packages: 175 | - build-essential 176 | - gettext 177 | - libgtk-3-dev 178 | -------------------------------------------------------------------------------- /src/Settings/CustomShortcutSettings.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * "Borrowed" from Clipped by David Hewitt. 3 | * https://github.com/davidmhewitt/clipped/blob/b00d44757cc2bf7bc9948d535668099db4ab9896/src/Settings/CustomShortcutSettings.vala 4 | */ 5 | class CustomShortcutSettings : Object { 6 | 7 | const string SCHEMA = "org.gnome.settings-daemon.plugins.media-keys"; 8 | const string KEY = "custom-keybinding"; 9 | 10 | const string RELOCATABLE_SCHEMA_PATH_TEMLPATE = 11 | "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom%d/"; 12 | 13 | const int MAX_SHORTCUTS = 100; 14 | 15 | static GLib.Settings settings; 16 | 17 | public static bool available = false; 18 | 19 | public struct CustomShortcut { 20 | string shortcut; 21 | string command; 22 | string relocatable_schema; 23 | } 24 | 25 | public static void init () { 26 | var schema_source = GLib.SettingsSchemaSource.get_default (); 27 | 28 | var schema = schema_source.lookup (SCHEMA, true); 29 | 30 | if (schema == null) { 31 | warning ("Schema \"%s\" is not installed on your system.", SCHEMA); 32 | return; 33 | } 34 | 35 | settings = new GLib.Settings.full (schema, null, null); 36 | available = true; 37 | } 38 | 39 | static string[] get_relocatable_schemas () { 40 | return settings.get_strv (KEY + "s"); 41 | } 42 | 43 | static string get_relocatable_schema_path (int i) { 44 | return RELOCATABLE_SCHEMA_PATH_TEMLPATE.printf (i); 45 | } 46 | 47 | static GLib.Settings? get_relocatable_schema_settings (string relocatable_schema) { 48 | return new GLib.Settings.with_path (SCHEMA + "." + KEY, relocatable_schema); 49 | } 50 | 51 | public static string? create_shortcut () requires (available) { 52 | for (int i = 0; i < MAX_SHORTCUTS; i++) { 53 | var new_relocatable_schema = get_relocatable_schema_path (i); 54 | 55 | if (relocatable_schema_is_used (new_relocatable_schema) == false) { 56 | reset_relocatable_schema (new_relocatable_schema); 57 | add_relocatable_schema (new_relocatable_schema); 58 | return new_relocatable_schema; 59 | } 60 | } 61 | 62 | return (string) null; 63 | } 64 | 65 | static bool relocatable_schema_is_used (string new_relocatable_schema) { 66 | var relocatable_schemas = get_relocatable_schemas (); 67 | 68 | foreach (var relocatable_schema in relocatable_schemas) 69 | if (relocatable_schema == new_relocatable_schema) 70 | return true; 71 | 72 | return false; 73 | } 74 | 75 | static void add_relocatable_schema (string new_relocatable_schema) { 76 | var relocatable_schemas = get_relocatable_schemas (); 77 | relocatable_schemas += new_relocatable_schema; 78 | settings.set_strv (KEY + "s", relocatable_schemas); 79 | apply_settings (settings); 80 | } 81 | 82 | static void reset_relocatable_schema (string relocatable_schema) { 83 | var relocatable_settings = get_relocatable_schema_settings (relocatable_schema); 84 | relocatable_settings.reset ("name"); 85 | relocatable_settings.reset ("command"); 86 | relocatable_settings.reset ("binding"); 87 | apply_settings (relocatable_settings); 88 | } 89 | 90 | public static bool edit_shortcut (string relocatable_schema, string shortcut) 91 | requires (available) { 92 | 93 | var relocatable_settings = get_relocatable_schema_settings (relocatable_schema); 94 | relocatable_settings.set_string ("binding", shortcut); 95 | apply_settings (relocatable_settings); 96 | return true; 97 | } 98 | 99 | public static bool edit_command (string relocatable_schema, string command) 100 | requires (available) { 101 | 102 | var relocatable_settings = get_relocatable_schema_settings (relocatable_schema); 103 | relocatable_settings.set_string ("command", command); 104 | relocatable_settings.set_string ("name", command); 105 | apply_settings (relocatable_settings); 106 | return true; 107 | } 108 | 109 | public static GLib.List list_custom_shortcuts () 110 | requires (available) { 111 | 112 | var list = new GLib.List (); 113 | foreach (var relocatable_schema in get_relocatable_schemas ()) 114 | list.append (create_custom_shortcut_object (relocatable_schema)); 115 | return list; 116 | } 117 | 118 | static CustomShortcut? create_custom_shortcut_object (string relocatable_schema) { 119 | var relocatable_settings = get_relocatable_schema_settings (relocatable_schema); 120 | 121 | return { 122 | relocatable_settings.get_string ("binding"), 123 | relocatable_settings.get_string ("command"), 124 | relocatable_schema 125 | }; 126 | } 127 | 128 | private static void apply_settings (GLib.Settings asettings) { 129 | asettings.apply (); 130 | GLib.Settings.sync (); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/Settings/Shortcut.vala: -------------------------------------------------------------------------------- 1 | class Shortcut : GLib.Object { 2 | public Gdk.ModifierType modifiers; 3 | public uint accel_key; 4 | 5 | string SEPARATOR = " · "; 6 | 7 | public Shortcut (uint key = 0, Gdk.ModifierType mod = (Gdk.ModifierType) 0) { 8 | accel_key = key; 9 | modifiers = mod; 10 | } 11 | 12 | public Shortcut.parse (string? str) { 13 | if (str == null) { 14 | accel_key = 0; 15 | modifiers = (Gdk.ModifierType) 0; 16 | return; 17 | } 18 | 19 | Gtk.accelerator_parse (str, out accel_key, out modifiers); 20 | } 21 | 22 | public string to_gsettings () { 23 | if (!valid ()) 24 | return ""; 25 | return Gtk.accelerator_name (accel_key, modifiers); 26 | } 27 | 28 | public string to_readable () { 29 | if (!valid ()) 30 | return _("Disabled"); 31 | 32 | string tmp = ""; 33 | 34 | if ((modifiers & Gdk.ModifierType.SHIFT_MASK) > 0) 35 | tmp += "⇧" + SEPARATOR; 36 | if ((modifiers & Gdk.ModifierType.SUPER_MASK) > 0) 37 | tmp += "⌘" + SEPARATOR; 38 | if ((modifiers & Gdk.ModifierType.CONTROL_MASK) > 0) 39 | tmp += _("Ctrl") + SEPARATOR; 40 | if ((modifiers & Gdk.ModifierType.MOD1_MASK) > 0) 41 | tmp += "⎇" + SEPARATOR; 42 | if ((modifiers & Gdk.ModifierType.MOD2_MASK) > 0) 43 | tmp += "Mod2" + SEPARATOR; 44 | if ((modifiers & Gdk.ModifierType.MOD3_MASK) > 0) 45 | tmp += "Mod3" + SEPARATOR; 46 | if ((modifiers & Gdk.ModifierType.MOD4_MASK) > 0) 47 | tmp += "Mod4" + SEPARATOR; 48 | 49 | switch (accel_key) { 50 | case Gdk.Key.Tab: 51 | tmp += "↹"; 52 | break; 53 | case Gdk.Key.Up: 54 | tmp += "↑"; 55 | break; 56 | case Gdk.Key.Down: 57 | tmp += "↓"; 58 | break; 59 | case Gdk.Key.Left: 60 | tmp += "←"; 61 | break; 62 | case Gdk.Key.Right: 63 | tmp += "→"; 64 | break; 65 | default: 66 | tmp += Gtk.accelerator_get_label (accel_key, 0); 67 | break; 68 | } 69 | 70 | return tmp; 71 | } 72 | 73 | public bool valid () { 74 | if (accel_key == 0 || (modifiers == (Gdk.ModifierType) 0 && accel_key != Gdk.Key.Print)) 75 | return false; 76 | 77 | if (modifiers == Gdk.ModifierType.SHIFT_MASK) { 78 | if ((accel_key >= Gdk.Key.a && accel_key <= Gdk.Key.z) 79 | || (accel_key >= Gdk.Key.A && accel_key <= Gdk.Key.Z) 80 | || (accel_key >= Gdk.Key.@0 && accel_key <= Gdk.Key.@9) 81 | || (accel_key >= Gdk.Key.kana_fullstop && accel_key <= Gdk.Key.semivoicedsound) 82 | || (accel_key >= Gdk.Key.Arabic_comma && accel_key <= Gdk.Key.Arabic_sukun) 83 | || (accel_key >= Gdk.Key.Serbian_dje && accel_key <= Gdk.Key.Cyrillic_HARDSIGN) 84 | || (accel_key >= Gdk.Key.Greek_ALPHAaccent && accel_key <= Gdk.Key.Greek_omega) 85 | || (accel_key >= Gdk.Key.hebrew_doublelowline && accel_key <= Gdk.Key.hebrew_taf) 86 | || (accel_key >= Gdk.Key.Thai_kokai && accel_key <= Gdk.Key.Thai_lekkao) 87 | || (accel_key >= Gdk.Key.Hangul && accel_key <= Gdk.Key.Hangul_Special) 88 | || (accel_key >= Gdk.Key.Hangul_Kiyeog && accel_key <= Gdk.Key.Hangul_J_YeorinHieuh) 89 | || (accel_key == Gdk.Key.Home) 90 | || (accel_key == Gdk.Key.Left) 91 | || (accel_key == Gdk.Key.Up) 92 | || (accel_key == Gdk.Key.Right) 93 | || (accel_key == Gdk.Key.Down) 94 | || (accel_key == Gdk.Key.Page_Up) 95 | || (accel_key == Gdk.Key.Page_Down) 96 | || (accel_key == Gdk.Key.End) 97 | || (accel_key == Gdk.Key.Tab) 98 | || (accel_key == Gdk.Key.KP_Enter) 99 | || (accel_key == Gdk.Key.Return)) { 100 | return false; 101 | } 102 | } 103 | 104 | return true; 105 | } 106 | 107 | } 108 | 109 | -------------------------------------------------------------------------------- /src/Snippet.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.Snippet : Object { 21 | public virtual int id { get; construct set; } 22 | public virtual string abbreviation { get; set; default = _("new") + "`"; } 23 | public virtual string body { get; set; default = _("Something to be replaced"); } 24 | public virtual DateTime last_used { get; set; } 25 | 26 | // public Snippet (int id) { 27 | // this.id = id; 28 | // } 29 | 30 | public string trigger () { 31 | return abbreviation.reverse ().get_char (0).to_string (); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Utils.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | namespace SnippetPixie.Utils { 21 | public SimpleAction action_from_group (string action_name, SimpleActionGroup action_group) { 22 | return ((SimpleAction) action_group.lookup_action (action_name)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Widgets/FramedTextView.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.FramedTextView : Gtk.Frame { 21 | private Gtk.TextView textview; 22 | 23 | construct { 24 | textview = new Gtk.TextView (); 25 | textview.wrap_mode = Gtk.WrapMode.WORD_CHAR; 26 | textview.focus.connect ((direction) => { 27 | if (direction == Gtk.DirectionType.TAB_FORWARD || direction == Gtk.DirectionType.TAB_BACKWARD) { 28 | textview.select_all (true); 29 | } 30 | }); 31 | 32 | var scroll = new Gtk.ScrolledWindow (null, null); 33 | scroll.set_policy (Gtk.PolicyType.EXTERNAL, Gtk.PolicyType.AUTOMATIC); 34 | scroll.add (textview); 35 | 36 | add (scroll); 37 | } 38 | 39 | public Gtk.TextBuffer buffer { 40 | get { return textview.buffer; } 41 | set { textview.buffer = value; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Widgets/MainWindowHeader.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.MainWindowHeader : Gtk.HeaderBar { 21 | public signal void search_changed (string search_term); 22 | public signal void search_escaped (); 23 | public Gtk.SearchEntry search_entry; 24 | 25 | construct { 26 | var app = Application.get_default (); 27 | 28 | var add_button = new Gtk.Button.from_icon_name ("document-new", Gtk.IconSize.LARGE_TOOLBAR); 29 | add_button.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_ADD; 30 | add_button.tooltip_markup = Granite.markup_accel_tooltip ( 31 | app.get_accels_for_action (add_button.action_name), 32 | _("Add Snippet") 33 | ); 34 | 35 | // var undo_button = new Gtk.Button.from_icon_name ("edit-undo", Gtk.IconSize.LARGE_TOOLBAR); 36 | // undo_button.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_UNDO; 37 | // undo_button.tooltip_text = _("Undo last edit"); 38 | 39 | // var redo_button = new Gtk.Button.from_icon_name ("edit-redo", Gtk.IconSize.LARGE_TOOLBAR); 40 | // redo_button.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_REDO; 41 | // redo_button.tooltip_text = _("Redo last undo"); 42 | 43 | // Main menu. 44 | var autostart_menuitem = new Gtk.ModelButton (); 45 | autostart_menuitem.text = _("Auto start on login"); 46 | autostart_menuitem.action_name = MainWindow.ACTION_PREFIX + "autostart"; 47 | var auto_expand_menuitem = new Gtk.ModelButton (); 48 | auto_expand_menuitem.text = _("Auto expand Snippets"); 49 | auto_expand_menuitem.action_name = MainWindow.ACTION_PREFIX + "auto-expand"; 50 | var shortcut_sub_menuitem = new Gtk.ModelButton (); 51 | shortcut_sub_menuitem.text = _("Shortcut"); 52 | shortcut_sub_menuitem.menu_name = "shortcut"; 53 | var import_menuitem = new Gtk.ModelButton (); 54 | import_menuitem.text = _("Import Snippets…"); 55 | import_menuitem.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_IMPORT; 56 | import_menuitem.tooltip_markup = Granite.markup_accel_tooltip ( 57 | app.get_accels_for_action (import_menuitem.action_name), 58 | _("Import Snippets…") 59 | ); 60 | var export_menuitem = new Gtk.ModelButton (); 61 | export_menuitem.text = _("Export Snippets…"); 62 | export_menuitem.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_EXPORT; 63 | export_menuitem.tooltip_markup = Granite.markup_accel_tooltip ( 64 | app.get_accels_for_action (export_menuitem.action_name), 65 | _("Export Snippets…") 66 | ); 67 | var about_menuitem = new Gtk.ModelButton (); 68 | about_menuitem.text = _("About…"); 69 | about_menuitem.action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_ABOUT; 70 | 71 | var main_menu = new Gtk.Grid (); 72 | main_menu.margin_top = main_menu.margin_bottom = 3; 73 | main_menu.orientation = Gtk.Orientation.VERTICAL; 74 | main_menu.add (autostart_menuitem); 75 | main_menu.add (auto_expand_menuitem); 76 | main_menu.add (shortcut_sub_menuitem); 77 | main_menu.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); 78 | main_menu.add (import_menuitem); 79 | main_menu.add (export_menuitem); 80 | main_menu.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); 81 | main_menu.add (about_menuitem); 82 | main_menu.show_all (); 83 | 84 | // Shortcut submenu. 85 | var shortcut_menuitem = new Gtk.ModelButton (); 86 | shortcut_menuitem.text = _("Shortcut"); 87 | shortcut_menuitem.menu_name = "main"; 88 | shortcut_menuitem.centered = true; 89 | shortcut_menuitem.inverted = true; 90 | var search_selected_text_menuitem = new Gtk.ModelButton (); 91 | search_selected_text_menuitem.text = _("Search selected text"); 92 | search_selected_text_menuitem.action_name = MainWindow.ACTION_PREFIX + "search-selected-text"; 93 | var focus_search_menuitem = new Gtk.ModelButton (); 94 | focus_search_menuitem.text = _("Focus search box"); 95 | focus_search_menuitem.action_name = MainWindow.ACTION_PREFIX + "focus-search"; 96 | 97 | var accel = ""; 98 | string? accel_path = null; 99 | 100 | CustomShortcutSettings.init (); 101 | foreach (var shortcut in CustomShortcutSettings.list_custom_shortcuts ()) { 102 | if (shortcut.command == app.SEARCH_AND_PASTE_CMD) { 103 | accel = shortcut.shortcut; 104 | accel_path = shortcut.relocatable_schema; 105 | } 106 | } 107 | 108 | var shortcut_label = create_label (_("Shortcut:")); 109 | var shortcut_entry = new ShortcutEntry (accel); 110 | shortcut_entry.halign = Gtk.Align.END; 111 | shortcut_entry.margin_end = 12; 112 | shortcut_entry.shortcut_changed.connect ((new_shortcut) => { 113 | if (accel_path != null) { 114 | CustomShortcutSettings.edit_shortcut (accel_path, new_shortcut); 115 | } 116 | }); 117 | 118 | var shortcut_menu = new Gtk.Grid (); 119 | shortcut_menu.margin_top = shortcut_menu.margin_bottom = 3; 120 | shortcut_menu.orientation = Gtk.Orientation.VERTICAL; 121 | shortcut_menu.attach (shortcut_menuitem, 0, 0, 2); 122 | shortcut_menu.attach (shortcut_label, 0, 1); 123 | shortcut_menu.attach (shortcut_entry, 1, 1); 124 | shortcut_menu.attach (search_selected_text_menuitem, 0, 2, 2); 125 | shortcut_menu.attach (focus_search_menuitem, 0, 3, 2); 126 | shortcut_menu.show_all (); 127 | 128 | var popover = new Gtk.PopoverMenu (); 129 | popover.add (main_menu); 130 | popover.add (shortcut_menu); 131 | popover.child_set_property (shortcut_menu, "submenu", "shortcut"); 132 | 133 | var menu_button = new Gtk.MenuButton (); 134 | menu_button.image = new Gtk.Image.from_icon_name ("open-menu", Gtk.IconSize.LARGE_TOOLBAR); 135 | menu_button.popover = popover; 136 | menu_button.valign = Gtk.Align.CENTER; 137 | 138 | set_title ("Snippet Pixie"); 139 | show_close_button = true; 140 | pack_start (add_button); 141 | // pack_start (undo_button); // TODO: Add undo. 142 | // pack_start (redo_button); // TODO: Add redo. 143 | pack_end (menu_button); 144 | 145 | // Hide the search box as necessary. 146 | update_ui (app.snippets_manager.snippets); 147 | app.snippets_manager.snippets_changed.connect (update_ui); 148 | } 149 | 150 | private void enable_search () { 151 | if (search_entry == null) { 152 | search_entry = new Gtk.SearchEntry (); 153 | search_entry.valign = Gtk.Align.CENTER; 154 | search_entry.placeholder_text = _("Search Snippets"); 155 | search_entry.tooltip_markup = Granite.markup_accel_tooltip ( 156 | Application.get_default ().get_accels_for_action (MainWindow.ACTION_PREFIX + MainWindow.ACTION_SEARCH), 157 | _("Search Snippets…") 158 | ); 159 | search_entry.key_press_event.connect ((event) => { 160 | switch (event.keyval) { 161 | case Gdk.Key.Escape: 162 | search_entry.text = ""; 163 | search_escaped (); 164 | return true; 165 | default: 166 | return false; 167 | } 168 | }); 169 | search_entry.search_changed.connect (() => { 170 | search_changed (search_entry.text); 171 | }); 172 | pack_end (search_entry); 173 | } 174 | 175 | search_entry.show (); 176 | } 177 | 178 | private void disable_search () { 179 | if (search_entry != null) { 180 | search_entry.hide (); 181 | } 182 | } 183 | 184 | private void update_ui (Gee.ArrayList snippets, string reason = "update") { 185 | if (snippets.size > 0) { 186 | enable_search (); 187 | if (reason == "add") { 188 | search_entry.text = ""; 189 | } 190 | } else { 191 | disable_search (); 192 | } 193 | } 194 | 195 | private Gtk.Label create_label (string text) { 196 | var label = new Gtk.Label (text); 197 | label.hexpand = true; 198 | label.halign = Gtk.Align.START; 199 | label.margin_start = 15; 200 | label.margin_end = 3; 201 | 202 | return label; 203 | } 204 | } -------------------------------------------------------------------------------- /src/Widgets/SearchAndPasteList.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Byte Pixie Limited (https://www.bytepixie.com) 3 | * Copyright (c) 2017 David Hewitt (https://github.com/davidmhewitt) 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public 16 | * License along with this program; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301 USA 19 | * 20 | * Based on Clipped's ClipboardListBox.vala 21 | * https://github.com/davidmhewitt/clipped/blob/b00d44757cc2bf7bc9948d535668099db4ab9896/src/Widgets/ClipboardListBox.vala 22 | */ 23 | 24 | public class SnippetPixie.SearchAndPasteList : Gtk.ListBox { 25 | 26 | public SearchAndPasteList () { 27 | set_selection_mode (Gtk.SelectionMode.SINGLE); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Widgets/SearchAndPasteListRow.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Byte Pixie Limited (https://www.bytepixie.com) 3 | * Copyright (c) 2017 David Hewitt (https://github.com/davidmhewitt) 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public 16 | * License along with this program; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301 USA 19 | * 20 | * Based on Clipped's ClipboardListRow.vala 21 | * https://github.com/davidmhewitt/clipped/blob/b00d44757cc2bf7bc9948d535668099db4ab9896/src/Widgets/ClipboardListRow.vala 22 | */ 23 | 24 | public class SnippetPixie.SearchAndPasteListRow : Gtk.ListBoxRow { 25 | public Snippet snippet; 26 | 27 | private const string KEYCAP_CSS = """ 28 | .keycap { 29 | font-size: 150%; 30 | } 31 | """; 32 | 33 | public SearchAndPasteListRow (uint? index, Snippet snippet) { 34 | this.snippet = snippet; 35 | 36 | var provider = new Gtk.CssProvider (); 37 | try { 38 | provider.load_from_data (KEYCAP_CSS, -1); 39 | } catch (Error e) { 40 | warning ("Failed to load custom CSS for keycap labels: %s", e.message); 41 | } 42 | 43 | var grid = new Gtk.Grid (); 44 | grid.column_spacing = 12; 45 | grid.row_spacing = 3; 46 | grid.margin = 12; 47 | grid.margin_bottom = grid.margin_top = 6; 48 | 49 | add (grid); 50 | 51 | if (index != null) { 52 | var shortcut = new Gtk.Label (index.to_string ()); 53 | shortcut.get_style_context ().add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_USER); 54 | shortcut.get_style_context ().add_class ("keycap"); 55 | shortcut.set_size_request (20, 25); 56 | grid.attach (shortcut, 0, 0, 1, 1); 57 | } 58 | 59 | var abbreviation = new Gtk.Label (snippet.abbreviation); 60 | abbreviation.get_style_context ().add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_USER); 61 | abbreviation.get_style_context ().add_class ("keycap"); 62 | abbreviation.set_size_request (20, 25); 63 | grid.attach (abbreviation, 1, 0, 1, 1); 64 | 65 | var sanitised_text = snippet.body.replace ("\n", ""); 66 | var text = new Gtk.Label (sanitised_text); 67 | text.get_style_context ().add_class ("h3"); 68 | text.ellipsize = Pango.EllipsizeMode.MIDDLE; 69 | text.lines = 1; 70 | text.single_line_mode = true; 71 | text.max_width_chars = 60; 72 | grid.attach (text, 2, 0, 1, 1); 73 | 74 | show_all (); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/Widgets/ShortcutEntry.vala: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 Marvin Beckers 2 | * 3 | * This program is free software: you can redistribute it 4 | * and/or modify it under the terms of the GNU General Public License as 5 | * published by the Free Software Foundation, either version 3 of the 6 | * License, or (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be 9 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11 | * Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see http://www.gnu.org/licenses/. 15 | */ 16 | 17 | public class SnippetPixie.ShortcutEntry : Gtk.TreeView { 18 | 19 | public signal void shortcut_changed (string new_shortcut); 20 | 21 | public ShortcutEntry (string accel) { 22 | var shortcut = new Shortcut.parse (accel); 23 | 24 | var cell_edit = new Gtk.CellRendererAccel (); 25 | cell_edit.editable = true; 26 | this.insert_column_with_attributes (-1, null, cell_edit, "text", 0); 27 | this.headers_visible = false; 28 | this.get_column (0).expand = true; 29 | 30 | cell_edit.accel_edited.connect ((path, key, mods) => { 31 | var new_shortcut = new Shortcut (key, mods); 32 | change_shortcut (path, new_shortcut); 33 | shortcut_changed (new_shortcut.to_gsettings ()); 34 | }); 35 | 36 | Gtk.TreeIter iter; 37 | var store = new Gtk.ListStore (1, typeof (string)); 38 | store.append (out iter); 39 | store.set (iter, 0, shortcut.to_readable ()); 40 | 41 | model = store; 42 | } 43 | 44 | private void change_shortcut (string path, Shortcut? shortcut) { 45 | Gtk.ListStore store = model as Gtk.ListStore; 46 | 47 | if (store == null) { 48 | return; 49 | } 50 | 51 | Gtk.TreeIter iter; 52 | 53 | if (store.get_iter (out iter, new Gtk.TreePath.from_string (path))) { 54 | store.set (iter, 0, shortcut.to_readable ()); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Widgets/SnippetsList.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.SnippetsList : Granite.Widgets.SourceList { 21 | public signal void selection_changed (Snippet snippet); 22 | 23 | public SnippetsListItem first_item { get; private set; default = null; } 24 | public SnippetsListItem last_item { get; private set; default = null; } 25 | public SnippetsListItem latest_item { get; private set; default = null; } 26 | 27 | public void set_snippets (Gee.Collection? snippets) { 28 | int snippet_id = 0; 29 | 30 | if (this.selected != null) { 31 | var current_item = this.selected as SnippetsListItem; 32 | snippet_id = current_item.snippet.id; 33 | } 34 | 35 | first_item = null; 36 | last_item = null; 37 | latest_item = null; 38 | root.clear (); 39 | 40 | if ( null != snippets && ! snippets.is_empty ) { 41 | SnippetsListItem item = null; 42 | 43 | foreach ( var snippet in snippets ) { 44 | item = new SnippetsListItem.from_snippet (snippet); 45 | root.add (item); 46 | 47 | if (first_item == null) { 48 | first_item = item; 49 | } 50 | 51 | if (snippet_id != 0 && snippet_id == snippet.id) { 52 | this.selected = item; 53 | } 54 | 55 | if (latest_item == null || snippet.id > latest_item.snippet.id) { 56 | latest_item = item; 57 | } 58 | } 59 | 60 | last_item = item; 61 | } 62 | } 63 | 64 | public override void item_selected (Granite.Widgets.SourceList.Item? item) { 65 | if (item is SnippetsListItem) { 66 | var list_item = item as SnippetsListItem; 67 | selection_changed (list_item.snippet); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/Widgets/SnippetsListItem.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.SnippetsListItem : Granite.Widgets.SourceList.Item { 21 | private Snippet _snippet; 22 | 23 | public SnippetsListItem.from_snippet (Snippet snippet) { 24 | this.snippet = snippet; 25 | } 26 | 27 | public Snippet snippet { 28 | get { return _snippet; } 29 | set { 30 | _snippet = value; 31 | name = _snippet.abbreviation; 32 | 33 | _snippet.notify["abbreviation"].connect ((s, p) => { 34 | name = _snippet.abbreviation; 35 | }); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Widgets/ViewStack.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.ViewStack : Gtk.Stack { 21 | private WelcomeView welcome; 22 | private Gtk.Entry abbreviation_entry; 23 | private FramedTextView body_entry; 24 | private Gtk.Button remove_button; 25 | private SnippetsList snippets_list; 26 | private bool form_updating = false; 27 | private bool abbr_updating = false; 28 | private bool search_changing = false; 29 | 30 | private string search_term = ""; 31 | 32 | construct { 33 | this.transition_type = Gtk.StackTransitionType.CROSSFADE; 34 | 35 | // Welcome view shown when no snippets saved. 36 | welcome = new WelcomeView(); 37 | 38 | // Snippets listed in left pane. 39 | var left_pane = new Gtk.Grid (); 40 | left_pane.orientation = Gtk.Orientation.VERTICAL; 41 | 42 | snippets_list = new SnippetsList(); 43 | snippets_list.selection_changed.connect (update_form); 44 | Application.get_default ().snippets_manager.snippets_changed.connect (update_ui); 45 | 46 | left_pane.add (snippets_list); 47 | 48 | // Snippet details in right pane. 49 | var snippet_form = new Gtk.Grid (); 50 | snippet_form.orientation = Gtk.Orientation.VERTICAL; 51 | snippet_form.margin = 12; 52 | snippet_form.row_spacing = 6; 53 | 54 | var abbreviation_label = new Gtk.Label (_("Abbreviation")); 55 | abbreviation_label.xalign = 0; 56 | snippet_form.add (abbreviation_label); 57 | 58 | abbreviation_entry = new Gtk.Entry (); 59 | abbreviation_entry.hexpand = true; 60 | abbreviation_entry.changed.connect (abbreviation_updated); 61 | snippet_form.add (abbreviation_entry); 62 | 63 | var body_label = new Gtk.Label (_("Body")); 64 | body_label.xalign = 0; 65 | snippet_form.add (body_label); 66 | 67 | body_entry = new FramedTextView (); 68 | body_entry.expand = true; 69 | body_entry.buffer.changed.connect (body_updated); 70 | snippet_form.add (body_entry); 71 | 72 | remove_button = new Gtk.Button.with_label (_("Remove Snippet")); 73 | remove_button.hexpand = true; 74 | remove_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); 75 | remove_button.clicked.connect (remove_snippet); 76 | snippet_form.add (remove_button); 77 | 78 | var main_hpaned = new Gtk.Paned (Gtk.Orientation.HORIZONTAL); 79 | main_hpaned.pack1 (left_pane, false, false); 80 | main_hpaned.pack2 (snippet_form, true, false); 81 | main_hpaned.position = 100; // TODO: Get from settings, enforce minimum. 82 | main_hpaned.show_all (); 83 | 84 | var not_found = new Granite.Widgets.Welcome ( _("No Snippets Found"), _("Please try entering a different search term.")); 85 | 86 | this.add_named (welcome, "welcome"); 87 | this.add_named (main_hpaned, "snippets"); 88 | this.add_named (not_found, "not_found"); 89 | this.show_all (); 90 | 91 | // Set up for filtering snippets by search box. 92 | snippets_list.set_filter_func (filter_snippets_by_search_term, false); 93 | Application.get_default ().search_changed.connect ((term) => { 94 | search_changing = true; 95 | search_term = term; 96 | snippets_list.refilter (); 97 | filter_ui (); 98 | search_changing = false; 99 | }); 100 | Application.get_default ().search_escaped.connect (() => { 101 | abbreviation_entry.grab_focus (); 102 | }); 103 | 104 | // Grab the current snippets. 105 | snippets_list.set_snippets (Application.get_default ().snippets_manager.snippets); 106 | } 107 | 108 | private void update_ui (Gee.ArrayList snippets, string reason = "update") { 109 | if (! abbr_updating) { 110 | snippets_list.set_snippets (snippets); 111 | 112 | if (snippets.size > 0 && reason == "remove" && search_term.length > 0) { 113 | filter_ui (); 114 | } 115 | } 116 | } 117 | 118 | private void filter_ui () { 119 | var item = snippets_list.get_first_child (snippets_list.root); 120 | if (item == null) { 121 | visible_child_name = "not_found"; 122 | } else { 123 | snippets_list.selected = item; 124 | visible_child_name = "snippets"; 125 | } 126 | } 127 | 128 | private void update_form (Snippet snippet) { 129 | form_updating = true; 130 | abbreviation_entry.text = snippet.abbreviation; 131 | body_entry.buffer.text = snippet.body; 132 | 133 | if (! abbr_updating && ! search_changing) { 134 | abbreviation_entry.grab_focus (); 135 | } 136 | form_updating = false; 137 | } 138 | 139 | private void abbreviation_updated () { 140 | if (form_updating) { 141 | return; 142 | } 143 | 144 | var item = snippets_list.selected as SnippetsListItem; 145 | 146 | if (item.snippet.abbreviation != abbreviation_entry.text) { 147 | abbr_updating = true; 148 | item.snippet.abbreviation = abbreviation_entry.text; 149 | Application.get_default ().snippets_manager.update (item.snippet); 150 | abbr_updating = false; 151 | } 152 | } 153 | 154 | private void body_updated () { 155 | if (form_updating) { 156 | return; 157 | } 158 | 159 | var item = snippets_list.selected as SnippetsListItem; 160 | 161 | if (item.snippet.body != body_entry.buffer.text) { 162 | abbr_updating = true; 163 | item.snippet.body = body_entry.buffer.text; 164 | Application.get_default ().snippets_manager.update (item.snippet); 165 | abbr_updating = false; 166 | } 167 | } 168 | 169 | private void remove_snippet () { 170 | var item = snippets_list.selected as SnippetsListItem; 171 | 172 | Application.get_default ().snippets_manager.remove (item.snippet); 173 | } 174 | 175 | public void select_item (SnippetsListItem item) { 176 | snippets_list.selected = item; 177 | } 178 | 179 | public void select_latest_item () { 180 | if (snippets_list.latest_item != null) { 181 | select_item (snippets_list.latest_item); 182 | } 183 | } 184 | 185 | public bool filter_snippets_by_search_term (Granite.Widgets.SourceList.Item item) { 186 | if (search_term.length == 0) { 187 | return true; 188 | } 189 | 190 | var snippet = ((SnippetsListItem) item).snippet; 191 | 192 | if (snippet.abbreviation.contains (search_term) || snippet.body.contains (search_term)) { 193 | return true; 194 | } 195 | 196 | if (! search_changing && snippets_list.selected != null && snippets_list.selected == item) { 197 | return true; 198 | } 199 | 200 | return false; 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /src/Widgets/WelcomeView.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.WelcomeView : Gtk.Grid { 21 | construct { 22 | var welcome = new Granite.Widgets.Welcome ( "Snippet Pixie", _("No snippets found.")); 23 | welcome.append ("document-new", _("Add Snippet"), _("Create your first snippet.")); 24 | welcome.append ("document-import", _("Import Snippets"), _("Import previously exported snippets.")); 25 | welcome.append ("help-contents", _("Quick Start Guide"), _("Learn the basics of how to use Snippet Pixie.")); 26 | 27 | add (welcome); 28 | 29 | welcome.activated.connect ((index) => { 30 | switch (index) { 31 | case 0: 32 | Utils.action_from_group (MainWindow.ACTION_ADD, Application.get_default ().app_window.actions).activate (null); 33 | 34 | break; 35 | case 1: 36 | Utils.action_from_group (MainWindow.ACTION_IMPORT, Application.get_default ().app_window.actions).activate (null); 37 | 38 | break; 39 | case 2: 40 | try { 41 | AppInfo.launch_default_for_uri ("https://www.snippetpixie.com/", null); 42 | } catch (Error e) { 43 | warning (e.message); 44 | } 45 | 46 | break; 47 | } 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Windows/MainWindow.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Byte Pixie Limited (https://www.bytepixie.com) 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301 USA 18 | */ 19 | 20 | public class SnippetPixie.MainWindow : Gtk.ApplicationWindow { 21 | public signal void search_changed (string search_term); 22 | public signal void search_escaped (); 23 | 24 | public weak SnippetPixie.Application app { get; construct; } 25 | 26 | public SimpleActionGroup actions { get; construct; } 27 | 28 | public const string ACTION_PREFIX = "win."; 29 | public const string ACTION_ADD = "action_add"; 30 | // public const string ACTION_UNDO = "action_undo"; 31 | // public const string ACTION_REDO = "action_redo"; 32 | public const string ACTION_IMPORT = "action_import"; 33 | public const string ACTION_EXPORT = "action_export"; 34 | public const string ACTION_SEARCH = "action_search"; 35 | public const string ACTION_ABOUT = "action_about"; 36 | 37 | public static Gee.MultiMap action_accelerators = new Gee.HashMultiMap (); 38 | 39 | private const ActionEntry[] action_entries = { 40 | { ACTION_ADD, action_add }, 41 | // { ACTION_UNDO, action_undo, null, 0 }, 42 | // { ACTION_REDO, action_redo, null, 0 }, 43 | { ACTION_IMPORT, action_import }, 44 | { ACTION_ABOUT, action_about } 45 | }; 46 | 47 | private Settings settings; 48 | private MainWindowHeader headerbar; 49 | private ViewStack main_view; 50 | 51 | public MainWindow (SnippetPixie.Application application) { 52 | Object ( 53 | app: application, 54 | height_request: 600, 55 | icon_name: Application.ID, 56 | resizable: true, 57 | title: "Snippet Pixie", 58 | width_request: 800 59 | ); 60 | } 61 | 62 | static construct { 63 | action_accelerators.set (ACTION_ADD, "n"); 64 | action_accelerators.set (ACTION_IMPORT, "o"); 65 | action_accelerators.set (ACTION_EXPORT, "s"); 66 | action_accelerators.set (ACTION_SEARCH, "f"); 67 | } 68 | 69 | construct { 70 | settings = new Settings (Application.ID); 71 | 72 | actions = new SimpleActionGroup (); 73 | actions.add_action_entries (action_entries, this); 74 | actions.add_action (settings.create_action ("autostart")); 75 | actions.add_action (settings.create_action ("auto-expand")); 76 | actions.add_action (settings.create_action ("search-selected-text")); 77 | actions.add_action (settings.create_action ("focus-search")); 78 | insert_action_group ("win", actions); 79 | 80 | foreach (var action in action_accelerators.get_keys ()) { 81 | var accels_array = action_accelerators[action].to_array (); 82 | accels_array += null; 83 | 84 | app.set_accels_for_action (ACTION_PREFIX + action, accels_array); 85 | } 86 | 87 | var window_x = settings.get_int ("window-x"); 88 | var window_y = settings.get_int ("window-y"); 89 | var window_width = settings.get_int ("window-width"); 90 | var window_height = settings.get_int ("window-height"); 91 | 92 | if (window_x != -1 || window_y != -1) { 93 | this.move (window_x, window_y); 94 | } 95 | 96 | if (window_width != -1 || window_width != -1) { 97 | this.set_default_size (window_width, window_height); 98 | } 99 | 100 | // Construct window's components. 101 | main_view = new ViewStack (); 102 | this.add (main_view); 103 | 104 | headerbar = new MainWindowHeader (); 105 | headerbar.search_changed.connect ((search_term) => { 106 | search_changed (search_term); 107 | }); 108 | headerbar.search_escaped.connect (() => { 109 | search_escaped (); 110 | }); 111 | this.set_titlebar (headerbar); 112 | 113 | // Depending on whether there are snippets or not, might set "snippets" visible etc. 114 | update_ui (app.snippets_manager.snippets); 115 | app.snippets_manager.snippets_changed.connect (update_ui); 116 | } 117 | 118 | private void update_ui (Gee.ArrayList snippets, string reason = "update") { 119 | SimpleAction export_action = (SimpleAction) actions.lookup_action (ACTION_EXPORT); 120 | SimpleAction search_action = (SimpleAction) actions.lookup_action (ACTION_SEARCH); 121 | 122 | if (snippets.size > 0) { 123 | if (reason != "remove") { 124 | main_view.visible_child_name = "snippets"; 125 | } 126 | 127 | if (export_action == null) { 128 | export_action = new SimpleAction (ACTION_EXPORT, null); 129 | export_action.activate.connect (action_export); 130 | actions.add_action (export_action); 131 | } 132 | if (search_action == null) { 133 | search_action = new SimpleAction (ACTION_SEARCH, null); 134 | search_action.activate.connect (action_search); 135 | actions.add_action (search_action); 136 | } 137 | } else { 138 | main_view.visible_child_name = "welcome"; 139 | 140 | if (export_action != null) { 141 | actions.remove_action (ACTION_EXPORT); 142 | } 143 | if (search_action != null) { 144 | actions.remove_action (ACTION_SEARCH); 145 | } 146 | } 147 | } 148 | 149 | private void action_add () { 150 | app.snippets_manager.add (new Snippet ()); 151 | main_view.select_latest_item (); 152 | } 153 | 154 | private void action_import () { 155 | var diag = new Gtk.FileChooserNative (_("Import Snippets"), this, Gtk.FileChooserAction.OPEN, _("Import"), null); 156 | var response = diag.run (); 157 | 158 | if (response == Gtk.ResponseType.ACCEPT) { 159 | var overwrite = false; 160 | if (app.snippets_manager.snippets.size > 0) { 161 | var cancel = false; 162 | var overwrite_diag = new Granite.MessageDialog.with_image_from_icon_name (_("Overwrite Duplicate Snippets?"), _("If any of the snippet abbreviations about to be imported already exist, do you want to skip importing them or update the existing snippet?"), "dialog-warning", Gtk.ButtonsType.NONE); 163 | overwrite_diag.add_button (_("Update Existing"), 1); 164 | overwrite_diag.add_button (_("Cancel"), 0); 165 | overwrite_diag.add_button (_("Skip Duplicates"), 2); 166 | overwrite_diag.set_default_response (2); 167 | overwrite_diag.response.connect ((response_id) => { 168 | switch (response_id) { 169 | case 1: 170 | overwrite = true; 171 | break; 172 | case 2: 173 | overwrite = false; 174 | break; 175 | default: 176 | cancel = true; 177 | break; 178 | } 179 | }); 180 | overwrite_diag.run (); 181 | overwrite_diag.destroy (); 182 | 183 | if (cancel) { 184 | return; 185 | } 186 | } 187 | 188 | var filepath = diag.get_filename (); 189 | var result = app.snippets_manager.import_from_file (filepath, overwrite); 190 | 191 | if (result == 0) { 192 | var cheer = new Granite.MessageDialog.with_image_from_icon_name (_("Imported Snippets"), _("Your snippets were successfully imported."), "document-import", Gtk.ButtonsType.CLOSE); 193 | cheer.run (); 194 | cheer.destroy (); 195 | } else { 196 | var boo = new Granite.MessageDialog.with_image_from_icon_name (_("Failed to import selected file"), _("Snippet Pixie can currently only import the JSON format files that it also exports."), "dialog-error", Gtk.ButtonsType.CLOSE); 197 | boo.run (); 198 | boo.destroy (); 199 | } 200 | } 201 | } 202 | 203 | private void action_export () { 204 | var diag = new Gtk.FileChooserNative (_("Export Snippets"), this, Gtk.FileChooserAction.SAVE, null, null); 205 | var response = diag.run (); 206 | 207 | if (response == Gtk.ResponseType.ACCEPT) { 208 | var filepath = diag.get_filename (); 209 | var result = app.snippets_manager.export_to_file (filepath); 210 | 211 | if (result == 0) { 212 | var cheer = new Granite.MessageDialog.with_image_from_icon_name (_("Exported Snippets"), _("Your snippets were successfully exported."), "document-export", Gtk.ButtonsType.CLOSE); 213 | cheer.run (); 214 | cheer.destroy (); 215 | } else { 216 | var boo = new Granite.MessageDialog.with_image_from_icon_name (_("Failed to export to file"), _("Something went wrong, sorry."), "dialog-error", Gtk.ButtonsType.CLOSE); 217 | boo.run (); 218 | boo.destroy (); 219 | } 220 | } 221 | } 222 | 223 | private void action_search () { 224 | if (headerbar.search_entry != null) { 225 | headerbar.search_entry.grab_focus (); 226 | } 227 | } 228 | 229 | private void action_about () { 230 | Gtk.AboutDialog dialog = new Gtk.AboutDialog (); 231 | dialog.set_destroy_with_parent (true); 232 | dialog.set_transient_for (this); 233 | dialog.set_modal (true); 234 | 235 | dialog.authors = {"@ianmjones https://github.com/ianmjones/"}; 236 | dialog.translator_credits = _("""@NathanBnm https://github.com/NathanBnm/ 237 | @Vistaus https://github.com/Vistaus/"""); 238 | 239 | dialog.program_name = "Snippet Pixie"; 240 | dialog.copyright = _("Copyright © Byte Pixie Limited"); 241 | dialog.logo_icon_name = Application.ID; 242 | dialog.version = Application.VERSION; 243 | 244 | dialog.license_type = Gtk.License.GPL_2_0; 245 | 246 | dialog.website = "https://www.snippetpixie.com/"; 247 | dialog.website_label = "www.snippetpixie.com"; 248 | 249 | dialog.response.connect ((response_id) => { 250 | if (response_id == Gtk.ResponseType.CANCEL || response_id == Gtk.ResponseType.DELETE_EVENT) { 251 | dialog.hide_on_delete (); 252 | } 253 | }); 254 | 255 | // Show the dialog: 256 | dialog.present (); 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /src/Windows/SearchAndPasteWindow.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Byte Pixie Limited (https://www.bytepixie.com) 3 | * Copyright (c) 2017 David Hewitt (https://github.com/davidmhewitt) 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public 16 | * License along with this program; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301 USA 19 | * 20 | * Based on Clipped's MainWindow.vala 21 | * https://github.com/davidmhewitt/clipped/blob/b00d44757cc2bf7bc9948d535668099db4ab9896/src/MainWindow.vala 22 | */ 23 | 24 | public class SnippetPixie.SearchAndPasteWindow : Gtk.Dialog { 25 | public signal void search_changed (string search_term); 26 | public signal void paste_snippet (Snippet snippet); 27 | 28 | private const string SEARCH_CSS = 29 | """ 30 | .large-search-entry { 31 | font-size: 175%; 32 | border: none; 33 | } 34 | """; 35 | 36 | private SearchAndPasteList list_box; 37 | private Gtk.Stack stack; 38 | private Gtk.SearchEntry search_headerbar; 39 | private Settings settings = new Settings (Application.ID); 40 | 41 | public SearchAndPasteWindow (Gee.ArrayList snippets, string selected_text) { 42 | Gtk.Container content_area = get_content_area () as Gtk.Container; 43 | 44 | if (content_area == null) { 45 | return; 46 | } 47 | 48 | icon_name = Application.ID; 49 | 50 | set_keep_above (true); 51 | window_position = Gtk.WindowPosition.CENTER; 52 | 53 | set_default_size (640, 480); 54 | 55 | search_headerbar = new Gtk.SearchEntry (); 56 | search_headerbar.placeholder_text = _("Search Snippets\u2026"); 57 | search_headerbar.hexpand = true; 58 | search_headerbar.text = selected_text; 59 | search_headerbar.key_press_event.connect ((event) => { 60 | switch (event.keyval) { 61 | case Gdk.Key.Escape: 62 | close (); 63 | return true; 64 | default: 65 | return false; 66 | } 67 | }); 68 | search_headerbar.search_changed.connect (() => { 69 | search_changed (search_headerbar.text); 70 | }); 71 | 72 | var font_size_provider = new Gtk.CssProvider (); 73 | try { 74 | font_size_provider.load_from_data (SEARCH_CSS, -1); 75 | } catch (Error e) { 76 | warning ("Failed to load CSS style for search box: %s", e.message); 77 | } 78 | var style_context = search_headerbar.get_style_context (); 79 | style_context.add_provider (font_size_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); 80 | style_context.add_class ("large-search-entry"); 81 | 82 | var list_box_scroll = new Gtk.ScrolledWindow (null, null); 83 | list_box_scroll.vexpand = true; 84 | list_box = new SearchAndPasteList (); 85 | list_box_scroll.add (list_box); 86 | list_box_scroll.show_all (); 87 | 88 | list_box.row_activated.connect ((row) => { 89 | SearchAndPasteListRow sprow = row as SearchAndPasteListRow; 90 | 91 | if (sprow == null) { 92 | return; 93 | } 94 | 95 | paste_snippet (sprow.snippet); 96 | destroy (); 97 | }); 98 | 99 | var not_found = new Granite.Widgets.Welcome ( _("No Snippets Found"), _("Please try entering a different search term.")); 100 | var no_snippets = new Granite.Widgets.Welcome ( _("No Snippets Found"), _("Please add some snippets!")); 101 | 102 | stack = new Gtk.Stack (); 103 | stack.add_named (list_box_scroll, "listbox"); 104 | stack.add_named (not_found, "not_found"); 105 | stack.add_named (no_snippets, "no_snippets"); 106 | 107 | foreach (var snippet in snippets) { 108 | add_snippet (snippet); 109 | } 110 | 111 | content_area.add (stack); 112 | 113 | key_press_event.connect ((event) => { 114 | switch (event.keyval) { 115 | case Gdk.Key.@0: 116 | case Gdk.Key.@1: 117 | case Gdk.Key.@2: 118 | case Gdk.Key.@3: 119 | case Gdk.Key.@4: 120 | case Gdk.Key.@5: 121 | case Gdk.Key.@6: 122 | case Gdk.Key.@7: 123 | case Gdk.Key.@8: 124 | case Gdk.Key.@9: 125 | if (!search_headerbar.is_focus) { 126 | uint val = event.keyval - Gdk.Key.@0; 127 | if (val == 0) { 128 | val = 10; 129 | } 130 | list_box.select_row (list_box.get_row_at_index ((int)val - 1)); 131 | var rows = list_box.get_selected_rows (); 132 | if (rows.length () > 0) { 133 | rows.nth_data (0).grab_focus (); 134 | } 135 | list_box.activate_cursor_row (); 136 | return true; 137 | } 138 | 139 | break; 140 | case Gdk.Key.Down: 141 | case Gdk.Key.Up: 142 | bool has_selection = list_box.get_selected_rows ().length () > 0; 143 | if (!has_selection) { 144 | list_box.select_row (list_box.get_row_at_index (0)); 145 | } 146 | var rows = list_box.get_selected_rows (); 147 | if (rows.length () > 0) { 148 | rows.nth_data (0).grab_focus (); 149 | } 150 | if (has_selection) { 151 | list_box.key_press_event (event); 152 | } 153 | return true; 154 | case Gdk.Key.Return: 155 | bool has_selection = list_box.get_selected_rows ().length () > 0; 156 | if (has_selection && Gdk.ModifierType.SHIFT_MASK in event.state) { 157 | list_box.activate_cursor_row (); 158 | return true; 159 | } 160 | return false; 161 | default: 162 | break; 163 | } 164 | 165 | if (event.keyval != Gdk.Key.Escape && event.keyval != Gdk.Key.Shift_L && event.keyval != Gdk.Key.Shift_R && !search_headerbar.is_focus) { 166 | search_headerbar.grab_focus (); 167 | search_headerbar.key_press_event (event); 168 | return true; 169 | } 170 | return false; 171 | }); 172 | 173 | set_titlebar (search_headerbar); 174 | 175 | show_all (); 176 | 177 | if (settings.get_boolean ("focus-search")) { 178 | search_headerbar.grab_focus (); 179 | } 180 | 181 | update_stack_visibility (); 182 | } 183 | 184 | public void add_snippet (Snippet snippet) { 185 | uint? index = list_box.get_children ().length () + 1; 186 | if (index == 10) { 187 | index = 0; 188 | } 189 | if (index > 10) { 190 | index = null; 191 | } 192 | list_box.add (new SearchAndPasteListRow (index, snippet)); 193 | update_stack_visibility (); 194 | } 195 | 196 | private void update_stack_visibility () { 197 | if (list_box.get_children ().length () > 0) { 198 | stack.visible_child_name = "listbox"; 199 | } else if (Application.get_default ().snippets_manager.snippets.size > 0) { 200 | stack.visible_child_name = "not_found"; 201 | } else { 202 | stack.visible_child_name = "no_snippets"; 203 | } 204 | } 205 | 206 | public void clear_list () { 207 | foreach (var child in list_box.get_children ()) { 208 | list_box.remove (child); 209 | } 210 | update_stack_visibility (); 211 | } 212 | } 213 | --------------------------------------------------------------------------------