Preparation for AppCenter
This commit is contained in:
parent
ffa44d699b
commit
74881464d4
|
@ -5,27 +5,49 @@
|
|||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0+</project_license>
|
||||
<name>Tootle</name>
|
||||
<summary>Mastodon Client</summary>
|
||||
<summary>Lighting fast client for Mastodon</summary>
|
||||
|
||||
<description>
|
||||
<p>
|
||||
A client for Mastodon
|
||||
Tootle is a client for the world’s largest free, open-source, decentralized microblogging network with real-time notifications and multiple accounts support.
|
||||
</p>
|
||||
<p>
|
||||
Mastodon is lovely crafted with power and speed in mind, resulting in a free, independent and popular alternative to the centralized social networks.
|
||||
</p>
|
||||
<p>
|
||||
Anyone can run a server of Mastodon. Each server hosts individual user accounts, the content they produce, and the content they are subscribed. Every user can follow each other and share their posts regardless of their server.
|
||||
</p>
|
||||
<p>
|
||||
Would you like to join Mastodon? Visit https://joinmastodon.org/ to get started.
|
||||
</p>
|
||||
</description>
|
||||
|
||||
<provides>
|
||||
<binary>com.github.bleakgrey.tootle</binary>
|
||||
</provides>
|
||||
|
||||
<developer_name>bleak_grey</developer_name>
|
||||
<url type="homepage">https://github.com/bleakgrey</url>
|
||||
<url type="bugtracker">https://github.com/bleakgrey/tootle/issues</url>
|
||||
<url type="donation">https://www.paypal.me/bleakgrey</url>
|
||||
<url type="donation">https://liberapay.com/bleakgrey/donate</url>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/bleakgrey/tootle/master/data/screenshot.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/bleakgrey/tootle/master/data/screenshot2.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/bleakgrey/tootle/master/data/screenshot3.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/bleakgrey/tootle/master/data/screenshot4.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="0.1.0" date="2018-03-01">
|
||||
<release version="0.1.0" date="2018-05-31">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Initial release</li>
|
||||
|
@ -33,5 +55,10 @@
|
|||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
|
||||
<custom>
|
||||
<value key="x-appcenter-color-primary">#F5F8FF</value>
|
||||
<value key="x-appcenter-color-primary-text">#413F58</value>
|
||||
</custom>
|
||||
|
||||
</component>
|
||||
|
|
|
@ -8,6 +8,5 @@ Icon=com.github.bleakgrey.tootle
|
|||
Terminal=false
|
||||
Categories=GNOME;GTK;Network;
|
||||
Keywords=toot;mastodon;social;network;post;
|
||||
MimeType=text/plain;
|
||||
StartupNotify=true
|
||||
X-GNOME-Gettext-Domain=com.github.bleakgrey.tootle
|
||||
X-GNOME-UsesNotifications=true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@define-color colorAccent #9aa7c8;
|
||||
@define-color colorPrimary #333542;
|
||||
@define-color colorAccent #c92e34;
|
||||
@define-color colorPrimary #35393c;
|
||||
|
||||
.header-counters{
|
||||
background: rgba(0,0,0,.2);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 160 KiB |
Binary file not shown.
After Width: | Height: | Size: 246 KiB |
Binary file not shown.
After Width: | Height: | Size: 175 KiB |
Binary file not shown.
After Width: | Height: | Size: 248 KiB |
|
@ -14,4 +14,4 @@ Package: com.github.bleakgrey.tootle
|
|||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: Mastodon client
|
||||
Fast and beautiful Mastodon client.
|
||||
Lightning fast Mastodon client.
|
||||
|
|
|
@ -8,7 +8,7 @@ public class Tootle.AccountManager : Object{
|
|||
public abstract signal void switched (Account? account);
|
||||
public abstract signal void updated (GenericArray<InstanceAccount> accounts);
|
||||
|
||||
private GenericArray<InstanceAccount> saved_accounts = new GenericArray<InstanceAccount> ();
|
||||
public GenericArray<InstanceAccount> saved_accounts = new GenericArray<InstanceAccount> ();
|
||||
public InstanceAccount? formal {get; set;}
|
||||
public Account? current {get; set;}
|
||||
|
||||
|
@ -18,11 +18,6 @@ public class Tootle.AccountManager : Object{
|
|||
file_path = "%s/%s".printf (dir_path, "accounts.json");
|
||||
}
|
||||
|
||||
public void signal_current () {
|
||||
switched (current);
|
||||
updated (saved_accounts);
|
||||
}
|
||||
|
||||
public void switch_account (int id){
|
||||
debug ("Switching to account #%i", id);
|
||||
Tootle.settings.current_account = id;
|
||||
|
@ -83,10 +78,8 @@ public class Tootle.AccountManager : Object{
|
|||
save (false);
|
||||
load ();
|
||||
|
||||
if (saved_accounts.length < 1) {
|
||||
switched (null);
|
||||
if (saved_accounts.length < 1)
|
||||
NewAccountDialog.open ();
|
||||
}
|
||||
else
|
||||
switch_account (Tootle.settings.current_account);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,11 @@ namespace Tootle{
|
|||
public static int main (string[] args) {
|
||||
Gtk.init (ref args);
|
||||
app = new Application ();
|
||||
return app.run (args);
|
||||
}
|
||||
|
||||
protected override void startup () {
|
||||
base.startup ();
|
||||
|
||||
settings = new SettingsManager ();
|
||||
accounts = new AccountManager ();
|
||||
|
@ -36,32 +41,21 @@ namespace Tootle{
|
|||
accounts.init ();
|
||||
|
||||
app.error.connect (app.on_error);
|
||||
return app.run (args);
|
||||
}
|
||||
|
||||
protected override void startup () {
|
||||
base.startup ();
|
||||
|
||||
window_dummy = new Window ();
|
||||
add_window (window_dummy);
|
||||
}
|
||||
|
||||
protected override void activate () {
|
||||
if (window != null) {
|
||||
debug ("Reopening window");
|
||||
if (!accounts.is_empty ())
|
||||
window.present ();
|
||||
else
|
||||
NewAccountDialog.open ();
|
||||
}
|
||||
if (window != null)
|
||||
return;
|
||||
|
||||
debug ("Creating new window");
|
||||
if (accounts.is_empty ())
|
||||
NewAccountDialog.open ();
|
||||
else {
|
||||
debug ("Creating new window");
|
||||
if (accounts.is_empty ())
|
||||
NewAccountDialog.open ();
|
||||
else {
|
||||
window = new MainWindow (this);
|
||||
window.present ();
|
||||
}
|
||||
window = new MainWindow (this);
|
||||
window.present ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public class Tootle.MainWindow: Gtk.Window {
|
|||
app.toast.connect (on_toast);
|
||||
network.started.connect (() => spinner.show ());
|
||||
network.finished.connect (() => spinner.hide ());
|
||||
accounts.signal_current ();
|
||||
accounts.updated (accounts.saved_accounts);
|
||||
}
|
||||
|
||||
private void add_header_view (AbstractView view) {
|
||||
|
|
|
@ -81,11 +81,11 @@ public class Tootle.AccountView : TimelineView {
|
|||
menu_mute = new Gtk.MenuItem.with_label (_("Mute"));
|
||||
menu_block = new Gtk.MenuItem.with_label (_("Block"));
|
||||
menu.add (menu_mention);
|
||||
menu.add (new Gtk.SeparatorMenuItem ());
|
||||
//menu.add (new Gtk.SeparatorMenuItem ());
|
||||
menu.add (menu_mute);
|
||||
menu.add (menu_block);
|
||||
//menu.add (menu_report); //TODO: Report users
|
||||
menu.add (menu_edit); //TODO: Edit profile
|
||||
//menu.add (menu_edit); //TODO: Edit profile
|
||||
menu.show_all ();
|
||||
|
||||
button_follow = add_counter ("contact-new-symbolic");
|
||||
|
@ -111,12 +111,12 @@ public class Tootle.AccountView : TimelineView {
|
|||
account = acc;
|
||||
account.updated.connect(rebind);
|
||||
|
||||
add_counter (_("TOOTS"), 1, account.statuses_count);
|
||||
add_counter (_("FOLLOWS"), 2, account.following_count).clicked.connect (() => {
|
||||
add_counter (_("Toots"), 1, account.statuses_count);
|
||||
add_counter (_("Follows"), 2, account.following_count).clicked.connect (() => {
|
||||
var view = new FollowingView (ref account);
|
||||
Tootle.window.open_view (view);
|
||||
});
|
||||
add_counter (_("FOLLOWERS"), 3, account.followers_count).clicked.connect (() => {
|
||||
add_counter (_("Followers"), 3, account.followers_count).clicked.connect (() => {
|
||||
var view = new FollowersView (ref account);
|
||||
Tootle.window.open_view (view);
|
||||
});
|
||||
|
@ -177,15 +177,17 @@ public class Tootle.AccountView : TimelineView {
|
|||
}
|
||||
|
||||
public override bool is_status_owned (ref Status status) {
|
||||
return status.get_formal().account.id == account.id;
|
||||
return status.is_owned ();
|
||||
}
|
||||
|
||||
private Gtk.Button add_counter (string name, int? i = null, int64? val = null) {
|
||||
Gtk.Button btn;
|
||||
if (val != null){
|
||||
btn = new Gtk.Button ();
|
||||
var label = new Gtk.Label (name + "\n" + val.to_string ());
|
||||
var label = new Gtk.Label ("<b>%s</b>\n%s".printf (name.up (), val.to_string ()));
|
||||
label.justify = Gtk.Justification.CENTER;
|
||||
label.use_markup = true;
|
||||
label.margin = 8;
|
||||
btn.add (label);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -73,6 +73,11 @@ public class Tootle.NotificationsView : AbstractView {
|
|||
}
|
||||
|
||||
public void request () {
|
||||
if (accounts.current == null) {
|
||||
empty_state ();
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "%s/api/v1/follow_requests".printf (Tootle.accounts.formal.instance);
|
||||
var msg = new Soup.Message("GET", url);
|
||||
Tootle.network.queue(msg, (sess, mess) => {
|
||||
|
|
|
@ -39,7 +39,7 @@ public class Tootle.TimelineView : AbstractView {
|
|||
}
|
||||
|
||||
public virtual bool is_status_owned (ref Status status) {
|
||||
return status.is_owned ();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void prepend (ref Status status) {
|
||||
|
|
|
@ -145,6 +145,8 @@ public class Tootle.AccountsButton : Gtk.MenuButton{
|
|||
list.select_row (row);
|
||||
}
|
||||
|
||||
public AccountsButton() {}
|
||||
public AccountsButton() {
|
||||
account_switched (accounts.current);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue