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/Desktop.vala',
'src/Html.vala', 'src/Html.vala',
'src/MainWindow.vala', 'src/MainWindow.vala',
'src/SettingsManager.vala', 'src/Settings.vala',
'src/AccountManager.vala', 'src/Accounts.vala',
'src/ImageCache.vala', 'src/ImageCache.vala',
'src/NetManager.vala', 'src/Network.vala',
'src/Notificator.vala', 'src/Notificator.vala',
'src/InstanceAccount.vala', 'src/InstanceAccount.vala',
'src/API/Account.vala', 'src/API/Account.vala',

View File

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

View File

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

View File

@ -3,7 +3,7 @@ using GLib;
using Gdk; using Gdk;
using Json; using Json;
public class Tootle.NetManager : GLib.Object { public class Tootle.Network : GLib.Object {
public abstract signal void started (); public abstract signal void started ();
public abstract signal void finished (); public abstract signal void finished ();
@ -30,7 +30,7 @@ public class Tootle.NetManager : GLib.Object {
// session.add_feature (logger); // session.add_feature (logger);
} }
public NetManager() { public Network () {
GLib.Object(); 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 int current_account { get; set; }
public bool notifications { 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 live_updates_public { get; set; }
public bool dark_theme { get; set; } public bool dark_theme { get; set; }
public SettingsManager () { public Settings () {
base ("com.github.bleakgrey.tootle"); base ("com.github.bleakgrey.tootle");
} }