more verbose logging
This commit is contained in:
@@ -106,6 +106,7 @@ class LemonadeWindow(Gtk.ApplicationWindow):
|
|||||||
self.home()
|
self.home()
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
|
logger.debug("Lemonade:home")
|
||||||
self.sw = Gtk.ScrolledWindow()
|
self.sw = Gtk.ScrolledWindow()
|
||||||
self.sw.set_hexpand(False)
|
self.sw.set_hexpand(False)
|
||||||
self.sw.set_vexpand(True)
|
self.sw.set_vexpand(True)
|
||||||
@@ -133,6 +134,7 @@ class LemonadeWindow(Gtk.ApplicationWindow):
|
|||||||
self.refresh()
|
self.refresh()
|
||||||
|
|
||||||
def refresh(self, *args):
|
def refresh(self, *args):
|
||||||
|
logger.debug("Lemonade:refresh")
|
||||||
self.communities = requests.get("https://lemmy.ml/api/v3/community/list?sort=Hot").json()
|
self.communities = requests.get("https://lemmy.ml/api/v3/community/list?sort=Hot").json()
|
||||||
for community in self.communities["communities"]:
|
for community in self.communities["communities"]:
|
||||||
def open_community(self, *args):
|
def open_community(self, *args):
|
||||||
@@ -191,9 +193,11 @@ class LemonadeWindow(Gtk.ApplicationWindow):
|
|||||||
box.append(avatar)
|
box.append(avatar)
|
||||||
box.append(label)
|
box.append(label)
|
||||||
def on_quit(self, action, param=None):
|
def on_quit(self, action, param=None):
|
||||||
|
logger.debug("Lemonade:on_quit")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
def on_about(self, action, param=None):
|
def on_about(self, action, param=None):
|
||||||
|
logger.debug("Lemonade:on_about")
|
||||||
self.about = Adw.AboutWindow.new()
|
self.about = Adw.AboutWindow.new()
|
||||||
|
|
||||||
self.about.set_application_name("Lemonade")
|
self.about.set_application_name("Lemonade")
|
||||||
@@ -220,6 +224,7 @@ GTK version: {Gtk.get_major_version()}.{Gtk.get_minor_version()}.{Gtk.get_micro_
|
|||||||
self.about.show()
|
self.about.show()
|
||||||
|
|
||||||
def on_login(self, action, param=None):
|
def on_login(self, action, param=None):
|
||||||
|
logger.debug("Lemonade:on_login")
|
||||||
status = Adw.StatusPage().new()
|
status = Adw.StatusPage().new()
|
||||||
status.set_icon_name("arrow-into-box-symbolic")
|
status.set_icon_name("arrow-into-box-symbolic")
|
||||||
status.set_title("Log in")
|
status.set_title("Log in")
|
||||||
@@ -231,6 +236,7 @@ class Lemonade(Adw.Application):
|
|||||||
self.connect('activate', self.on_activate)
|
self.connect('activate', self.on_activate)
|
||||||
|
|
||||||
def on_activate(self, app):
|
def on_activate(self, app):
|
||||||
|
logger.debug("Lemonade:on_activate")
|
||||||
self.win = LemonadeWindow(application=app)
|
self.win = LemonadeWindow(application=app)
|
||||||
self.win.present()
|
self.win.present()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user