implement view on buyee/yajp buttons
This commit is contained in:
parent
b83f45d15e
commit
4f8a0a7dbc
2 changed files with 12 additions and 1 deletions
11
buypeeb.py
11
buypeeb.py
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue