dino/plugins/http-files/src/plugin.vala

32 lines
972 B
Vala
Raw Normal View History

2017-08-02 15:29:55 +00:00
extern const string GETTEXT_PACKAGE;
extern const string LOCALE_INSTALL_DIR;
namespace Dino.Plugins.HttpFiles {
public class Plugin : RootInterface, Object {
public Dino.Application app;
public ConversationsTitlebarEntry conversations_titlebar_entry;
public void registered(Dino.Application app) {
try {
this.app = app;
2017-08-25 19:20:09 +00:00
this.conversations_titlebar_entry = new ConversationsTitlebarEntry(app.stream_interactor);
2017-08-02 15:29:55 +00:00
this.app.plugin_registry.register_contact_titlebar_entry(conversations_titlebar_entry);
2017-08-25 19:20:09 +00:00
this.app.stream_interactor.module_manager.initialize_account_modules.connect((account, list) => {
2017-08-02 15:29:55 +00:00
list.add(new UploadStreamModule());
});
2017-08-25 19:20:09 +00:00
Manager.start(this.app.stream_interactor);
2017-08-02 15:29:55 +00:00
} catch (Error e) {
print(@"Error initializing http-files: $(e.message)\n");
}
}
public void shutdown() {
// Nothing to do
}
}
}