mirror of
https://gitlab.gnome.org/World/tootle
synced 2025-02-15 19:10:37 +01:00
Fix warnings
This commit is contained in:
parent
61a60e482b
commit
c9836034c0
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.22.1 -->
|
<!-- Generated with glade 3.36.0 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.20"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<template class="TootleWidgetsAccountsButtonItem" parent="GtkGrid">
|
<template class="TootleWidgetsAccountsButtonItem" parent="GtkGrid">
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="remove">
|
<object class="GtkButton" id="forget">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
@ -50,11 +50,11 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="name">
|
<object class="GtkLabel" id="title">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="label" translatable="yes">Name</property>
|
<property name="label" translatable="yes">Title</property>
|
||||||
<property name="ellipsize">end</property>
|
<property name="ellipsize">end</property>
|
||||||
<property name="single_line_mode">True</property>
|
<property name="single_line_mode">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
|
@ -70,7 +70,7 @@ public class Tootle.Cache : GLib.Object {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var item = items.@get (key);
|
//var item = items.@get (key);
|
||||||
|
|
||||||
var message = items_in_progress.@get (key);
|
var message = items_in_progress.@get (key);
|
||||||
if (message == null) {
|
if (message == null) {
|
||||||
|
@ -20,7 +20,6 @@ public class Tootle.Settings : GLib.Settings {
|
|||||||
public Settings () {
|
public Settings () {
|
||||||
Object (schema_id: Build.DOMAIN);
|
Object (schema_id: Build.DOMAIN);
|
||||||
init ("current-account");
|
init ("current-account");
|
||||||
init ("notifications");
|
|
||||||
init ("always-online");
|
init ("always-online");
|
||||||
init ("char-limit");
|
init ("char-limit");
|
||||||
init ("live-updates");
|
init ("live-updates");
|
||||||
|
@ -8,17 +8,17 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
|
|||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Widgets.Avatar avatar;
|
private Widgets.Avatar avatar;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Label name;
|
private Label title;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Label handle;
|
private Label handle;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Button profile;
|
private Button profile;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Button remove;
|
private Button forget;
|
||||||
|
|
||||||
public Item (InstanceAccount acc, AccountsButton _self) {
|
public Item (InstanceAccount acc, AccountsButton _self) {
|
||||||
avatar.url = acc.avatar;
|
avatar.url = acc.avatar;
|
||||||
name.label = acc.display_name;
|
title.label = acc.display_name;
|
||||||
handle.label = acc.handle;
|
handle.label = acc.handle;
|
||||||
|
|
||||||
profile.clicked.connect (() => {
|
profile.clicked.connect (() => {
|
||||||
@ -26,17 +26,17 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
|
|||||||
_self.active = false;
|
_self.active = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
remove.clicked.connect (() => {
|
forget.clicked.connect (() => {
|
||||||
_self.active = false;
|
_self.active = false;
|
||||||
accounts.remove (acc);
|
accounts.remove (acc);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item.add_new () {
|
public Item.add_new () {
|
||||||
name.label = _("New Account");
|
title.label = _("New Account");
|
||||||
handle.label = _("Click to add");
|
handle.label = _("Click to add");
|
||||||
profile.destroy ();
|
profile.destroy ();
|
||||||
remove.destroy ();
|
forget.destroy ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,8 +44,8 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
|
|||||||
|
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private Widgets.Avatar avatar;
|
private Widgets.Avatar avatar;
|
||||||
[GtkChild]
|
// [GtkChild]
|
||||||
private Spinner spinner;
|
// private Spinner spinner;
|
||||||
|
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private ListBox account_list;
|
private ListBox account_list;
|
||||||
@ -62,8 +62,6 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
|
|||||||
private ModelButton item_favs;
|
private ModelButton item_favs;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
private ModelButton item_direct;
|
private ModelButton item_direct;
|
||||||
[GtkChild]
|
|
||||||
private ModelButton item_watchlist;
|
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
connect_account ();
|
connect_account ();
|
||||||
|
@ -74,11 +74,7 @@ public class Tootle.Widgets.Status : EventBox {
|
|||||||
|
|
||||||
protected string date {
|
protected string date {
|
||||||
owned get {
|
owned get {
|
||||||
var timeval = GLib.TimeVal ();
|
var date = new GLib.DateTime.from_iso8601 (status.formal.created_at, null);
|
||||||
GLib.DateTime? date = null;
|
|
||||||
if (timeval.from_iso8601 (status.formal.created_at))
|
|
||||||
date = new GLib.DateTime.from_timeval_local (timeval);
|
|
||||||
|
|
||||||
return Granite.DateTime.get_relative_datetime (date);
|
return Granite.DateTime.get_relative_datetime (date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user