implement view on buyee/yajp buttons

This commit is contained in:
Lynne Megido 2020-08-23 23:38:42 +10:00
parent b83f45d15e
commit 4f8a0a7dbc
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
2 changed files with 12 additions and 1 deletions

View file

@ -23,7 +23,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from pebble import ProcessPool
import json, sys
import json, sys, webbrowser
from os import path
from threading import Thread
from datetime import datetime
@ -276,6 +276,15 @@ class BuypeebApp:
self.renderList()
self.resetSidePane()
def btnViewBuyeeClicked(self, widget):
item = self.settings.watchlist[self.selected]
webbrowser.open(f"https://buyee.jp/item/yahoo/auction/{item.id}", 2)
def btnViewYahooClicked(self, widget):
item = self.settings.watchlist[self.selected]
webbrowser.open(f"https://page.auctions.yahoo.co.jp/jp/auction/{item.id}", 2)
# OTHER UI INTERACTIONS
def tveItemsSelectionChanged(self, selection):

View file

@ -590,6 +590,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="btnViewBuyeeClicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -603,6 +604,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="btnViewYahooClicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>