Rename Manager classes

This commit is contained in:
bleakgrey 2018-06-17 10:48:18 +03:00
parent 8ef015be91
commit 48f4e44669
5 changed files with 15 additions and 15 deletions

View File

@ -22,10 +22,10 @@ executable(
'src/Desktop.vala',
'src/Html.vala',
'src/MainWindow.vala',
'src/SettingsManager.vala',
'src/AccountManager.vala',
'src/Settings.vala',
'src/Accounts.vala',
'src/ImageCache.vala',
'src/NetManager.vala',
'src/Network.vala',
'src/Notificator.vala',
'src/InstanceAccount.vala',
'src/API/Account.vala',

View File

@ -1,6 +1,6 @@
using GLib;
public class Tootle.AccountManager : Object{
public class Tootle.Accounts : Object{
private string dir_path;
private string file_path;
@ -12,7 +12,7 @@ public class Tootle.AccountManager : Object{
public InstanceAccount? formal {get; set;}
public Account? current {get; set;}
public AccountManager(){
public Accounts (){
Object();
dir_path = "%s/%s".printf (GLib.Environment.get_user_config_dir (), Tootle.app.application_id);
file_path = "%s/%s".printf (dir_path, "accounts.json");

View File

@ -7,9 +7,9 @@ namespace Tootle{
public static MainWindow? window;
public static Window window_dummy;
public static SettingsManager settings;
public static AccountManager accounts;
public static NetManager network;
public static Settings settings;
public static Accounts accounts;
public static Network network;
public static ImageCache image_cache;
public class Application : Granite.Application {
@ -34,9 +34,9 @@ namespace Tootle{
protected override void startup () {
base.startup ();
settings = new SettingsManager ();
accounts = new AccountManager ();
network = new NetManager ();
settings = new Settings ();
accounts = new Accounts ();
network = new Network ();
image_cache = new ImageCache ();
accounts.init ();

View File

@ -3,7 +3,7 @@ using GLib;
using Gdk;
using Json;
public class Tootle.NetManager : GLib.Object {
public class Tootle.Network : GLib.Object {
public abstract signal void started ();
public abstract signal void finished ();
@ -30,7 +30,7 @@ public class Tootle.NetManager : GLib.Object {
// session.add_feature (logger);
}
public NetManager() {
public Network () {
GLib.Object();
}

View File

@ -1,4 +1,4 @@
public class Tootle.SettingsManager : Granite.Services.Settings {
public class Tootle.Settings : Granite.Services.Settings {
public int current_account { get; set; }
public bool notifications { get; set; }
@ -10,7 +10,7 @@ public class Tootle.SettingsManager : Granite.Services.Settings {
public bool live_updates_public { get; set; }
public bool dark_theme { get; set; }
public SettingsManager () {
public Settings () {
base ("com.github.bleakgrey.tootle");
}