Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ namespace Scratch {
public const string ACTION_REVERT = "action-revert";
public const string ACTION_SAVE = "action-save";
public const string ACTION_SAVE_AS = "action-save-as";
public const string ACTION_TEMPLATES = "action-templates";
public const string ACTION_SHOW_REPLACE = "action-show-replace";
public const string ACTION_TO_LOWER_CASE = "action-to-lower-case";
public const string ACTION_TO_UPPER_CASE = "action-to-upper-case";
Expand Down Expand Up @@ -149,7 +148,6 @@ namespace Scratch {
{ ACTION_SAVE, action_save },
{ ACTION_SAVE_AS, action_save_as },
{ ACTION_TOGGLE_SHOW_FIND, action_toggle_show_find, null, "false" },
{ ACTION_TEMPLATES, action_templates },
{ ACTION_GO_TO, action_go_to },
{ ACTION_SORT_LINES, action_sort_lines },
{ ACTION_NEW_TAB, action_new_tab },
Expand Down Expand Up @@ -342,10 +340,6 @@ namespace Scratch {
// Show/Hide widgets
show_all ();

toolbar.templates_button.visible = (plugins.plugin_iface.template_manager.template_available);
plugins.plugin_iface.template_manager.notify["template_available"].connect (() => {
toolbar.templates_button.visible = (plugins.plugin_iface.template_manager.template_available);
});

// Create folder for unsaved documents
create_unsaved_documents_directory ();
Expand Down Expand Up @@ -1371,9 +1365,6 @@ namespace Scratch {
toolbar.format_bar.line_menubutton.active = true;
}

private void action_templates () {
plugins.plugin_iface.template_manager.show_window (this);
}

private void action_to_lower_case () {
var doc = document_view.current_document;
Expand Down
5 changes: 0 additions & 5 deletions src/Services/PluginManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class Scratch.Services.Interface : GLib.Object {
public signal void hook_preferences_dialog (Scratch.Dialogs.Preferences dialog);
public signal void hook_folder_item_change (File file, File? other_file, FileMonitorEvent event_type);

public Scratch.TemplateManager template_manager { get; private set; }
public Scratch.Services.PluginsManager manager { get; construct; }

public Interface (Scratch.Services.PluginsManager _manager) {
Expand All @@ -31,10 +30,6 @@ public class Scratch.Services.Interface : GLib.Object {
);
}

construct {
template_manager = new Scratch.TemplateManager ();
}

public Scratch.Services.Document open_file (File file) {
var doc = new Scratch.Services.Document (manager.window.actions, file);
manager.window.open_document.begin (doc);
Expand Down
274 changes: 0 additions & 274 deletions src/Services/TemplateManager.vala

This file was deleted.

6 changes: 0 additions & 6 deletions src/Widgets/HeaderBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class Scratch.HeaderBar : Hdy.HeaderBar {
public GLib.Menu share_menu;
public Gtk.MenuButton share_menu_button;

public Gtk.Button templates_button { get; private set; }
public Gtk.ToggleButton find_button { get; private set; }
public Gtk.ToggleButton outline_button { get; private set; }
public Gtk.ToggleButton sidebar_button { get; private set; }
Expand Down Expand Up @@ -38,10 +37,6 @@ public class Scratch.HeaderBar : Hdy.HeaderBar {
_("Open a file")
);

templates_button = new Gtk.Button.from_icon_name ("text-x-generic-template", Gtk.IconSize.LARGE_TOOLBAR) {
action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_TEMPLATES
};
templates_button.tooltip_text = _("Project templates");

var save_button = new Gtk.Button.from_icon_name ("document-save", Gtk.IconSize.LARGE_TOOLBAR) {
action_name = MainWindow.ACTION_PREFIX + MainWindow.ACTION_SAVE
Expand Down Expand Up @@ -246,7 +241,6 @@ public class Scratch.HeaderBar : Hdy.HeaderBar {
set_custom_title (format_bar);

pack_start (open_button);
pack_start (templates_button);
pack_start (save_button);
pack_start (save_as_button);
pack_start (revert_button);
Expand Down
1 change: 0 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ code_files = files(
'Services/PluginManager.vala',
'Services/RestoreOverride.vala',
'Services/Settings.vala',
'Services/TemplateManager.vala',
'Widgets/ChooseProjectButton.vala',
'Widgets/DocumentView.vala',
'Widgets/FormatBar.vala',
Expand Down