1
0
mirror of https://gitlab.gnome.org/World/tootle synced 2025-02-13 01:50:37 +01:00

Fix warnings

This commit is contained in:
Bleak Grey 2020-05-30 19:48:20 +03:00
parent 61a60e482b
commit c9836034c0
5 changed files with 14 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<!-- Generated with glade 3.36.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="TootleWidgetsAccountsButtonItem" parent="GtkGrid">
@ -23,7 +23,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="remove">
<object class="GtkButton" id="forget">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@ -50,11 +50,11 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="name">
<object class="GtkLabel" id="title">
<property name="visible">True</property>
<property name="can_focus">False</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="single_line_mode">True</property>
<property name="xalign">0</property>

View File

@ -70,7 +70,7 @@ public class Tootle.Cache : GLib.Object {
return;
}
var item = items.@get (key);
//var item = items.@get (key);
var message = items_in_progress.@get (key);
if (message == null) {

View File

@ -20,7 +20,6 @@ public class Tootle.Settings : GLib.Settings {
public Settings () {
Object (schema_id: Build.DOMAIN);
init ("current-account");
init ("notifications");
init ("always-online");
init ("char-limit");
init ("live-updates");

View File

@ -8,17 +8,17 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
[GtkChild]
private Widgets.Avatar avatar;
[GtkChild]
private Label name;
private Label title;
[GtkChild]
private Label handle;
[GtkChild]
private Button profile;
[GtkChild]
private Button remove;
private Button forget;
public Item (InstanceAccount acc, AccountsButton _self) {
avatar.url = acc.avatar;
name.label = acc.display_name;
title.label = acc.display_name;
handle.label = acc.handle;
profile.clicked.connect (() => {
@ -26,17 +26,17 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
_self.active = false;
});
remove.clicked.connect (() => {
forget.clicked.connect (() => {
_self.active = false;
accounts.remove (acc);
});
}
public Item.add_new () {
name.label = _("New Account");
title.label = _("New Account");
handle.label = _("Click to add");
profile.destroy ();
remove.destroy ();
forget.destroy ();
}
}
@ -44,8 +44,8 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
[GtkChild]
private Widgets.Avatar avatar;
[GtkChild]
private Spinner spinner;
// [GtkChild]
// private Spinner spinner;
[GtkChild]
private ListBox account_list;
@ -62,8 +62,6 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
private ModelButton item_favs;
[GtkChild]
private ModelButton item_direct;
[GtkChild]
private ModelButton item_watchlist;
construct {
connect_account ();

View File

@ -74,11 +74,7 @@ public class Tootle.Widgets.Status : EventBox {
protected string date {
owned get {
var timeval = GLib.TimeVal ();
GLib.DateTime? date = null;
if (timeval.from_iso8601 (status.formal.created_at))
date = new GLib.DateTime.from_timeval_local (timeval);
var date = new GLib.DateTime.from_iso8601 (status.formal.created_at, null);
return Granite.DateTime.get_relative_datetime (date);
}
}