84 Commits
2.2.0 ... 3.0.0

Author SHA1 Message Date
Clement Lefebvre
215f6c7791 3.0.0 2021-06-01 12:56:50 +01:00
Clement Lefebvre
c8e8994410 l10n: Update POT 2021-06-01 12:56:11 +01:00
Justin Schiff
1cd2ed7b4c Use CLAMP macro instead 2021-05-15 13:52:45 -04:00
Justin Schiff
a48dab6ef5 Uses strtol instead of atoi so that we can properly handle errors.
This now handles overflow and underflow correctly, by parsing the string
and then clamping the value between INT_MIN and INT_MAX. `atoi` was
giving us garbage values when the buffer overflowed.

Fixes #408
2021-05-15 13:52:45 -04:00
okaestne
5b769045f0 Fix crashes when no documents (tabs) are open
Two crashes are possible:

1. Fixes #450 (toggle overview map without any open tabs/docs)
2. Pressing ESC (e.g. to close searchbar) without any tabs open
2021-04-30 13:24:57 -04:00
Michael Webster
8ff2d3fd74 i18n: Don't translate gsettings strings.
It's not useful for anything, and only adds more work for
translators.
2021-04-30 12:20:18 -04:00
okaestne
5b7c1d936e Implement #225: Options to render whitespace
Add preferences to enable displaying whitespace (tabs, spaces, nbsp and newlines).
Options allow to choose locations (leading, inside text, trailing) of whitespace to display and to disable rendering of newline chars.
2021-04-30 12:19:18 -04:00
Soapux
423f214a70 Fix permissions 2021-02-22 11:18:08 -05:00
Talkashie
c469e1345c Fix various typos in index.docbook 2021-02-19 10:09:33 -05:00
Clement Lefebvre
ef0979b2d3 2.8.4 2021-01-02 17:36:34 +00:00
Clement Lefebvre
fc80c90843 l10n: Update translations 2021-01-02 17:27:18 +00:00
Eli Schwartz
3940e04530 fixup! cleanup: remove code dropped in commit 67892da099
Also drop function that is now unused once the previous unused code got
removed.
2020-12-14 08:39:04 -05:00
Clement Lefebvre
83597ba864 2.8.3 2020-12-14 08:11:51 +00:00
Clement Lefebvre
7d8538b748 Packaging: Add missing dependency on gir1.2-gtksource-4 2020-12-14 08:11:10 +00:00
Clement Lefebvre
4429a455f4 2.8.2 2020-12-10 12:19:44 +00:00
Clement Lefebvre
2229d826c4 l10n: Update translations 2020-12-10 12:14:08 +00:00
Clement Lefebvre
ba9bcf2244 2.8.1 2020-12-08 10:11:29 +00:00
Clement Lefebvre
10e9a275c8 Remove links in plugin about dialogs
They're all maintained as part of the Xed project, which link is already
present in the main help about dialog.
2020-12-02 16:41:09 +00:00
Clement Lefebvre
18d3ebf460 bracketcompletion: Enable plugin by default
That's typically a feature casual users would't want by default but programmers
would.

Since it only affects programming languages (not plain text), enable it by default.
2020-12-02 16:41:09 +00:00
Eli Schwartz
76b2fcba7b remove never-used variable added in commit 9e805380d4 2020-12-01 20:15:26 -05:00
Eli Schwartz
d41e63a340 cleanup: remove code dropped in commit 67892da099 2020-12-01 20:15:26 -05:00
Clement Lefebvre
c7455d5f23 2.8.0 2020-11-30 11:26:10 +00:00
Clement Lefebvre
6168aee699 l10n: Update POT 2020-11-30 11:25:01 +00:00
Michael Webster
f4be97d79d meson.build: bump xapp version. 2020-11-11 23:33:37 -05:00
Michael Webster
9e805380d4 Add XAppFavorites support to the file menu.
This adds a Favorites submenu, and it moves the recent list into
a submenu.

See:
c9c885a841
2020-11-11 23:21:51 -05:00
Hrutvik Suthar
15b607ddc0 auto bracket complete feature
- added bracket-complete dir in plugins
  - gtksourceview min depedency change to 4.0.3
2020-10-05 11:57:39 -04:00
JosephMcc
4dcfaada50 xed-completion-plugin.c: Clean up the code style 2020-09-22 09:45:42 -04:00
JosephMcc
3bf1b62a34 xed-highlight-mode-dialog/selector: Clean up code style
Fix a few indentation errors and convert tabs to spaces.
2020-09-22 09:45:17 -04:00
JosephMcc
33d035aac7 textsize plugin: Zoom text regardless of selection
Currently when zooming text with something selected, only the selected
text is zoomed. There doesn't seem to be any real use for this behavior.
Instead just zoom the full document regardless of selection. This also
simplifies the plugin a good bit.

Closes: https://github.com/linuxmint/xed/issues/327
2020-09-22 09:44:23 -04:00
JosephMcc
a71e7eea3a xed-highlight-mode-selector.c: Fix a couple of missing casts 2020-09-07 10:26:08 -04:00
JosephMcc
7e6a888e1d Clean up remaining deprecated preprocessor commands 2020-09-07 10:25:40 -04:00
JosephMcc
36b625be6a plugins: Clean up deprecated preprcessor commands 2020-09-07 10:25:25 -04:00
JosephMcc
5a3fc97c6a Add a new window desktop action
This allows you to open a new window with the GWL "New Window" entry

Fixes: https://github.com/linuxmint/xed/issues/393
2020-09-07 09:04:33 -04:00
JosephMcc
3ca66d6fb6 Port to Gtksourceview4
This allows us access to some newer fixes since the older version is no
longer being worked on.

Fixes: https://github.com/linuxmint/xed/issues/395
2020-08-27 17:59:37 +02:00
Clement Lefebvre
22ddcc04e0 2.6.2 2020-06-24 12:45:16 +01:00
Clement Lefebvre
63f9ac4baf CI: Update targets 2020-06-24 12:44:49 +01:00
Clement Lefebvre
68ef65bedb 2.6.1 2020-06-24 12:06:49 +01:00
Clement Lefebvre
f9cd2e8048 l10n: Update translations 2020-06-24 12:06:29 +01:00
Clement Lefebvre
19bb11e8a0 l10n: Update POT 2020-06-21 12:41:10 +01:00
NikoKrause
8f28449081 l10n: add missing strings for new plugin joinlines (#385) 2020-06-21 12:40:38 +01:00
Clement Lefebvre
8bb308de4f 2.6.0 2020-05-11 13:59:29 +01:00
Clement Lefebvre
0cb924853d l10n: Update translations 2020-05-11 13:55:00 +01:00
Clement Lefebvre
14896668d3 l10n: Update POT 2020-05-11 12:54:57 +01:00
JosephMcc
8b0f775e7e taglist: Use a symbolic icon in the notebook sidebar 2020-04-29 12:47:29 -04:00
icarter09
385d32dbfc Added JoinLines plugin. Removed logic to split lines. Moved Join Line shortcut from Layout to Editing section. 2020-04-23 10:37:40 -04:00
Isaac Carter
2bb61b9190 Update README.md 2020-04-20 18:33:30 -04:00
icarter09
c8a0150fd4 Added screen captures to README. Changed README to README.md and added markdown. Updated README with plugins and debian build instructions. 2020-04-20 12:58:35 -04:00
icarter09
6f58fd2f2c Added wait entry to man page. Removed logic that cause wait to open extra tab. 2020-04-10 09:50:19 -04:00
icarter09
b6483090b6 Changed shortcut window to be non-model. 2020-04-06 11:54:19 -04:00
icarter09
5e9e34ed60 Cleaned up broken links. 2020-04-06 11:41:48 -04:00
Isaac Carter
6bbcc343dd Fixed memory issue found by valgrind (#366) 2020-04-06 07:34:48 -07:00
Clement Lefebvre
1d39305c1c Packaging: Remove python dependency 2020-04-02 18:42:30 +01:00
icarter09
45bcb345e8 Added logic to check if the focus need to be set. Squashed formatting commits. 2020-03-11 12:27:33 -04:00
icarter09
d1833f6591 Added logic to support using replace all across documents. 2020-03-11 11:54:44 -04:00
icarter09
8a98e18511 Created new section for the Word Wrap shortcut. Increased height attribute to fit new section so a new page is not created. 2020-03-11 11:46:50 -04:00
icarter09
c3b8a73695 Removed link that was not working. 2020-03-11 11:04:41 -04:00
icarter09
7302b14f78 Removed override_dh_auto_test so tests are not ran by default when building with dpkg. 2020-02-06 13:28:45 -05:00
icarter09
5a16a65643 Created initial test dir. Created File menu test.
Added test for Help menu.

Created test case for Toolbar.

Updated meson build for test. Removed unnecessary file.
2020-02-06 13:28:45 -05:00
Stephen Collins
d5a48be670 Add settings widget to the prefs dialog for the implicit newline setting
The setting was already available in the schema and implemented in xed itself, but wasn't exposed in the preferences dialog.
2020-01-07 23:22:32 -05:00
Clement Lefebvre
bfa1fa0e00 l10n: Update translations 2020-01-06 11:40:30 +00:00
Stephen Collins
c19752ec31 Add .gitignore file 2019-12-16 11:44:14 -05:00
Michael Webster
4eaddc1cb7 xed-tab-label.c: Apply tab tooltip to the box containing the tab's
label and icon, regression from 808e77b052.
2019-12-16 11:34:39 -05:00
Stephen Collins
808e77b052 xed-tab-label.c: remove unused event box preventing scroll events
It doesn't seem to do anything except intercept scroll events, which are used to switch tabs.
2019-12-16 11:03:04 -05:00
Stephen Collins
5e2c6f0369 Trailsave plugin: remove second trailing line
The intention was that there should be one empty line left at the end of the file, but the GtkSourceBuffer adds it's own empty line if the implicit_trailing_newline property is true (currently the default behavior in xed), which means we usually end up with 2 lines instead of one. This would change the behavior so that we always end up with no more than one line at the end of the file.
2019-12-16 10:51:39 -05:00
Stephen Collins
55e386beef Disable the comments action when not supported to avoid confusion 2019-12-16 10:37:30 -05:00
Clement Lefebvre
5fae2771c8 2.4.2 2019-12-11 14:49:51 +00:00
Clement Lefebvre
c912a44774 l10n: Update translations 2019-12-11 14:49:23 +00:00
Clement Lefebvre
0d006777fc 2.4.1 2019-11-26 17:14:41 +00:00
Clement Lefebvre
2e074fd0ed l10n: Update translations 2019-11-26 17:14:17 +00:00
Clement Lefebvre
8a0c1f6e08 2.4.0 2019-11-22 12:12:34 +00:00
Clement Lefebvre
3e37213b5e Print preview: Reuse existing msgid 2019-11-22 12:11:17 +00:00
Clement Lefebvre
b7ee3bf83b open-uri: Simplify and fix translations
- Remove niche feature to download source code.
- Reuse existing msgid "Open '%s'"
- Fix gettext domain
2019-11-22 12:06:37 +00:00
Clement Lefebvre
359fcb87c5 open-uri: Make the plugin built-in 2019-11-22 11:52:16 +00:00
Leigh Scott
a549184217 add open uri plugin (#317) 2019-11-22 11:47:56 +00:00
Pavel Shlyak
eda7a9a23c Cleanup (#321)
The left side of the expression was always true
2019-11-14 17:56:44 +01:00
nardholio
4dff6fa7e1 Packaging: remove dependency on libpeas-1.0-0-python3loader (#325)
This is now provided as a virtual package
2019-11-14 17:55:49 +01:00
Michael Webster
8763fbf5df print-preview: add a print button to the preview toolbar, to immediately
print the previewed document.
2019-11-05 20:07:35 -05:00
Clement Lefebvre
9d3d2acfd9 2.2.3 2019-07-28 15:03:56 +02:00
Clement Lefebvre
96d6a9c0fb l10n: Update translations 2019-07-28 15:03:22 +02:00
Clement Lefebvre
7cc3d5967b 2.2.2 2019-07-25 11:00:12 +02:00
Clement Lefebvre
54978e6e8f Preferences: Make dialog slightly taller 2019-07-23 12:11:14 +02:00
Clement Lefebvre
69895bd026 2.2.1 2019-07-10 11:26:30 +02:00
Clement Lefebvre
3066879089 l10n: Update translations 2019-07-10 11:26:03 +02:00
Alexander Drozdov
f4c882e3b5 Automatically open new Xed window on current workspace... (#319)
...if it wasn't already opened. Otherwise, open new tab
in Xed window on current Workspace.

Fix regression #318
2019-07-10 11:24:52 +02:00
215 changed files with 54277 additions and 36946 deletions

View File

@@ -46,19 +46,19 @@ shared: &shared
fi
jobs:
"mint19":
"mint20":
<<: *shared
docker:
- image: linuxmintd/mint19-amd64
- image: linuxmintd/mint20-amd64
"lmde3":
"lmde4":
<<: *shared
docker:
- image: linuxmintd/lmde3-amd64
- image: linuxmintd/lmde4-amd64
workflows:
version: 2
build:
jobs:
- "mint19"
- "lmde3"
- "mint20"
- "lmde4"

12
.gitignore vendored Normal file
View File

@@ -0,0 +1,12 @@
# Specify filepatterns you want git to ignore.
debian/tmp/
debian/build/
debian/.debhelper/
debian/xed/
debian/xed-common/
debian/xed-dbg/
debian/xed-dev/
debian/xed-doc/
debian/files
debian/*.log
debian/*.substvars

41
README
View File

@@ -1,41 +0,0 @@
General Information
===================
xed is a small and lightweight text editor.
xed supports most standard editing features, plus several not found in your
average text editor (plugins being the most notable of these).
Although new features are always under development, currently xed has:
* Complete support for UTF-8 text
* Syntax highlighting
* Support for editing remote files
* Search and Replace
* Printing and Print Previewing Support
* File Revert
* A complete preferences interface
* Configurable Plugin system, with optional python support
Some of the plugins, packaged and installed with xed include, among others:
* Word count
* Spell checker
* Change case of selected text
* File Browser
* Sort
* Insert Date/Time
* Tag list
xed is released under the GNU General Public License (GPL) version 2, see
the file 'COPYING' for more information.
Installation
============
Simple install procedure:
% meson . build # run the `configure' script
% ninja -v -C build # build xed
[ Become root if necessary ]
% ninja install -v -C build # install xed

74
README.md Normal file
View File

@@ -0,0 +1,74 @@
# Xed Text Editor
xed is a small and lightweight text editor.
xed supports most standard editing features, plus several not found in your
average text editor (plugins being the most notable of these).
Although new features are always under development, currently xed has:
* Complete support for UTF-8 text
* Syntax highlighting
* Support for editing remote files
* Search and Replace
* Printing and Print Previewing Support
* File Revert
* A complete preferences interface
* Configurable Plugin system, with optional python support
Some of the plugins, packaged and installed with xed include, among others:
* Change Case
* Document Statistics
* File Browser
* Indent Lines
* Insert Date/Time
* Modelines
* Save Without Trailing Spaces
* Sort
* Spell checker
* Tag list
* Word Completion
## Installation
```
1. run the 'configure' script
# meson --prefix=/usr build
2. build xed
# ninja -v -C build
3. install xed
# sudo ninja install -v -C build
** Build Instructions for Debian-based distros **
1. run "dpkg-buildpackage" from the xed base directory
2. cd ..
3. run
# sudo dpkg -i *.deb
4. From then, any new changes can be applied by running
# sudo ninja -C debian/build install
```
### Xed look and feel
##### Classic Mode
![classic-screenshot](/screencaptures/classic_screencapture.png?raw=true)
##### Theme selections
![theme-screenshot](/screencaptures/theme_screencapture.png?raw=true)
##### Search and Replace feature
![search-replace-screenshot](/screencaptures/search_replace_screencapture.png?raw=true)
##### Select from several languages in Highlight syntax mode
![highlightmode-screenshot](/screencaptures/highlightmode_screencapture.png?raw=true)
##### Xed Shortcuts
![shortcuts-1-screenshot](/screencaptures/shortcuts_1_screencapture.png?raw=true)
![shortcuts-2-screenshot](/screencaptures/shortcuts_2_screencapture.png?raw=true)
> xed is released under the GNU General Public License (GPL) version 2, see
> the file 'COPYING' for more information.

View File

@@ -167,6 +167,36 @@
<description>Whether xed will ensure that documents always end with a trailing newline.</description>
</key>
<key name="draw-whitespace" type="b">
<default>false</default>
<summary>Draw whitespace</summary>
<description>Whether xed should render whitespace</description>
</key>
<key name="draw-whitespace-leading" type="b">
<default>false</default>
<summary>Draw leading whitespace</summary>
<description>Whether xed should render leading whitespace</description>
</key>
<key name="draw-whitespace-inside" type="b">
<default>false</default>
<summary>Draw whitespace within text</summary>
<description>Whether xed should render whitespace between words and characters</description>
</key>
<key name="draw-whitespace-trailing" type="b">
<default>false</default>
<summary>Draw trailing whitespace</summary>
<description>Whether xed should render trailing whitespace</description>
</key>
<key name="draw-whitespace-newline" type="b">
<default>false</default>
<summary>Draw newline characters</summary>
<description>Whether xed should render newline characters</description>
</key>
</schema>
<schema gettext-domain="@GETTEXT_PACKAGE@" id="org.x.editor.preferences.ui" path="/org/x/editor/preferences/ui/">
@@ -338,7 +368,7 @@
<schema gettext-domain="@GETTEXT_PACKAGE@" id="org.x.editor.plugins" path="/org/x/editor/plugins/">
<key name="active-plugins" type="as">
<default>[ 'docinfo', 'modelines', 'filebrowser', 'spell', 'time' ]</default>
<default>[ 'docinfo', 'modelines', 'filebrowser', 'spell', 'time', 'bracketcompletion' ]</default>
<summary>Active plugins</summary>
<description>List of active plugins. It contains the "Location" of the active plugins. See the .xed-plugin file for obtaining the "Location" of a given plugin.</description>
</key>

View File

@@ -42,6 +42,9 @@ Output version information and exit
\fB\-?, \-h, \-\-help\fR
Print standard command line options.
.TP
\fB\-w, \-\-wait\fR
Open files and block the xed process.
.TP
\fB\-\-help\-all\fR
Print all command line options.
.P

View File

@@ -10,3 +10,8 @@ Icon=accessories-text-editor
Categories=GTK;Utility;TextEditor;
Keywords=text;editor;tabs;highlighting;code;multiple;files;pluggable;notepad;
X-MATE-DocPath=xed/xed.xml
Actions=new-window;
[Desktop Action new-window]
Name=New Window
Exec=xed --new-window %U

210
debian/changelog vendored
View File

@@ -1,3 +1,213 @@
xed (3.0.0) uma; urgency=medium
[ Talkashie ]
* Fix various typos in index.docbook
[ Soapux ]
* Fix permissions
[ okaestne ]
* Implement #225: Options to render whitespace
[ Michael Webster ]
* i18n: Don't translate gsettings strings.
[ okaestne ]
* Fix crashes when no documents (tabs) are open
[ Justin Schiff ]
* Uses strtol instead of atoi so that we can properly handle errors.
* Use CLAMP macro instead
[ Clement Lefebvre ]
* l10n: Update POT
-- Clement Lefebvre <root@linuxmint.com> Tue, 01 Jun 2021 12:56:22 +0100
xed (2.8.4) ulyssa; urgency=medium
[ Eli Schwartz ]
* fixup! cleanup: remove code dropped in commit 67892da099357e24b3fd3c31fa758947b1dfc47a
[ Clement Lefebvre ]
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Sat, 02 Jan 2021 17:33:30 +0000
xed (2.8.3) ulyssa; urgency=medium
* Packaging: Add missing dependency on gir1.2-gtksource-4
-- Clement Lefebvre <root@linuxmint.com> Mon, 14 Dec 2020 08:11:29 +0000
xed (2.8.2) ulyssa; urgency=medium
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Thu, 10 Dec 2020 12:14:34 +0000
xed (2.8.1) ulyssa; urgency=medium
[ Eli Schwartz ]
* cleanup: remove code dropped in commit 67892da099357e24b3fd3c31fa758947b1dfc47a
* remove never-used variable added in commit 9e805380d4aa6338ca1b85d06b5dbf60e9fb0cbe
[ Clement Lefebvre ]
* bracketcompletion: Enable plugin by default
* Remove links in plugin about dialogs
-- Clement Lefebvre <root@linuxmint.com> Tue, 08 Dec 2020 10:11:12 +0000
xed (2.8.0) ulyssa; urgency=medium
[ JosephMcc ]
* Port to Gtksourceview4
* Add a new window desktop action
* plugins: Clean up deprecated preprcessor commands
* Clean up remaining deprecated preprocessor commands
* xed-highlight-mode-selector.c: Fix a couple of missing casts
* textsize plugin: Zoom text regardless of selection
* xed-highlight-mode-dialog/selector: Clean up code style
* xed-completion-plugin.c: Clean up the code style
[ Hrutvik Suthar ]
* auto bracket complete feature - added bracket-complete dir in plugins - gtksourceview min depedency change to 4.0.3
[ Michael Webster ]
* Add XAppFavorites support to the file menu.
* meson.build: bump xapp version.
[ Clement Lefebvre ]
* l10n: Update POT
-- Clement Lefebvre <root@linuxmint.com> Mon, 30 Nov 2020 11:25:34 +0000
xed (2.6.2) ulyana; urgency=medium
* CI: Update targets
-- Clement Lefebvre <root@linuxmint.com> Wed, 24 Jun 2020 12:44:58 +0100
xed (2.6.1) ulyana; urgency=medium
[ NikoKrause ]
* l10n: add missing strings for new plugin joinlines (#385)
[ Clement Lefebvre ]
* l10n: Update POT
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Wed, 24 Jun 2020 12:06:37 +0100
xed (2.6.0) ulyana; urgency=medium
[ Stephen Collins ]
* Disable the comments action when not supported to avoid confusion
* Trailsave plugin: remove second trailing line
* xed-tab-label.c: remove unused event box preventing scroll events
[ Michael Webster ]
* xed-tab-label.c: Apply tab tooltip to the box containing the tab's label and icon, regression from 808e77b052322b8f.
[ Stephen Collins ]
* Add .gitignore file
[ Clement Lefebvre ]
* l10n: Update translations
[ Stephen Collins ]
* Add settings widget to the prefs dialog for the implicit newline setting
[ icarter09 ]
* Created initial test dir. Created File menu test.
* Removed override_dh_auto_test so tests are not ran by default when building with dpkg.
* Removed link that was not working.
* Created new section for the Word Wrap shortcut. Increased height attribute to fit new section so a new page is not created.
* Added logic to support using replace all across documents.
* Added logic to check if the focus need to be set. Squashed formatting commits.
[ Clement Lefebvre ]
* Packaging: Remove python dependency
[ Isaac Carter ]
* Fixed memory issue found by valgrind (#366)
[ icarter09 ]
* Cleaned up broken links.
* Changed shortcut window to be non-model.
* Added wait entry to man page. Removed logic that cause wait to open extra tab.
* Added screen captures to README. Changed README to README.md and added markdown. Updated README with plugins and debian build instructions.
[ Isaac Carter ]
* Update README.md
[ icarter09 ]
* Added JoinLines plugin. Removed logic to split lines. Moved Join Line shortcut from Layout to Editing section.
[ JosephMcc ]
* taglist: Use a symbolic icon in the notebook sidebar
[ Clement Lefebvre ]
* l10n: Update POT
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Mon, 11 May 2020 13:58:58 +0100
xed (2.4.2) tricia; urgency=medium
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Wed, 11 Dec 2019 14:49:32 +0000
xed (2.4.1) tricia; urgency=medium
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Tue, 26 Nov 2019 17:14:23 +0000
xed (2.4.0) tricia; urgency=medium
[ Michael Webster ]
* print-preview: add a print button to the preview toolbar, to immediately print the previewed document.
[ nardholio ]
* Packaging: remove dependency on libpeas-1.0-0-python3loader (#325)
[ Pavel Shlyak ]
* Cleanup (#321)
[ Leigh Scott ]
* add open uri plugin (#317)
[ Clement Lefebvre ]
* open-uri: Make the plugin built-in
* open-uri: Simplify and fix translations
* Print preview: Reuse existing msgid
-- Clement Lefebvre <root@linuxmint.com> Fri, 22 Nov 2019 12:12:12 +0000
xed (2.2.3) tina; urgency=medium
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Sun, 28 Jul 2019 15:03:33 +0200
xed (2.2.2) tina; urgency=medium
* Preferences: Make dialog slightly taller
-- Clement Lefebvre <root@linuxmint.com> Thu, 25 Jul 2019 10:59:55 +0200
xed (2.2.1) tina; urgency=medium
[ Alexander Drozdov ]
* Automatically open new Xed window on current workspace... (#319)
[ Clement Lefebvre ]
* l10n: Update translations
-- Clement Lefebvre <root@linuxmint.com> Wed, 10 Jul 2019 11:26:12 +0200
xed (2.2.0) tina; urgency=medium
[ Eli Schwartz ]

11
debian/control vendored
View File

@@ -10,9 +10,9 @@ Build-Depends: debhelper (>= 9),
libglib2.0-dev,
libgspell-1-dev,
libgtk-3-dev,
libgtksourceview-3.0-dev,
libgtksourceview-4-dev,
libpeas-dev,
libxapp-dev,
libxapp-dev (>= 1.9),
libsm-dev,
libx11-dev,
libxml2-dev,
@@ -30,10 +30,10 @@ Depends: iso-codes,
${misc:Depends},
${python:Depends},
${shlibs:Depends},
libpeas-1.0-0-python3loader | debian-system-adjustments,
python3,
python3-gi,
xapps-common,
gir1.2-gtksource-4,
xapps-common (>= 1.9.0),
zenity
XB-Python-Version: ${python:Versions}
Description: Text editor
@@ -54,8 +54,7 @@ Description: Text editor
Package: xed-common
Architecture: all
Depends: python,
${misc:Depends},
Depends: ${misc:Depends},
Description: Text editor (common files)
Xed is a text editor which supports most standard editor features,
extending this basic functionality with other features not usually

6
debian/copyright vendored
View File

@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: xed (old name: mate-text-editor)
Upstream-Contact: Stefano Karapetsas <stefano@karapetsas.com>
Source: http://git.mate-desktop.org/xed/
Upstream-Name: xed
Upstream-Contact: Linux Mint <root@linuxmint.com>
Source: http://github.com/linuxmint/xed/
Files: plugins/docinfo/xed-docinfo-plugin.c
plugins/docinfo/xed-docinfo-plugin.h

3
debian/rules vendored
View File

@@ -15,9 +15,6 @@ override_dh_auto_configure:
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_auto_test:
ninja -C debian/build test
override_dh_strip:
dh_strip --dbg-package=xed-dbg

View File

@@ -472,6 +472,8 @@ xed_warning
xed_utils_make_valid_utf8
xed_utils_uri_get_dirname
xed_utils_replace_home_dir_with_tilde
xed_utils_get_current_workspace
xed_utils_get_window_workspace
xed_utils_activate_url
xed_utils_is_valid_uri
xed_utils_get_glade_widgets

View File

@@ -292,7 +292,7 @@
</listitem>
</orderedlist>
<para>Valid types of <replaceable>URI</replaceable> include <literal>http:</literal>, <literal>ftp:</literal>, <literal>file:</literal>, and all of the methods supported by <literal>gvfs</literal>.</para>
<para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because because not all FTP servers may correctly work with saving remote files.</para>
<para>Files from some types of URI are opened as read-only, and any changes you make must be saved to a different location. HTTP only allows files to be read. Files opened from FTP are read-only because not all FTP servers may correctly work with saving remote files.</para>
</sect2>
<!-- ============= Working with tabs ======================== -->
@@ -350,7 +350,7 @@
</listitem>
<listitem><para>Type the string that you want to find in the <guilabel>Search for</guilabel> field. You can include special characters such as a new line or tab: see <xref linkend="xed-find-escapes"/>.</para>
</listitem>
<listitem><para>Click <guibutton>Find</guibutton> to search the file for the first occurrence of the string after your current cursor position. If <application>&app;</application> finds the string, the application selects first occurrence of the string. Other occurrences of the string are highlighted.</para>
<listitem><para>Click <guibutton>Find</guibutton> to search the file for the first occurrence of the string after your current cursor position. If <application>&app;</application> finds the string, the application selects the first occurrence of the string. Other occurrences of the string are highlighted.</para>
</listitem>
<listitem><para>To find the next occurrence of the string, click <guibutton>Find</guibutton> or choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Next</guimenuitem> </menuchoice>. To find the previous occurrence of the text, choose <menuchoice> <guimenu>Search</guimenu> <guimenuitem>Find Previous</guimenuitem> </menuchoice>.</para>
</listitem>
@@ -1191,7 +1191,7 @@
</variablelist>
</sect2>
<sect2 id="xed-prefs-plugins">
<sect2 id="xed-prefs-plugins" xreflabel="Plugins Preferences">
<title>Plugins Preferences</title>
<para>Plugins add extra features to <application>&app;</application>. For more information on plugins and how to use the built-in plugins, see <xref linkend="xed-plugins-overview"/>.</para>
@@ -1245,45 +1245,42 @@
<title>Working with Plugins</title>
<para>You can add extra features to <application>&app;</application> by enabling <firstterm>plugins</firstterm>. A plugin is a supplementary program that enhances the functionality of an application. Plugins add new items to the <application>&app;</application> menus for the new features they provide.
</para>
<para>Several plugins come built-in with <application>&app;</application>, and you can install more. The <ulink type="http" url="http://live.gnome.org/Xed/Plugins">xed website</ulink> lists third-party plugins.</para>
<para>To enable and disable plugins, or see which plugins are currently enabled, use the <link linkend="xed-prefs-plugins">Plugins Preferences</link>.</para>
<para>Several plugins come built-in with <application>&app;</application>, and you can install more.</para>
<para>To enable and disable plugins, or see which plugins are currently enabled, use the <xref linkend="xed-prefs-plugins"/>.</para>
<para>The following plugins come built-in with <application>&app;</application>:</para>
<!-- Not yet documented:
File browser
-->
<itemizedlist>
<listitem>
<para><link linkend="xed-change-case-plugin"><application>Change Case</application></link> allows you to change the case of the selected text.</para>
<para><xref linkend="xed-change-case-plugin"/> allows you to change the case of the selected text.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-document-statistics-plugin">Document Statistics</link></application> shows the number of lines, words, and characters in the document. </para>
<para><xref linkend="xed-document-statistics-plugin"/> shows the number of lines, words, and characters in the document. </para>
</listitem>
<listitem>
<para><application><!-- <link linkend="xed-file-browser-plugin">File Browser</link>-->File Browser</application> allows you to browse your files and folders in the side pane.</para>
<para><xref linkend="xed-file-browser-plugin"/> allows you to browse your files and folders in the side pane.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-indent-lines-plugin">Indent Lines</link></application> adds or removes indentation from the selected lines.</para>
<para><xref linkend="xed-indent-lines-plugin"/> adds or removes indentation from the selected lines.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-insert-date-time-plugin">Insert Date/Time</link></application> adds the current date and time into a document.</para>
<para><xref linkend="xed-insert-date-time-plugin"/> adds the current date and time into a document.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-modelines-plugin">Modelines</link></application> allows you to set editing preferences for individual documents, and supports <application>Emacs</application>, <application>Kate</application> and <application>Vim</application>-style modelines.</para>
<para><xref linkend="xed-modelines-plugin"/> allows you to set editing preferences for individual documents, and supports <application>Emacs</application>, <application>Kate</application> and <application>Vim</application>-style modelines.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-sort-plugin">Sort</link></application> arranges selected lines of text into alphabetical order.</para>
<para><xref linkend="xed-sort-plugin"/> arranges selected lines of text into alphabetical order.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-spell-checker-plugin">Spell Checker</link></application> corrects the spelling in the selected text, or marks errors automatically in the document.</para>
<para><xref linkend="xed-spell-checker-plugin"/> corrects the spelling in the selected text, or marks errors automatically in the document.</para>
</listitem>
<listitem>
<para><application><link linkend="xed-tag-list-plugin">Tag List</link></application> lets you insert commonly-used tags for HTML and other languages from a list in the side pane.</para>
<para><xref linkend="xed-tag-list-plugin"/> lets you insert commonly-used tags for HTML and other languages from a list in the side pane.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="xed-change-case-plugin">
<sect2 id="xed-change-case-plugin" xreflabel="Change Case">
<title>Change Case Plugin</title>
<para>The <application>Change Case</application> plugin changes the case of the selected text.</para>
<para>The following items are added to the <guimenu>Edit</guimenu> menu when the <application>Change Case</application> plugin is enabled:</para>
@@ -1334,7 +1331,7 @@
</sect2>
<sect2 id="xed-document-statistics-plugin">
<sect2 id="xed-document-statistics-plugin" xreflabel="Document Statistics">
<title>Document Statistics Plugin</title>
<para>The <application>Document Statistics</application> plugin counts the number of lines, words, characters with spaces, characters without spaces, and bytes in the current file. The plugin displays the results in a <guilabel>Document Statistics</guilabel> dialog. To use the Document Statistics plugin, perform the following steps:</para>
<orderedlist>
@@ -1364,7 +1361,7 @@
</orderedlist>
</sect2>
<sect2 id="xed-file-browser-plugin">
<sect2 id="xed-file-browser-plugin" xreflabel="File Browser">
<title>File Browser Plugin</title>
<para>The <application>File Browser</application> Plugin shows your files and folders in the side pane, allowing you to quickly open files.</para>
<para>To view the File Browser, choose <menuchoice><guimenu>View</guimenu> <guimenuitem>Side Pane</guimenuitem> </menuchoice> and then click on the tab showing the File Browser icon at the bottom of the side pane.</para>
@@ -1385,7 +1382,7 @@
</sect3>
</sect2>
<sect2 id="xed-indent-lines-plugin">
<sect2 id="xed-indent-lines-plugin" xreflabel="Indent Lines">
<title>Indent Lines Plugin</title>
<para>The <application>Indent Lines</application> plugin adds or removes space from the beginning of lines of text.</para>
<para>To indent or unindent text, perform the following steps:</para>
@@ -1403,11 +1400,11 @@
</itemizedlist>
</listitem>
</orderedlist>
<para>The amount of space used, and whether tab character or space characters are used, depends on the <guilabel>Tab Stops</guilabel> settings in the Editor Preferences: see <xref linkend="xed-prefs-editor"/>.</para>
<para>The amount of space used, and whether tab characters or space characters are used, depends on the <guilabel>Tab Stops</guilabel> settings in the Editor Preferences: see <xref linkend="xed-prefs-editor"/>.</para>
</sect2>
<sect2 id="xed-insert-date-time-plugin">
<sect2 id="xed-insert-date-time-plugin" xreflabel="Insert Date/Time">
<title>Insert Date/Time Plugin</title>
<para>The <application>Insert Date/Time</application> plugin inserts the current date and time into a document. To use the Insert Date/Time plugin, perform the following steps:</para>
<orderedlist>
@@ -1455,7 +1452,7 @@
</sect3>
</sect2>
<sect2 id="xed-modelines-plugin">
<sect2 id="xed-modelines-plugin" xreflabel="Modelines">
<title>Modelines Plugin</title>
<para>The <application>Modelines</application> plugin allows you to set preferences for individual documents. A <firstterm>modeline</firstterm> is a line of text at the start or end of the document with settings that <application>&app;</application> recognises.</para>
<para>Preferences set using modelines take precedence over the ones specified in the preference dialog.</para>
@@ -1483,21 +1480,21 @@
<sect3 id="xed-modelines-plugin-emacs">
<title>Emacs Modelines</title>
<para>The first two lines of a document are scanned for <application>Emacs</application> modelines.</para>
<para>The <application>Emacs</application> options for tab-width, indent-offset, indent-tabs-mode and autowrap are supported. For more information, see the <ulink type="http" url="http://www.delorie.com/gnu/docs/emacs/emacs_486.html">GNU Emacs Manual</ulink>.</para>
<para>The <application>Emacs</application> options for tab-width, indent-offset, indent-tabs-mode and autowrap are supported. For more information, see the <ulink type="http" url="http://www.gnu.org/software/emacs/manual/html_node/emacs/index.html">GNU Emacs Manual</ulink>.</para>
</sect3>
<sect3 id="xed-modelines-plugin-kate">
<title>Kate Modelines</title>
<para>The first and last ten lines a document are scanned for <application>Kate</application> modelines.</para>
<para>The <application>Kate</application> options for tab-width, indent-width, space-indent, word-wrap and word-wrap-column are supported. For more information, see the <ulink type="http" url="http://www.kate-editor.org/article/katepart_modelines">Kate website</ulink>.</para>
<para>The first and last ten lines of a document are scanned for <application>Kate</application> modelines.</para>
<para>The <application>Kate</application> options for tab-width, indent-width, space-indent, word-wrap and word-wrap-column are supported. For more information, see the <ulink type="http" url="http://www.kate-editor.org">Kate website</ulink>.</para>
</sect3>
<sect3 id="xed-modelines-plugin-vim">
<title>Vim Modelines</title>
<para>The first and last three lines a document are scanned for <application>Vim</application> modelines.</para>
<para>The first and last three lines of a document are scanned for <application>Vim</application> modelines.</para>
<para>The <application>Vim</application> options for et, expandtab, ts, tabstop, sw, shiftwidth, wrap, and textwidth are supported. For more information, see the <ulink type="http" url="http://vimdoc.sourceforge.net/htmldoc/options.html#modeline">Vim website</ulink>.</para>
</sect3>
</sect2>
<sect2 id="xed-sort-plugin">
<sect2 id="xed-sort-plugin" xreflabel="Sort">
<title>Sort Plugin</title>
<para>The <application>Sort</application> plugin arranges selected lines of text into alphabetical order.</para>
<caution><para>You cannot undo the Sort operation, so you should save the file before performing the sort. To revert to the saved version of the file after the sort operation, choose <menuchoice> <guimenu>File</guimenu> <guimenuitem>Revert</guimenuitem> </menuchoice>.
@@ -1534,7 +1531,7 @@
</orderedlist>
</sect2>
<sect2 id="xed-spell-checker-plugin">
<sect2 id="xed-spell-checker-plugin" xreflabel="Spell Checker">
<title>Spell Checker Plugin</title>
<para>The <application>Spell Checker</application> plugin checks the spelling in the selected text. You can configure <application>&app;</application> to check the spelling automatically, or you can check the spelling manually, in the specified language. The language setting, and the autocheck spelling properties, apply per document. To use the Spell checker plugin, perform the following steps:</para>
<orderedlist>
@@ -1589,7 +1586,7 @@
</orderedlist>
</sect2>
<sect2 id="xed-tag-list-plugin">
<sect2 id="xed-tag-list-plugin" xreflabel="Tag List">
<title>Tag List Plugin</title>
<para>The <application>Tag List</application> plugin allows you to insert common tags from a list in the side pane.</para>
<para>To use the Tag List plugin, perform the following steps:</para>

View File

@@ -1,4 +1,4 @@
project('xed', 'c', version : '2.2.0')
project('xed', 'c', version : '3.0.0')
gnome = import('gnome')
i18n = import('i18n')
@@ -8,7 +8,8 @@ version = meson.project_version()
xed_conf = configuration_data()
xed_conf.set_quoted('VERSION', version)
xed_conf.set_quoted('GETTEXT_PACKAGE', 'xed')
#xed_conf.set_quoted('GETTEXT_PACKAGE', 'xed')
xed_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
# directories
prefix = get_option('prefix')
@@ -28,12 +29,12 @@ glib = dependency('glib-2.0', version: '>= 2.40.0')
gthread = dependency('gthread-2.0', version: '>= 2.13.0')
gio = dependency('gio-2.0', version: '>= 2.40.0')
gtk = dependency('gtk+-3.0', version: '>= 3.19.3')
gtksourceview = dependency('gtksourceview-3.0', version: '>= 3.19.0')
gtksourceview = dependency('gtksourceview-4', version: '>= 4.0.3')
libpeas = dependency('libpeas-1.0', version: '>= 1.12.0')
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.12.0')
gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false)
gir_dep = dependency('gobject-introspection-1.0', version: '>= 1.42.0', required: false)
gmodule = dependency('gmodule-2.0')
xapp = dependency('xapp', version: '>= 1.4.0')
xapp = dependency('xapp', version: '>= 1.9.0')
X11 = dependency('x11')
pango = dependency('pango')
@@ -94,6 +95,15 @@ if get_option('docs')
subdir('docs/reference')
endif
# The tests use an option that doesn't exist in meson before 0.46.
# Since they aren't strictly necessary, we'll just skip them for earlier versions
# rather than making 0.46 a hard requirement. This condition can be removed once we
# no longer need to worry about building on 0.45 or earlier
meson_version_parts = meson.version().split('.')
if meson_version_parts[0].to_int() > 0 or meson_version_parts[1].to_int() >= 46
subdir('test')
endif
message('prefix = @0@'.format(prefix))
message('bindir = @0@'.format(bindir))
message('datadir = @0@'.format(datadir))

View File

@@ -0,0 +1,105 @@
[Plugin]
Loader=python3
Module=bracketcompletion
IAge=3
Name[ar]=إكمال الأقواس
Name[be]=Дапаўненне дужак
Name[bs]=Zatvaranje zagrada
Name[ca]=Compleció dels claudàtors
Name[ca@valencia]=Compleció dels claudàtors
Name[cs]=Doplňování závorek
Name[da]=Klammefuldførelse
Name[de]=Klammern schließen
Name[el]=Συμπλήρωση αγκύλων
Name[en_GB]=Bracket Completion
Name[eo]=Krampo-kompletigo
Name[es]=Completar paréntesis
Name[et]=Sulgude lõpetamine
Name[eu]=Parentesien osaketa
Name[fi]=Sulkuparin täsmäys
Name[fr]=Complétion de parenthèses
Name[fur]=Completament parentesis
Name[gl]=Completar parénteses
Name[he]=התאמת סוגריים
Name[hr]=Dovršavanje zagrada
Name[hu]=Zárójel-kiegészítés
Name[id]=Penyelesaian Tanda Kurung
Name[it]=Completamento parentesi
Name[ja]=カッコの補完
Name[kk]=Жақшаларды толықтыру
Name[ko]=각괄호 일치
Name[lt]=Skliaustų užbaigimas
Name[lv]=Iekavu noslēgšana
Name[nl]=Haakjes-voltooiing
Name[oc]=Complecion de parentèsis
Name[pl]=Uzupełnianie nawiasów
Name[pt]=Conclusão de chavetas
Name[pt_BR]=Fechamento de parênteses
Name[ro]=Completare paranteze
Name[ru]=Дополнение скобок
Name[sk]=Dopĺňanie pravých zátvoriek
Name[sl]=Dopolnjevanje oklepajev
Name[sr]=Допуњавање заграда
Name[sr@latin]=Dopunjavanje zagrada
Name[sv]=Parenteskomplettering
Name[te]=బ్రాకెట్ ముగింపు
Name[th]=การเติมเต็มคู่วงเล็บ
Name[tr]=Parantez Tamamlama
Name[zh_CN]=括号补全
Name[zh_TW]=括號補完
Name=Bracket Completion
Description[ar]=يغلق الأقواس آليا.
Description[as]=বন্ধনী নিজেই যোগ কৰে ।
Description[be]=Аўтаматычна дадае канцавыя дужкі.
Description[be@latin]=Aŭtamatyčna dadaje kancavyja dužki.
Description[bs]=Automatski dodaj zatvorene zagrade.
Description[ca]=Afegeix claudàtors de tancada automàticament.
Description[ca@valencia]=Afig claudàtors de tancada automàticament.
Description[cs]=Automaticky přidává zavírací závorky.
Description[da]=Tilføjer automatisk afsluttende klammer.
Description[de]=Fügt automatisch schließende Klammern hinzu.
Description[dz]=ཁ་བསྡམ་གུག་ཤད་ཚུ་ རང་བཞིན་གྱིས་ཁ་སྐོང་རྐྱབ་ཨིན།
Description[el]=Συμπληρώνει αυτόματα τις αγκύλες.
Description[en_CA]=Automatically adds closing brackets.
Description[en_GB]=Automatically adds closing brackets.
Description[eo]=Aŭtomate aldoni fermantajn krampojn.
Description[es]=Añadir automáticamente cierres de paréntesis.
Description[eu]=Automatikoki gehitzen ditu itxierako parentesiak.
Description[fi]=Lisää suluille pääte automaattisesti.
Description[fr]=Ajouter automatiquement les parenthèses fermantes.
Description[fur]=Al zonte in automatic lis parentesis sieradis.
Description[gl]=Engadir automaticamente peches de parénteses.
Description[gu]=બંધ કરતા કૌંસો ઓપોઆપ ઉમેરાય છે.
Description[he]=הוספת סוגר לסגירה.
Description[hr]=Automatski zatvara zagrade.
Description[hu]=Automatikusan hozzáadja a záró zárójeleket.
Description[id]=Otomatis menambah kurung tutup.
Description[it]=Aggiunge automaticamente le parentesi di chiusura
Description[ja]=終わり括弧を自動的に追加します
Description[kk]=Жабатын жақшаны автоматты түрде қосады.
Description[ko]=자동으로 닫는 각괄호를 추가합니다.
Description[lt]=Automatiškai prideda užveriančius skliaustus.
Description[lv]=Automātiski pievieno aizverošās iekavas.
Description[mr]=स्वयं बंद करण्याजोगी ब्रॅकेट समावेष करा.
Description[nl]=Voegt automatisch haakjes sluiten toe.
Description[oc]=Apondre automaticament las parentèsis tampantas.
Description[or]=ବନ୍ଦହୋଇଥିବା ବନ୍ଧନିଗୁଡ଼ିକୁ ସ୍ୱୟଂଚାଳିତ ଭାବରେ ଯୋଗକରନ୍ତୁ।
Description[pl]=Automatycznie dodaje nawiasy zamykające.
Description[pt]=Adiciona automaticamente fecho de chavetas.
Description[pt_BR]=Fecha parênteses automaticamente.
Description[ro]=Adaugă automat paranteze închise.
Description[ru]=Автоматическое добавление закрывающей скобки.
Description[sk]=Automatické pridávanie pravých zátvoriek.
Description[sl]=Samodejno doda zaklepaje
Description[sr]=Сам додаје затварајуће заграде.
Description[sr@latin]=Sam dodaje zatvarajuće zagrade.
Description[sv]=Lägger automatiskt till avslutande parenteser.
Description[th]=เติมวงเล็บปิดโดยอัตโนมัติ
Description[tr]=Parantez kapanışını kendiliğinden ekler.
Description[vi]=Tự động thêm dấu ngoặc đóng.
Description[zh_CN]=自动添加闭合括号。
Description[zh_TW]=自動加入關閉用括號。
Description=Automatically adds closing brackets.
Authors=Hrutvik Suthar <steve@istique.net>
Copyright=Copyright @ 2020 Hrutvik Suthar
Version=1.0

View File

@@ -0,0 +1,318 @@
# -*- coding: utf-8 -*-
#
# bracketcompletion.py - Bracket completion plugin for Xed
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
import gi
gi.require_version('Peas', '1.0')
#gi.require_version('Xed', '3.0')
from gi.repository import GObject, Gdk, Xed
common_brackets = {
'(' : ')',
'[' : ']',
'{' : '}',
'"' : '"',
"'" : "'",
}
close_brackets = {
')' : '(',
']' : '[',
'}' : '{',
}
language_brackets = {
'changelog': { '<' : '>' },
'html': { '<' : '>' },
'ruby': { '|' : '|' },
'sh': { '`' : '`' },
'xml': { '<' : '>' },
'php': { '<' : '>' },
}
class BracketCompletionPlugin(GObject.Object, Xed.ViewActivatable):
__gtype_name__ = "BracketCompletion"
view = GObject.Property(type=Xed.View)
def __init__(self):
GObject.Object.__init__(self)
def do_activate(self):
self._doc = self.view.get_buffer()
self._last_iter = None
self._stack = []
self._relocate_marks = True
self.update_language()
# Add the markers to the buffer
insert = self._doc.get_iter_at_mark(self._doc.get_insert())
self._mark_begin = self._doc.create_mark(None, insert, True)
self._mark_end = self._doc.create_mark(None, insert, False)
self._handlers = [
None,
None,
self.view.connect('notify::editable', self.on_notify_editable),
self._doc.connect('notify::language', self.on_notify_language),
None,
]
self.update_active()
def do_deactivate(self):
if self._handlers[0]:
self.view.disconnect(self._handlers[0])
self.view.disconnect(self._handlers[1])
self._doc.disconnect(self._handlers[4])
self.view.disconnect(self._handlers[2])
self._doc.disconnect(self._handlers[3])
self._doc.delete_mark(self._mark_begin)
self._doc.delete_mark(self._mark_end)
def update_active(self):
# Don't activate the feature if the buffer isn't editable or if
# there are no brackets for the language
active = self.view.get_editable() and \
self._brackets is not None
if active and self._handlers[0] is None:
self._handlers[0] = self.view.connect('event-after',
self.on_event_after)
self._handlers[1] = self.view.connect('key-press-event',
self.on_key_press_event)
self._handlers[4] = self._doc.connect('delete-range',
self.on_delete_range)
elif not active and self._handlers[0] is not None:
self.view.disconnect(self._handlers[0])
self._handlers[0] = None
self.view.disconnect(self._handlers[1])
self._handlers[1] = None
self._doc.disconnect(self._handlers[4])
self._handlers[4] = None
def update_language(self):
lang = self._doc.get_language()
if lang is None:
self._brackets = None
return
lang_id = lang.get_id()
if lang_id in language_brackets:
self._brackets = language_brackets[lang_id]
# we populate the language-specific brackets with common ones lazily
self._brackets.update(common_brackets)
else:
self._brackets = common_brackets
# get the corresponding keyvals
self._bracket_keyvals = set()
for b in self._brackets:
kv = Gdk.unicode_to_keyval(ord(b[-1]))
if (kv):
self._bracket_keyvals.add(kv)
for b in close_brackets:
kv = Gdk.unicode_to_keyval(ord(b[-1]))
if (kv):
self._bracket_keyvals.add(kv)
def get_current_token(self):
end = self._doc.get_iter_at_mark(self._doc.get_insert())
start = end.copy()
word = None
if end.ends_word() or (end.inside_word() and not end.starts_word()):
start.backward_word_start()
word = self._doc.get_text(start, end)
if not word and start.backward_char():
word = start.get_char()
if word.isspace():
word = None
if word:
return word, start, end
else:
return None, None, None
def get_next_token(self):
start = self._doc.get_iter_at_mark(self._doc.get_insert())
end = start.copy()
word = None
if start.ends_word() or (start.inside_word() and not start.starts_word()):
end.forward_word_end()
word = self._doc.get_text(start, end)
if not word:
word = start.get_char()
if word.isspace():
word = None
if word:
return word, start, end
else:
return None, None, None
def compute_indentation(self, cur):
"""
Compute indentation at the given iterator line
view : gtk.TextView
cur : gtk.TextIter
"""
start = self._doc.get_iter_at_line(cur.get_line())
end = start.copy()
c = end.get_char()
while c.isspace() and c not in ('\n', '\r') and end.compare(cur) < 0:
if not end.forward_char():
break
c = end.get_char()
if start.equal(end):
return ''
return start.get_slice(end)
def on_notify_language(self, view, pspec):
self.update_language()
self.update_active()
def on_notify_editable(self, view, pspec):
self.update_active()
def on_key_press_event(self, view, event):
if event.state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK):
return False
if event.keyval in (Gdk.KEY_Left, Gdk.KEY_Right):
self._stack = []
if event.keyval == Gdk.KEY_BackSpace:
self._stack = []
if self._last_iter == None:
return False
iter1 = self._doc.get_iter_at_mark(self._doc.get_insert())
iter1.backward_char()
self._doc.begin_user_action()
self._doc.delete(iter1, self._last_iter)
self._doc.end_user_action()
self._last_iter = None
return True
if event.keyval in (Gdk.KEY_Return, Gdk.KEY_KP_Enter) and \
view.get_auto_indent() and self._last_iter != None:
# This code has barely been adapted from gtksourceview.c
# Note: it might break IM!
mark = self._doc.get_insert()
iter1 = self._doc.get_iter_at_mark(mark)
indent = self.compute_indentation(iter1)
indent = "\n" + indent
# Insert new line and auto-indent.
self._doc.begin_user_action()
self._doc.insert(iter1, indent)
self._doc.insert(iter1, indent)
self._doc.end_user_action()
# Leave the cursor where we want it to be
iter1.backward_chars(len(indent))
self._doc.place_cursor(iter1)
self.view.scroll_mark_onscreen(mark)
self._last_iter = None
return True
self._last_iter = None
return False
def on_event_after(self, view, event):
if event.type != Gdk.EventType.KEY_PRESS or \
event.state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK) or \
event.keyval not in self._bracket_keyvals:
return
# Check if the insert mark is in the range of mark_begin to mark_end
# if not we free the stack
insert = self._doc.get_insert()
iter_begin = self._doc.get_iter_at_mark(self._mark_begin)
iter_end = self._doc.get_iter_at_mark(self._mark_end)
insert_iter = self._doc.get_iter_at_mark(insert)
if not iter_begin.equal(iter_end):
if not insert_iter.in_range(iter_begin, iter_end):
self._stack = []
self._relocate_marks = True
# Check if the word is not in our brackets
word, start, end = self.get_current_token()
if word not in self._brackets and word not in close_brackets:
return
# If we didn't insert brackets yet we insert them in the insert mark iter
if self._relocate_marks == True:
insert_iter = self._doc.get_iter_at_mark(insert)
self._doc.move_mark(self._mark_begin, insert_iter)
self._doc.move_mark(self._mark_end, insert_iter)
self._relocate_marks = False
# Depending on having close bracket or a open bracket we get the opposed
# bracket
bracket = None
bracket2 = None
if word not in close_brackets:
self._stack.append(word)
bracket = self._brackets[word]
else:
bracket2 = close_brackets[word]
word2, _, _ = self.get_next_token()
# Check to skip the closing bracket
# Example: word = ) and word2 = )
if word == word2:
if bracket2 != None and self._stack != [] and \
self._stack[len(self._stack) - 1] == bracket2:
self._stack.pop()
self._doc.handler_block(self._handlers[4])
self._doc.delete(start, end)
self._doc.handler_unblock(self._handlers[4])
end.forward_char()
self._doc.place_cursor(end)
return
# Insert the closing bracket
if bracket != None:
self._doc.begin_user_action()
self._doc.insert(end, bracket)
self._doc.end_user_action()
# Leave the cursor when we want it to be
self._last_iter = end.copy()
end.backward_chars(len(bracket))
self._doc.place_cursor(end)
def on_delete_range(self, doc, start, end):
self._stack = []
# ex:ts=4:et:

View File

@@ -0,0 +1,4 @@
install_subdir(
'bracket-complete',
install_dir: pluginslibdir
)

View File

@@ -69,7 +69,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedDocInfoPlugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init))
xed_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedDocInfoPlugin))
static void
calculate_info (XedDocument *doc,
@@ -385,7 +386,7 @@ static void
xed_docinfo_plugin_init (XedDocInfoPlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedDocInfoPlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, XED_TYPE_DOCINFO_PLUGIN, XedDocInfoPluginPrivate);
plugin->priv = xed_docinfo_plugin_get_instance_private (plugin);
}
static void
@@ -531,8 +532,6 @@ xed_docinfo_plugin_class_init (XedDocInfoPluginClass *klass)
object_class->get_property = xed_docinfo_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (klass, sizeof (XedDocInfoPluginPrivate));
}
static void

View File

@@ -7,4 +7,3 @@ _Description=Easy file access from the side pane
Icon=system-file-manager
Authors=Jesse van den Kieboom <jesse@icecrew.nl>
Copyright=Copyright © 2006 Jesse van den Kieboom
Website=http://www.mate-desktop.org

View File

@@ -27,10 +27,6 @@
#include "xed-file-bookmarks-store.h"
#include "xed-file-browser-utils.h"
#define XED_FILE_BOOKMARKS_STORE_GET_PRIVATE(object)( \
G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_FILE_BOOKMARKS_STORE, \
XedFileBookmarksStorePrivate))
struct _XedFileBookmarksStorePrivate
{
GVolumeMonitor * volume_monitor;
@@ -55,7 +51,11 @@ static gboolean find_with_flags (GtkTreeModel * model,
guint flags,
guint notflags);
G_DEFINE_DYNAMIC_TYPE (XedFileBookmarksStore, xed_file_bookmarks_store, GTK_TYPE_TREE_STORE)
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBookmarksStore,
xed_file_bookmarks_store,
GTK_TYPE_TREE_STORE,
0,
G_ADD_PRIVATE_DYNAMIC (XedFileBookmarksStore))
static void
xed_file_bookmarks_store_dispose (GObject * object)
@@ -92,8 +92,6 @@ xed_file_bookmarks_store_class_init (XedFileBookmarksStoreClass *klass)
object_class->dispose = xed_file_bookmarks_store_dispose;
object_class->finalize = xed_file_bookmarks_store_finalize;
g_type_class_add_private (object_class, sizeof (XedFileBookmarksStorePrivate));
}
static void
@@ -105,7 +103,7 @@ xed_file_bookmarks_store_class_finalize (XedFileBookmarksStoreClass *klass)
static void
xed_file_bookmarks_store_init (XedFileBookmarksStore * obj)
{
obj->priv = XED_FILE_BOOKMARKS_STORE_GET_PRIVATE (obj);
obj->priv = xed_file_bookmarks_store_get_instance_private (obj);
}
/* Private */

View File

@@ -42,8 +42,6 @@
#define FILE_BROWSER_SCHEMA "org.x.editor.plugins.filebrowser"
#define FILE_BROWSER_ONLOAD_SCHEMA "org.x.editor.plugins.filebrowser.on-load"
#define XED_FILE_BROWSER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_FILE_BROWSER_PLUGIN, XedFileBrowserPluginPrivate))
struct _XedFileBrowserPluginPrivate
{
XedWindow *window;
@@ -106,8 +104,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserPlugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init) \
\
xed_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedFileBrowserPlugin)
_xed_file_browser_store_register_type (type_module); \
_xed_file_bookmarks_store_register_type (type_module); \
_xed_file_browser_view_register_type (type_module); \
@@ -118,7 +116,7 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserPlugin,
static void
xed_file_browser_plugin_init (XedFileBrowserPlugin *plugin)
{
plugin->priv = XED_FILE_BROWSER_PLUGIN_GET_PRIVATE (plugin);
plugin->priv = xed_file_browser_plugin_get_instance_private (plugin);
}
static void
@@ -620,8 +618,6 @@ xed_file_browser_plugin_class_init (XedFileBrowserPluginClass * klass)
object_class->get_property = xed_file_browser_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (object_class, sizeof (XedFileBrowserPluginPrivate));
}
static void

View File

@@ -31,10 +31,6 @@
#include "xed-file-browser-error.h"
#include "xed-file-browser-utils.h"
#define XED_FILE_BROWSER_STORE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
XED_TYPE_FILE_BROWSER_STORE, \
XedFileBrowserStorePrivate))
#define NODE_IS_DIR(node) (FILE_IS_DIR((node)->flags))
#define NODE_IS_HIDDEN(node) (FILE_IS_HIDDEN((node)->flags))
#define NODE_IS_TEXT(node) (FILE_IS_TEXT((node)->flags))
@@ -193,14 +189,6 @@ static void next_files_async (GFileEnumerator *enumerator,
static void delete_files (AsyncData *data);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserStore, xed_file_browser_store,
G_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_MODEL,
xed_file_browser_store_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_DRAG_SOURCE,
xed_file_browser_store_drag_source_init))
/* Properties */
enum {
PROP_0,
@@ -224,6 +212,15 @@ enum
NUM_SIGNALS
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserStore, xed_file_browser_store,
G_TYPE_OBJECT,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_MODEL,
xed_file_browser_store_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_DRAG_SOURCE,
xed_file_browser_store_drag_source_init)
G_ADD_PRIVATE_DYNAMIC (XedFileBrowserStore))
static guint model_signals[NUM_SIGNALS] = { 0 };
static void
@@ -418,8 +415,6 @@ xed_file_browser_store_class_init (XedFileBrowserStoreClass * klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
G_TYPE_FILE);
g_type_class_add_private (object_class, sizeof (XedFileBrowserStorePrivate));
}
static void
@@ -457,7 +452,7 @@ xed_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface)
static void
xed_file_browser_store_init (XedFileBrowserStore * obj)
{
obj->priv = XED_FILE_BROWSER_STORE_GET_PRIVATE (obj);
obj->priv = xed_file_browser_store_get_instance_private (obj);
obj->priv->column_types[XED_FILE_BROWSER_STORE_COLUMN_LOCATION] = G_TYPE_FILE;
obj->priv->column_types[XED_FILE_BROWSER_STORE_COLUMN_NAME] = G_TYPE_STRING;
@@ -3589,7 +3584,7 @@ delete_file_finished (GFile *file,
/* Process the next file */
data->iter = data->iter->next;
}
else if (!ok && error != NULL)
else if (error != NULL)
{
gint code = error->code;
g_error_free (error);

View File

@@ -31,10 +31,6 @@
#include "xed-file-browser-marshal.h"
#include "xed-file-browser-enum-types.h"
#define XED_FILE_BROWSER_VIEW_GET_PRIVATE(object)( \
G_TYPE_INSTANCE_GET_PRIVATE((object), \
XED_TYPE_FILE_BROWSER_VIEW, XedFileBrowserViewPrivate))
struct _XedFileBrowserViewPrivate
{
GtkTreeViewColumn *column;
@@ -81,7 +77,11 @@ static const GtkTargetEntry drag_source_targets[] = {
{ "text/uri-list", 0, 0 }
};
G_DEFINE_DYNAMIC_TYPE (XedFileBrowserView, xed_file_browser_view, GTK_TYPE_TREE_VIEW)
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserView,
xed_file_browser_view,
GTK_TYPE_TREE_VIEW,
0,
G_ADD_PRIVATE_DYNAMIC (XedFileBrowserView))
static void on_cell_edited (GtkCellRendererText *cell,
gchar *path,
@@ -824,8 +824,6 @@ xed_file_browser_view_class_init (XedFileBrowserViewClass *klass)
bookmark_activated), NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1, GTK_TYPE_TREE_ITER);
g_type_class_add_private (object_class, sizeof (XedFileBrowserViewPrivate));
}
static void
@@ -864,7 +862,7 @@ cell_data_cb (GtkTreeViewColumn *tree_column,
static void
xed_file_browser_view_init (XedFileBrowserView *obj)
{
obj->priv = XED_FILE_BROWSER_VIEW_GET_PRIVATE (obj);
obj->priv = xed_file_browser_view_get_instance_private (obj);
obj->priv->column = gtk_tree_view_column_new ();

View File

@@ -38,10 +38,6 @@
#include "xed-file-browser-marshal.h"
#include "xed-file-browser-enum-types.h"
#define XED_FILE_BROWSER_WIDGET_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
XED_TYPE_FILE_BROWSER_WIDGET, \
XedFileBrowserWidgetPrivate))
#define XML_UI_FILE "xed-file-browser-widget-ui.xml"
#define LOCATION_DATA_KEY "xed-file-browser-widget-location"
@@ -225,7 +221,11 @@ static void on_action_filter_binary (GtkAction *action,
static void on_action_bookmark_open (GtkAction *action,
XedFileBrowserWidget *obj);
G_DEFINE_DYNAMIC_TYPE (XedFileBrowserWidget, xed_file_browser_widget, GTK_TYPE_BOX)
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserWidget,
xed_file_browser_widget,
GTK_TYPE_BOX,
0,
G_ADD_PRIVATE_DYNAMIC (XedFileBrowserWidget))
static void
free_name_icon (gpointer data)
@@ -483,8 +483,6 @@ xed_file_browser_widget_class_init (XedFileBrowserWidgetClass *klass)
G_TYPE_BOOLEAN,
1,
G_TYPE_POINTER);
g_type_class_add_private (object_class, sizeof (XedFileBrowserWidgetPrivate));
}
static void
@@ -1173,7 +1171,7 @@ create_filter (XedFileBrowserWidget *obj)
static void
xed_file_browser_widget_init (XedFileBrowserWidget *obj)
{
obj->priv = XED_FILE_BROWSER_WIDGET_GET_PRIVATE (obj);
obj->priv = xed_file_browser_widget_get_instance_private (obj);
obj->priv->bookmarks_hash = g_hash_table_new_full (g_file_hash,
(GEqualFunc)g_file_equal,

View File

@@ -0,0 +1,10 @@
[Plugin]
Loader=python3
Module=joinlines
IAge=3
_Name=Join Lines
_Description=Join several lines
Icon=gnome-mime-text-x-python
Authors=Steve Frécinaux <steve@istique.net>;André Homeyer;Linux Mint team
Copyright=Copyright @ 2006-2007 Steve Frécinaux, André Homeyer
Builtin=true

View File

@@ -0,0 +1,91 @@
from gi.repository import GObject, Gtk, Xed
import gettext
gettext.install("xed")
MENU_PATH = "/MenuBar/ViewMenu/ViewOps_1"
class JoinLinesPlugin(GObject.Object, Xed.WindowActivatable):
__gtype_name__ = "JoinLinesPlugin"
window = GObject.property(type=Xed.Window)
def __init__(self):
GObject.Object.__init__(self)
def do_activate(self):
self._views = {}
self._insert_menu()
def _insert_menu(self):
manager = self.window.get_ui_manager()
self._action_group = Gtk.ActionGroup(name="XedJoinLinesPluginActions")
self._action_group.add_actions(
[("JoinLinesAction", None, _("_Join Lines"), "<Ctrl>J",
_("Join the selected lines"),
lambda w: self.join_lines(w))])
manager.insert_action_group(self._action_group)
self._ui_id = manager.new_merge_id()
manager.add_ui(self._ui_id,
MENU_PATH,
"JoinLinesAction",
"JoinLinesAction",
Gtk.UIManagerItemType.MENUITEM,
False)
def do_update_state(self):
self._action_group.set_sensitive(self.window.get_active_document() != None)
def do_deactivate(self):
self._remove_menu()
def _remove_menu(self):
manager = self.window.get_ui_manager()
manager.remove_ui(self._ui_id)
manager.remove_action_group(self._action_group)
manager.ensure_update()
def join_lines(self, w):
doc = self.window.get_active_document()
if doc is None:
return
doc.begin_user_action()
# If there is a selection use it, otherwise join the
# next line
try:
start, end = doc.get_selection_bounds()
except ValueError:
start = doc.get_iter_at_mark(doc.get_insert())
end = start.copy()
end.forward_line()
end_mark = doc.create_mark(None, end)
if not start.ends_line():
start.forward_to_line_end()
# Include trailing spaces in the chunk to be removed
while start.backward_char() and start.get_char() in ('\t', ' '):
pass
start.forward_char()
while doc.get_iter_at_mark(end_mark).compare(start) == 1:
end = start.copy()
while end.get_char() in ('\r', '\n', ' ', '\t'):
end.forward_char()
doc.delete(start, end)
doc.insert(start, ' ')
start.forward_to_line_end()
doc.delete_mark(end_mark)
doc.end_user_action()

View File

@@ -0,0 +1,13 @@
install_subdir(
'joinlines',
install_dir: pluginslibdir
)
textsize_desktop = custom_target(
'joinlines_desktop',
input: 'joinlines.plugin.desktop.in',
output: 'joinlines.plugin',
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: pluginslibdir,
)

View File

@@ -1,9 +1,12 @@
pluginsdatadir = join_paths(datadir, 'xed', 'plugins')
pluginslibdir = join_paths(libdir, 'xed', 'plugins')
subdir('bracket-complete')
subdir('docinfo')
subdir('filebrowser')
subdir('joinlines')
subdir('modelines')
subdir('open-uri-context-menu')
subdir('sort')
subdir('taglist')
subdir('textsize')

View File

@@ -5,4 +5,3 @@ _Name=Modelines
_Description=Emacs, Kate and Vim-style modelines support for xed.
Authors=Steve Frécinaux <steve@istique.net>
Copyright=Copyright © 2005 Steve Frécinaux
Website=http://www.mate-desktop.org

View File

@@ -50,7 +50,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedModelinePlugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_VIEW_ACTIVATABLE,
xed_view_activatable_iface_init))
xed_view_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedModelinePlugin))
static void
xed_modeline_plugin_constructed (GObject *object)
@@ -71,9 +72,7 @@ xed_modeline_plugin_init (XedModelinePlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedModelinePlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
XED_TYPE_MODELINE_PLUGIN,
XedModelinePluginPrivate);
plugin->priv = xed_modeline_plugin_get_instance_private (plugin);
}
static void
@@ -193,8 +192,6 @@ xed_modeline_plugin_class_init (XedModelinePluginClass *klass)
object_class->get_property = xed_modeline_plugin_get_property;
g_object_class_override_property (object_class, PROP_VIEW, "view");
g_type_class_add_private (klass, sizeof (XedModelinePluginPrivate));
}
static void

View File

@@ -0,0 +1,4 @@
install_subdir(
'open-uri-context-menu',
install_dir: pluginslibdir
)

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -0,0 +1,10 @@
[Plugin]
Loader=python3
Module=open-uri-context-menu
IAge=3
Name=Open URI
Description=Adds context menu item to open an URI at the pointer position.
Icon=gtk-open
Authors=Martin Szulecki <opensuse@sukimashita.com>\nJean-Philippe Fleury <contact@jpfleury.net>
Copyright=Copyright © 2007-2008 Martin Szulecki\nCopyright © 2011 Jean-Philippe Fleury
Builtin=true

View File

@@ -0,0 +1,179 @@
# Copyright (C) 2007-2008 Martin Szulecki
# Copyright (C) 2011 Jean-Philippe Fleury <contact@jpfleury.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
Adds context menu item to open an URI at the pointer position
'''
from gi.repository import Gtk, Xed, Gio, GObject, GtkSource
import gettext
import re
import sys
import os
import subprocess
import string
gettext.install("xed")
ACCEPTED_SCHEMES = ['file', 'ftp', 'sftp', 'smb', 'dav', 'davs', 'ssh', 'http', 'https']
RE_DELIM = re.compile(r'[\w#/\?:%@&\=\+\.\\~-]+', re.UNICODE|re.MULTILINE)
RE_URI_RFC2396 = re.compile("((([a-zA-Z][0-9a-zA-Z+\\-\\.]*):)?/{0,2}([0-9a-zA-Z;:,/\?@&=\+\$\.\-_!~\*'\(\)%]+))?(#[0-9a-zA-Z;,/\?:@&\=+$\.\\-_!~\*'\(\)%]+)?")
class OpenURIContextMenuPlugin(GObject.Object, Xed.WindowActivatable):
__gtype_name__ = "OpenURIContextMenuPlugin"
window = GObject.property(type=Xed.Window)
def __init__(self):
GObject.Object.__init__(self)
self.uri = ""
self.window = None
self.encoding = GtkSource.Encoding.get_from_charset("UTF-8")
def do_activate(self):
handler_ids = []
for signal in ('tab-added', 'tab-removed'):
method = getattr(self, 'on_window_' + signal.replace('-', '_'))
handler_ids.append(self.window.connect(signal, method))
self.window.OpenURIContextMenuPluginID = handler_ids
for view in self.window.get_views():
self.connect_view(view)
def do_deactivate(self):
widgets = [self.window] + self.window.get_views()
for widget in widgets:
handler_ids = widget.OpenURIContextMenuPluginID
if not handler_ids is None:
for handler_id in handler_ids:
widget.disconnect(handler_id)
widget.OpenURIContextMenuPluginID = None
self.window = None
def connect_view(self, view):
handler_id = view.connect('populate-popup', self.on_view_populate_popup)
view.OpenURIContextMenuPluginID = [handler_id]
def update_ui(self, window):
pass
def browse_url(self, menu_item, url):
command = ['xdg-open', url]
# Avoid to run the browser as user root
if os.getuid() == 0 and os.environ.has_key('SUDO_USER'):
command = ['sudo', '-u', os.environ['SUDO_USER']] + command
subprocess.Popen(command)
def on_window_tab_added(self, window, tab):
self.connect_view(tab.get_view())
def on_window_tab_removed(self, window, tab):
pass
def on_view_populate_popup(self, view, menu):
doc = view.get_buffer()
win = view.get_window(Gtk.TextWindowType.TEXT);
ptr_window, x, y, mod = win.get_pointer()
x, y = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, x, y);
# First try at pointer location
# Starting with GTK 3.20, get_iter_at_location returns a tuple of type
# (gboolean, GtkTextIter). Earlier versions return only the GtkTextIter.
insert = view.get_iter_at_location(x, y);
if isinstance(insert, tuple):
insert = insert[1] if insert[0] else None
# Second try at cursor
if insert == None:
insert = doc.get_iter_at_mark(doc.get_insert())
if isinstance(insert, tuple):
insert = insert[1] if insert[0] else None
while insert.forward_char():
if not RE_DELIM.match(insert.get_char()):
break
start = insert.copy()
while start.backward_char():
if not RE_DELIM.match(start.get_char()):
start.forward_char();
break
word = doc.get_text(start, insert, False)
if len(word) == 0:
return True
word = self.validate_uri(word)
if not word:
return True
displayed_word = word
if len(displayed_word) > 50:
displayed_word = displayed_word[:50] + u"\u2026"
browse_to = False
if word.startswith("http://") or word.startswith("https://"):
browse_to = True
if browse_to:
browse_uri_item = Gtk.MenuItem(_("Open '%s'") % (displayed_word))
browse_uri_item.connect('activate', self.browse_url, word);
browse_uri_item.show();
separator = Gtk.SeparatorMenuItem()
separator.show();
menu.prepend(separator)
menu.prepend(browse_uri_item)
return True
def validate_uri(self, uri):
m = RE_URI_RFC2396.search(uri);
if not m:
return False
target = m.group()
if m.group(4) == None or m.group(4) == "/":
return False
if m.group(2) != None:
if m.group(3) in ACCEPTED_SCHEMES:
return target
else:
return False
else:
if m.group(4).startswith("www."):
return 'http://' + target
target = os.path.expanduser(target)
if os.path.isfile(target):
if os.path.isabs(target):
return 'file://' + target
doc_dir = self.window.get_active_document().get_uri_for_display()
if doc_dir != None:
if doc_dir.startswith('file://'):
f = os.path.join(os.path.dirname(doc_dir), target)
if os.path.isfile(f.replace('file://', '', 1)):
return f
else:
return os.path.join(os.path.dirname(doc_dir), target)
paths = string.split(os.environ["PATH"], os.pathsep)
for dirname in paths:
f = os.path.join(os.path.dirname(dirname), 'include', target)
if os.path.isfile(f):
return 'file://' + f
return False

View File

@@ -6,5 +6,4 @@ _Description=Sorts a document or selected text.
Icon=gtk-sort-ascending
Authors=Carlo Borreo <borreo@softhome.net>;Lee Mallabone <mate@fonicmonkey.net>;Paolo Maggi <paolo.maggi@polito.it>;Jorge Alberto Torres H. <jorge@deadoak.com>
Copyright=Copyright © 2001 Carlo Borreo\nCopyright © 2002-2003 Lee Mallabone, Paolo Maggi\nCopyright © 2004-2005 Paolo Maggi
Website=http://www.mate-desktop.org
Builtin=true

View File

@@ -33,19 +33,10 @@
#include "xed-sort-plugin.h"
#define XED_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_SORT_PLUGIN, XedSortPluginPrivate))
#define MENU_PATH "/MenuBar/EditMenu/EditOps_6"
static void xed_window_activatable_iface_init (XedWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedSortPlugin,
xed_sort_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init))
struct _XedSortPluginPrivate
{
XedWindow *window;
@@ -62,6 +53,14 @@ enum
PROP_WINDOW
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedSortPlugin,
xed_sort_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedSortPlugin))
static void sort_cb (GtkAction *action,
XedSortPlugin *plugin);
@@ -310,7 +309,7 @@ xed_sort_plugin_init (XedSortPlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedSortPlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, XED_TYPE_SORT_PLUGIN, XedSortPluginPrivate);
plugin->priv = xed_sort_plugin_get_instance_private (plugin);
}
static void
@@ -383,8 +382,6 @@ xed_sort_plugin_class_init (XedSortPluginClass *klass)
object_class->get_property = xed_sort_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (klass, sizeof (XedSortPluginPrivate));
}
static void

View File

@@ -6,4 +6,3 @@ _Description=Checks the spelling of the current document.
Icon=gtk-spell-check
Authors=Paolo Maggi <paolo@gnome.org>
Copyright=Copyright © 2002-2005 Paolo Maggi
Website=http://www.mate-desktop.org

View File

@@ -5,4 +5,3 @@ _Name=Tag list
_Description=Provides a method to easily insert commonly used tags/strings into a document without having to type them.
Authors=Paolo Maggi <paolo.maggi@polito.it>
Copyright=Copyright © 2002-2005 Paolo Maggi
Website=http://www.mate-desktop.org

View File

@@ -39,10 +39,6 @@
#include "xed-taglist-plugin-panel.h"
#include "xed-taglist-plugin-parser.h"
#define XED_TAGLIST_PLUGIN_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
XED_TYPE_TAGLIST_PLUGIN_PANEL, \
XedTaglistPluginPanelPrivate))
enum
{
COLUMN_TAG_NAME,
@@ -63,7 +59,11 @@ struct _XedTaglistPluginPanelPrivate
gchar *data_dir;
};
G_DEFINE_DYNAMIC_TYPE (XedTaglistPluginPanel, xed_taglist_plugin_panel, GTK_TYPE_BOX)
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTaglistPluginPanel,
xed_taglist_plugin_panel,
GTK_TYPE_BOX,
0,
G_ADD_PRIVATE_DYNAMIC (XedTaglistPluginPanel))
enum
{
@@ -114,8 +114,7 @@ xed_taglist_plugin_panel_get_property (GObject *object,
switch (prop_id)
{
case PROP_WINDOW:
g_value_set_object (value,
XED_TAGLIST_PLUGIN_PANEL_GET_PRIVATE (panel)->window);
g_value_set_object (value, panel->priv->window);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -150,8 +149,6 @@ xed_taglist_plugin_panel_class_init (XedTaglistPluginPanelClass *klass)
XED_TYPE_WINDOW,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (object_class, sizeof(XedTaglistPluginPanelPrivate));
}
static void
@@ -668,7 +665,7 @@ xed_taglist_plugin_panel_init (XedTaglistPluginPanel *panel)
xed_debug (DEBUG_PLUGINS);
panel->priv = XED_TAGLIST_PLUGIN_PANEL_GET_PRIVATE (panel);
panel->priv = xed_taglist_plugin_panel_get_instance_private (panel);
panel->priv->data_dir = NULL;
gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),

View File

@@ -37,8 +37,6 @@
#include "xed-taglist-plugin-panel.h"
#include "xed-taglist-plugin-parser.h"
#define XED_TAGLIST_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_TAGLIST_PLUGIN, XedTaglistPluginPrivate))
struct _XedTaglistPluginPrivate
{
XedWindow *window;
@@ -48,26 +46,25 @@ struct _XedTaglistPluginPrivate
static void xed_window_activatable_iface_init (XedWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTaglistPlugin,
xed_taglist_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init) \
\
_xed_taglist_plugin_panel_register_type (type_module); \
)
enum
{
PROP_0,
PROP_WINDOW
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTaglistPlugin,
xed_taglist_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedTaglistPlugin)
_xed_taglist_plugin_panel_register_type (type_module))
static void
xed_taglist_plugin_init (XedTaglistPlugin *plugin)
{
plugin->priv = XED_TAGLIST_PLUGIN_GET_PRIVATE (plugin);
plugin->priv = xed_taglist_plugin_get_instance_private (plugin);
xed_debug_message (DEBUG_PLUGINS, "XedTaglistPlugin initializing");
}
@@ -110,7 +107,7 @@ xed_taglist_plugin_activate (XedWindowActivatable *activatable)
priv->taglist_panel = xed_taglist_plugin_panel_new (priv->window, data_dir);
g_free (data_dir);
xed_panel_add_item (side_panel, priv->taglist_panel, _("Tags"), "list-add");
xed_panel_add_item (side_panel, priv->taglist_panel, _("Tags"), "list-add-symbolic");
}
static void
@@ -192,8 +189,6 @@ xed_taglist_plugin_class_init (XedTaglistPluginClass *klass)
object_class->get_property = xed_taglist_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (object_class, sizeof (XedTaglistPluginPrivate));
}
static void

View File

@@ -7,5 +7,4 @@ _Description=Allow controlling the zoom levels of the text
Icon=gnome-mime-text-x-python
Authors=Steve Frécinaux <steve@istique.net>;Linux Mint team
Copyright=Copyright © 2017 by the authors
Website=https://github.com/linuxmint
Builtin=true

View File

@@ -40,28 +40,15 @@ class DocumentHelper(Signals):
self._default_font = None
self._last_font = None
self._font_tags = {}
def stop(self):
if self._default_font:
self._view.override_font(self._default_font)
self.remove_font_tags()
self.disconnect_signals(self._view)
self._view.textsize_document_helper = None
def remove_font_tags(self):
buf = self._view.get_buffer()
table = buf.get_tag_table()
# Remove all the font tags
for size in self._font_tags:
tag = self._font_tags[size]
table.remove(tag)
self._font_tags = {}
def update_default_font(self):
context = self._view.get_style_context()
description = context.get_font(context.get_state()).copy()
@@ -69,23 +56,6 @@ class DocumentHelper(Signals):
if not self._last_font or description.hash() != self._last_font.hash():
self._default_font = description
def get_font_tags(self, start, end):
tags = set()
# Check all the know font tags
for size in self._font_tags:
tag = self._font_tags[size]
if start.has_tag(tag):
tags.add(tag)
else:
cp = start.copy()
if cp.forward_to_tag_toggle(tag) and cp.compare(end) < 0:
tags.add(tag)
return list(tags)
def set_font_size(self, amount):
self.update_default_font()
@@ -93,61 +63,17 @@ class DocumentHelper(Signals):
description = context.get_font(context.get_state()).copy()
buf = self._view.get_buffer()
bounds = buf.get_selection_bounds()
size = description.get_size() / Pango.SCALE
if not bounds:
if size >= MAX_FONT_SIZE and amount == 1:
return;
if size <= MIN_FONT_SIZE and amount == -1:
return;
if size >= MAX_FONT_SIZE and amount == 1:
return;
if size <= MIN_FONT_SIZE and amount == -1:
return;
description.set_size(max(1, (size + amount)) * Pango.SCALE)
description.set_size(max(1, (size + amount)) * Pango.SCALE)
self._view.override_font(description)
self._last_font = description
else:
start = bounds[0]
end = bounds[1]
tags = self.get_font_tags(start, end)
if not tags:
# Simply use the overall font size as the base
newsize = size + amount
elif len(tags) == 1:
newsize = tags[0].props.font_desc.get_size() / Pango.SCALE + amount
else:
newsize = 0
for tag in tags:
newsize += tag.props.font_desc.get_size() / Pango.SCALE
newsize = round(newsize / len(tags))
if newsize >= MAX_FONT_SIZE and amount == 1:
return;
if newsize <= MIN_FONT_SIZE and amount == -1:
return;
newsize = int(max(1, newsize))
if not newsize in self._font_tags:
newtag = buf.create_tag(None)
desc = description
desc.set_size(newsize * Pango.SCALE)
newtag.props.font_desc = desc
self._font_tags[newsize] = newtag
else:
newtag = self._font_tags[newsize]
# Remove all the previous mix of tags
for tag in tags:
buf.remove_tag(tag, start, end)
buf.apply_tag(newtag, start, end)
self._view.override_font(description)
self._last_font = description
def larger_text(self):
self.set_font_size(1)
@@ -159,18 +85,9 @@ class DocumentHelper(Signals):
self.update_default_font()
buf = self._view.get_buffer()
bounds = buf.get_selection_bounds()
if not bounds:
self.remove_font_tags()
self._view.override_font(self._default_font)
self._last_font = self._default_font
else:
tags = self.get_font_tags(bounds[0], bounds[1])
for tag in tags:
buf.remove_tag(tag, bounds[0], bounds[1])
self._view.override_font(self._default_font)
self._last_font = self._default_font
def on_scroll_event(self, view, event):
state = event.state & Gtk.accelerator_get_default_mod_mask()

View File

@@ -5,4 +5,3 @@ _Name=Insert Date/Time
_Description=Inserts current date and time at the cursor position.
Authors=Paolo Maggi <paolo.maggi@polito.it>;Lee Mallabone <mate@fonicmonkey.net>
Copyright=Copyright © 2002-2005 Paolo Maggi
Website=http://www.mate-desktop.org

View File

@@ -38,10 +38,6 @@
#include "xed-time-plugin.h"
#define XED_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
XED_TYPE_TIME_PLUGIN, \
XedTimePluginPrivate))
#define MENU_PATH "/MenuBar/EditMenu/EditOps_4"
/* GSettings keys */
@@ -166,7 +162,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTimePlugin,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
peas_gtk_configurable_iface_init))
peas_gtk_configurable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedTimePlugin))
static void time_cb (GtkAction *action,
XedTimePlugin *plugin);
@@ -188,7 +185,7 @@ xed_time_plugin_init (XedTimePlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedTimePlugin initializing");
plugin->priv = XED_TIME_PLUGIN_GET_PRIVATE (plugin);
plugin->priv = xed_time_plugin_get_instance_private (plugin);
plugin->priv->settings = g_settings_new (TIME_SCHEMA);
}
@@ -1034,8 +1031,6 @@ xed_time_plugin_class_init (XedTimePluginClass *klass)
object_class->get_property = xed_time_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (object_class, sizeof (XedTimePluginPrivate));
}
static void

View File

@@ -6,4 +6,3 @@ _Description=Removes trailing spaces from lines before saving.
Icon=gtk-cut
Authors=Marty Mills <daggerbot@gmail.com>
Copyright=Copyright © 2015 Marty Mills
Website=http://www.mate-desktop.org

View File

@@ -24,19 +24,8 @@
#include "xed-trail-save-plugin.h"
#define XED_TRAIL_SAVE_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
XED_TYPE_TRAIL_SAVE_PLUGIN, \
XedTrailSavePluginPrivate))
static void xed_window_activatable_iface_init (XedWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTrailSavePlugin,
xed_trail_save_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init))
struct _XedTrailSavePluginPrivate
{
XedWindow *window;
@@ -48,6 +37,14 @@ enum
PROP_WINDOW
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedTrailSavePlugin,
xed_trail_save_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedTrailSavePlugin))
static void
strip_trailing_spaces (GtkTextBuffer *text_buffer)
{
@@ -126,10 +123,15 @@ strip_trailing_spaces (GtkTextBuffer *text_buffer)
}
}
/* Strip trailing lines (except for one) */
if (empty_lines_start != -1 && empty_lines_start != (line_count - 1))
/* Strip trailing lines */
if (empty_lines_start != -1)
{
gtk_text_buffer_get_iter_at_line (text_buffer, &strip_start, empty_lines_start);
// if there's an implicit trailing newline, then we'll end up with 2 trailing lines instead of 1, so lets
// remove an extra one in that case
if (gtk_source_buffer_get_implicit_trailing_newline (GTK_SOURCE_BUFFER (text_buffer))) {
gtk_text_iter_backward_char (&strip_start); // move to the end of the previous line
}
gtk_text_buffer_get_end_iter (text_buffer, &strip_end);
gtk_text_buffer_delete (text_buffer, &strip_start, &strip_end);
}
@@ -230,7 +232,7 @@ xed_trail_save_plugin_init (XedTrailSavePlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedTrailSavePlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, XED_TYPE_TRAIL_SAVE_PLUGIN, XedTrailSavePluginPrivate);
plugin->priv = xed_trail_save_plugin_get_instance_private (plugin);
}
static void
@@ -293,8 +295,6 @@ xed_trail_save_plugin_class_init (XedTrailSavePluginClass *klass)
object_class->get_property = xed_trail_save_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (object_class, sizeof (XedTrailSavePluginPrivate));
}
static void

View File

@@ -29,5 +29,4 @@ Name[zh_CN]=单词补全
Description=Predicts the rest of the word after a few characters have been typed.
Authors=Jesse van den Kieboom <jesse@gnome.org>\nIgnacio Casal Quinteiro <icq@gnome.org>\nMickael Albertus <mickael.albertus@gmail.com>
Copyright=Copyright © 2017 Mickael Albertus\n2009 Jesse van den Kieboom
Website=https://github.com/linuxmint/xed
Version=@VERSION@

View File

@@ -5,5 +5,4 @@ _Name=Word Completion
_Description=Predicts the rest of the word after a few characters have been typed.
Authors=Jesse van den Kieboom <jesse@gnome.org>\nIgnacio Casal Quinteiro <icq@gnome.org>\nMickael Albertus <mickael.albertus@gmail.com>
Copyright=Copyright © 2017 Mickael Albertus\n2009 Jesse van den Kieboom
Website=https://github.com/linuxmint/xed
Version=@VERSION@

View File

@@ -45,23 +45,12 @@ static void xed_window_activatable_iface_init (XedWindowActivatableInterface *if
static void xed_view_activatable_iface_init (XedViewActivatableInterface *iface);
static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedWordCompletionPlugin,
xed_wordcompletion_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_VIEW_ACTIVATABLE,
xed_view_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
peas_gtk_configurable_iface_init))
struct _XedWordCompletionPluginPrivate
{
GtkWidget *window;
XedView *view;
GtkSourceCompletionProvider *provider;
GSettings *settings;
GSettings *settings;
};
enum
@@ -83,14 +72,24 @@ struct _WordCompletionConfigureWidget
GSettings *settings;
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedWordCompletionPlugin,
xed_wordcompletion_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
xed_window_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_VIEW_ACTIVATABLE,
xed_view_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
peas_gtk_configurable_iface_init)
G_ADD_PRIVATE_DYNAMIC (XedWordCompletionPlugin))
static void
xed_wordcompletion_plugin_init (XedWordCompletionPlugin *plugin)
{
xed_debug_message (DEBUG_PLUGINS, "XedWordCompletionPlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
XED_TYPE_WORDCOMPLETION_PLUGIN,
XedWordCompletionPluginPrivate);
plugin->priv = xed_wordcompletion_plugin_get_instance_private (plugin);
plugin->priv->settings = g_settings_new (WORDCOMPLETION_SETTINGS_BASE);
}
@@ -136,9 +135,9 @@ xed_wordcompletion_plugin_dispose (GObject *object)
static void
xed_wordcompletion_plugin_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
XedWordCompletionPlugin *plugin = XED_WORDCOMPLETION_PLUGIN (object);
@@ -217,16 +216,16 @@ create_provider (void)
settings = g_settings_new (WORDCOMPLETION_SETTINGS_BASE);
g_settings_bind (settings, SETTINGS_KEY_MINIMUM_WORD_SIZE,
provider, "minimum-word-size",
G_SETTINGS_BIND_GET);
provider, "minimum-word-size",
G_SETTINGS_BIND_GET);
update_activation (provider, settings);
g_signal_connect_object (settings,
"changed::" SETTINGS_KEY_INTERACTIVE_COMPLETION,
G_CALLBACK (on_interactive_completion_changed_cb),
provider,
0);
"changed::" SETTINGS_KEY_INTERACTIVE_COMPLETION,
G_CALLBACK (on_interactive_completion_changed_cb),
provider,
0);
g_object_unref (settings);
@@ -294,8 +293,7 @@ xed_wordcompletion_view_activate (XedViewActivatable *activatable)
priv->provider = g_object_ref (provider);
gtk_source_completion_add_provider (completion, provider, NULL);
gtk_source_completion_words_register (GTK_SOURCE_COMPLETION_WORDS (provider),
buf);
gtk_source_completion_words_register (GTK_SOURCE_COMPLETION_WORDS (provider), buf);
}
static void
@@ -316,14 +314,13 @@ xed_wordcompletion_view_deactivate (XedViewActivatable *activatable)
priv->provider,
NULL);
gtk_source_completion_words_unregister (GTK_SOURCE_COMPLETION_WORDS (priv->provider),
buf);
gtk_source_completion_words_unregister (GTK_SOURCE_COMPLETION_WORDS (priv->provider), buf);
}
static void
dialog_response_cb (GtkWidget *widget,
gint response,
gpointer data)
dialog_response_cb (GtkWidget *widget,
gint response,
gpointer data)
{
gtk_widget_destroy (widget);
}
@@ -359,37 +356,37 @@ get_configure_widget (XedWordCompletionPlugin *plugin)
data_dir = peas_extension_base_get_data_dir (PEAS_EXTENSION_BASE (plugin));
ui_file = g_build_filename (data_dir, "xed-wordcompletion-configure.ui", NULL);
ret = xed_utils_get_ui_objects (ui_file,
NULL,
&error_widget,
"configure_dialog", &widget->dialog,
"spin_button_min_word_size", &widget->min_word_size,
"check_button_interactive_completion", &widget->interactive_completion,
NULL,
&error_widget,
"configure_dialog", &widget->dialog,
"spin_button_min_word_size", &widget->min_word_size,
"check_button_interactive_completion", &widget->interactive_completion,
NULL);
g_free (data_dir);
g_free (ui_file);
if (!ret)
{
return NULL;
}
{
return NULL;
}
gtk_window_set_modal (GTK_WINDOW (widget->dialog), TRUE);
gtk_window_set_modal (GTK_WINDOW (widget->dialog), TRUE);
g_settings_bind (widget->settings, SETTINGS_KEY_INTERACTIVE_COMPLETION,
widget->interactive_completion, "active",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_GET_NO_CHANGES);
widget->interactive_completion, "active",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_GET_NO_CHANGES);
g_settings_bind (widget->settings, SETTINGS_KEY_MINIMUM_WORD_SIZE,
widget->min_word_size, "value",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_GET_NO_CHANGES);
widget->min_word_size, "value",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_GET_NO_CHANGES);
g_signal_connect (widget->dialog, "destroy",
g_signal_connect (widget->dialog, "destroy",
G_CALLBACK (configure_widget_destroyed), widget);
gtk_widget_show (GTK_WIDGET (widget->dialog));
g_signal_connect (widget->dialog, "response",
G_CALLBACK (dialog_response_cb), widget);
G_CALLBACK (dialog_response_cb), widget);
return widget;
}
@@ -417,8 +414,6 @@ xed_wordcompletion_plugin_class_init (XedWordCompletionPluginClass *klass)
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_object_class_override_property (object_class, PROP_VIEW, "view");
g_type_class_add_private (klass, sizeof (XedWordCompletionPluginPrivate));
}
static void

View File

@@ -47,6 +47,7 @@ hu
hy
ia
id
ie
is
it
ja
@@ -102,6 +103,7 @@ ur
vi
wa
xh
zgh
zh_CN
zh_HK
zh_TW

View File

@@ -1,7 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
[type: gettext/gsettings]data/org.x.editor.gschema.xml.in
data/xed.appdata.xml.in
data/xed.desktop.in.in
xed/xed-app-activatable.c
@@ -78,6 +77,8 @@ plugins/filebrowser/xed-file-browser-store.c
plugins/filebrowser/xed-file-browser-utils.c
plugins/filebrowser/xed-file-browser-view.c
plugins/filebrowser/xed-file-browser-widget.c
plugins/joinlines/joinlines.plugin.desktop.in
plugins/joinlines/joinlines/__init__.py
plugins/modelines/modeline-parser.c
plugins/modelines/modelines.plugin.desktop.in
plugins/modelines/xed-modeline-plugin.c

685
po/ab.po

File diff suppressed because it is too large Load Diff

1051
po/af.po

File diff suppressed because it is too large Load Diff

679
po/am.po

File diff suppressed because it is too large Load Diff

669
po/ar.po

File diff suppressed because it is too large Load Diff

685
po/as.po

File diff suppressed because it is too large Load Diff

685
po/ast.po

File diff suppressed because it is too large Load Diff

685
po/az.po

File diff suppressed because it is too large Load Diff

685
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

675
po/bg.po

File diff suppressed because it is too large Load Diff

685
po/bn.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

685
po/br.po

File diff suppressed because it is too large Load Diff

685
po/bs.po

File diff suppressed because it is too large Load Diff

689
po/ca.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

685
po/crh.po

File diff suppressed because it is too large Load Diff

675
po/cs.po

File diff suppressed because it is too large Load Diff

834
po/cy.po

File diff suppressed because it is too large Load Diff

679
po/da.po

File diff suppressed because it is too large Load Diff

675
po/de.po

File diff suppressed because it is too large Load Diff

685
po/dz.po

File diff suppressed because it is too large Load Diff

687
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1296
po/eo.po

File diff suppressed because it is too large Load Diff

1431
po/es.po

File diff suppressed because it is too large Load Diff

1116
po/et.po

File diff suppressed because it is too large Load Diff

677
po/eu.po

File diff suppressed because it is too large Load Diff

685
po/fa.po

File diff suppressed because it is too large Load Diff

729
po/fi.po

File diff suppressed because it is too large Load Diff

677
po/fr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

685
po/ga.po

File diff suppressed because it is too large Load Diff

685
po/gl.po

File diff suppressed because it is too large Load Diff

685
po/gu.po

File diff suppressed because it is too large Load Diff

1114
po/he.po

File diff suppressed because it is too large Load Diff

1242
po/hi.po

File diff suppressed because it is too large Load Diff

679
po/hr.po

File diff suppressed because it is too large Load Diff

701
po/hu.po

File diff suppressed because it is too large Load Diff

685
po/hy.po

File diff suppressed because it is too large Load Diff

677
po/ia.po

File diff suppressed because it is too large Load Diff

1109
po/id.po

File diff suppressed because it is too large Load Diff

4520
po/ie.po Normal file

File diff suppressed because it is too large Load Diff

689
po/is.po

File diff suppressed because it is too large Load Diff

679
po/it.po

File diff suppressed because it is too large Load Diff

1116
po/ja.po

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More