Skip to content

Commit 09b30dc

Browse files
committed
First compilable version
1 parent dc70732 commit 09b30dc

File tree

15 files changed

+214
-40
lines changed

15 files changed

+214
-40
lines changed

meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ gtk_dep = dependency('gtk+-3.0', version: '>=3.6.0')
3333
granite_dep = dependency('granite', version: '>=6.0.0')
3434
handy_dep = dependency('libhandy-1', version: '>=0.90.0')
3535
gtksourceview_dep = dependency('gtksourceview-4')
36-
peas_dep = dependency('libpeas-1.0')
37-
peasgtk_dep = dependency('libpeas-gtk-1.0')
36+
peas_dep = dependency('libpeas-2')
37+
# peasgtk_dep = dependency('libpeas-gtk-1.0')
3838
git_dep = dependency('libgit2-glib-1.0')
3939
fontconfig_dep = dependency('fontconfig')
4040
pangofc_dep = dependency('pangoft2')
@@ -59,7 +59,7 @@ dependencies = [
5959
handy_dep,
6060
gtksourceview_dep,
6161
peas_dep,
62-
peasgtk_dep,
62+
# peasgtk_dep,
6363
git_dep,
6464
fontconfig_dep,
6565
pangofc_dep,

plugins/brackets-completion/brackets-completion.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
END LICENSE
1919
***/
2020

21-
public class Scratch.Plugins.BracketsCompletion : Peas.ExtensionBase, Peas.Activatable {
21+
public class Scratch.Plugins.BracketsCompletion : Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
2222
Gee.HashMap<string, string> brackets;
2323
Gee.HashMap<uint, string> keys;
2424
const string[] VALID_NEXT_CHARS = {
@@ -278,6 +278,6 @@ public class Scratch.Plugins.BracketsCompletion : Peas.ExtensionBase, Peas.Activ
278278
[ModuleInit]
279279
public void peas_register_types (GLib.TypeModule module) {
280280
var objmodule = module as Peas.ObjectModule;
281-
objmodule.register_extension_type (typeof (Peas.Activatable),
281+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin),
282282
typeof (Scratch.Plugins.BracketsCompletion));
283283
}

plugins/detect-indent/detect-indent.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public class Scratch.Plugins.DetectIndent: Peas.ExtensionBase, Peas.Activatable {
1+
public class Scratch.Plugins.DetectIndent: Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
22
const int MAX_LINES = 500;
33

44
Scratch.Services.Interface plugins;
@@ -79,7 +79,7 @@ public class Scratch.Plugins.DetectIndent: Peas.ExtensionBase, Peas.Activatable
7979
public void peas_register_types (GLib.TypeModule module) {
8080
var objmodule = module as Peas.ObjectModule;
8181
objmodule.register_extension_type (
82-
typeof (Peas.Activatable),
82+
typeof (Scratch.Services.ActivatablePlugin),
8383
typeof (Scratch.Plugins.DetectIndent)
8484
);
8585
}

plugins/editorconfig/editorconfig.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Boston, MA 02110-1301 USA
1818
*/
1919

20-
public class Scratch.Plugins.EditorConfigPlugin: Peas.ExtensionBase, Peas.Activatable {
20+
public class Scratch.Plugins.EditorConfigPlugin: Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
2121
Scratch.Services.Interface plugins;
2222
public Object object { owned get; construct; }
2323
private Code.FormatBar format_bar;
@@ -91,5 +91,5 @@ public class Scratch.Plugins.EditorConfigPlugin: Peas.ExtensionBase, Peas.Activa
9191
[ModuleInit]
9292
public void peas_register_types (GLib.TypeModule module) {
9393
var objmodule = module as Peas.ObjectModule;
94-
objmodule.register_extension_type (typeof (Peas.Activatable), typeof (Scratch.Plugins.EditorConfigPlugin));
94+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin), typeof (Scratch.Plugins.EditorConfigPlugin));
9595
}

plugins/fuzzy-search/fuzzy-search.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88

9-
public class Scratch.Plugins.FuzzySearch: Peas.ExtensionBase, Peas.Activatable {
9+
public class Scratch.Plugins.FuzzySearch: Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
1010
public Object object { owned get; construct; }
1111
private const uint ACCEL_KEY = Gdk.Key.F;
1212
private const Gdk.ModifierType ACCEL_MODTYPE = Gdk.ModifierType.MOD1_MASK;
@@ -158,7 +158,7 @@ public class Scratch.Plugins.FuzzySearch: Peas.ExtensionBase, Peas.Activatable {
158158
public void peas_register_types (GLib.TypeModule module) {
159159
var objmodule = module as Peas.ObjectModule;
160160
objmodule.register_extension_type (
161-
typeof (Peas.Activatable),
161+
typeof (Scratch.Services.ActivatablePlugin),
162162
typeof (Scratch.Plugins.FuzzySearch)
163163
);
164164
}

plugins/highlight-word-selection/highlight-word-selection.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
END LICENSE
1919
***/
2020

21-
public class Scratch.Plugins.HighlightSelectedWords : Peas.ExtensionBase, Peas.Activatable {
21+
public class Scratch.Plugins.HighlightSelectedWords : Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
2222
Scratch.Widgets.SourceView current_source;
2323
Scratch.MainWindow? main_window = null;
2424
Gtk.SourceSearchContext? current_search_context = null;
@@ -151,6 +151,6 @@ public class Scratch.Plugins.HighlightSelectedWords : Peas.ExtensionBase, Peas.A
151151
[ModuleInit]
152152
public void peas_register_types (TypeModule module) {
153153
var objmodule = module as Peas.ObjectModule;
154-
objmodule.register_extension_type (typeof (Peas.Activatable),
154+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin),
155155
typeof (Scratch.Plugins.HighlightSelectedWords));
156156
}

plugins/markdown-actions/markdown-actions.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
END LICENSE
1919
***/
2020

21-
public class Code.Plugins.MarkdownActions : Peas.ExtensionBase, Peas.Activatable {
21+
public class Code.Plugins.MarkdownActions : Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
2222
Scratch.Widgets.SourceView current_source;
2323
Scratch.Services.Interface plugins;
2424

@@ -243,6 +243,6 @@ public class Code.Plugins.MarkdownActions : Peas.ExtensionBase, Peas.Activatable
243243
[ModuleInit]
244244
public void peas_register_types (TypeModule module) {
245245
var objmodule = module as Peas.ObjectModule;
246-
objmodule.register_extension_type (typeof (Peas.Activatable),
246+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin),
247247
typeof (Code.Plugins.MarkdownActions));
248248
}

plugins/pastebin/pastebin.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace Scratch.Services {
6868
}
6969
}
7070

71-
public class Scratch.Plugins.Pastebin : Peas.ExtensionBase, Peas.Activatable {
71+
public class Scratch.Plugins.Pastebin : Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
7272
GLib.MenuItem? menuitem = null;
7373
GLib.Menu? share_menu = null;
7474
public Object object { owned get; construct; }
@@ -147,6 +147,6 @@ public class Scratch.Plugins.Pastebin : Peas.ExtensionBase, Peas.Activatable {
147147
[ModuleInit]
148148
public void peas_register_types (GLib.TypeModule module) {
149149
var objmodule = module as Peas.ObjectModule;
150-
objmodule.register_extension_type (typeof (Peas.Activatable),
150+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin),
151151
typeof (Scratch.Plugins.Pastebin));
152152
}

plugins/preserve-indent/preserve-indent.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
END LICENSE
1919
***/
2020

21-
public class Scratch.Plugins.PreserveIndent : Peas.ExtensionBase, Peas.Activatable {
21+
public class Scratch.Plugins.PreserveIndent : Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
2222

2323
private Scratch.Services.Interface plugins;
2424
private Gee.TreeSet<weak Services.Document> documents;
@@ -244,6 +244,6 @@ public class Scratch.Plugins.PreserveIndent : Peas.ExtensionBase, Peas.Activatab
244244
[ModuleInit]
245245
public void peas_register_types (GLib.TypeModule module) {
246246
var objmodule = module as Peas.ObjectModule;
247-
objmodule.register_extension_type (typeof (Peas.Activatable),
247+
objmodule.register_extension_type (typeof (Scratch.Services.ActivatablePlugin),
248248
typeof (Scratch.Plugins.PreserveIndent));
249249
}

plugins/spell/spell.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* with this program. If not, see <http://www.gnu.org/licenses/>
1414
*/
1515

16-
public class Scratch.Plugins.Spell: Peas.ExtensionBase, Peas.Activatable {
16+
public class Scratch.Plugins.Spell: Peas.ExtensionBase, Scratch.Services.ActivatablePlugin {
1717

1818
Scratch.Services.Interface plugins;
1919

@@ -160,7 +160,7 @@ public class Scratch.Plugins.Spell: Peas.ExtensionBase, Peas.Activatable {
160160
public void peas_register_types (GLib.TypeModule module) {
161161
var objmodule = module as Peas.ObjectModule;
162162
objmodule.register_extension_type (
163-
typeof (Peas.Activatable),
163+
typeof (Scratch.Services.ActivatablePlugin),
164164
typeof (Scratch.Plugins.Spell)
165165
);
166166
}

0 commit comments

Comments
 (0)