Skip to content

Commit 74d26cc

Browse files
committed
Change comments to a radio button
1 parent 64cc856 commit 74d26cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hackertray/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(self, args):
6363
btnComments = Gtk.CheckMenuItem("Show Comments")
6464
btnComments.show()
6565
btnComments.set_active(args.comments)
66+
btnComments.set_draw_as_radio(True)
6667
btnComments.connect("activate", self.toggleComments)
6768
self.menu.append(btnComments)
6869

@@ -125,7 +126,7 @@ def run(self):
125126
Gtk.main()
126127
return 0
127128

128-
def open(self, widget, event=None, data=None):
129+
def open(self, widget, **args):
129130
"""Opens the link in the web browser"""
130131
# We disconnect and reconnect the event in case we have
131132
# to set it to active and we don't want the signal to be processed
@@ -137,6 +138,8 @@ def open(self, widget, event=None, data=None):
137138
self.db.add(widget.item_id)
138139
webbrowser.open(widget.url)
139140

141+
# TODO: Add support for Shift+Click or Right Click
142+
# to do the opposite of the current commentState setting
140143
if self.commentState:
141144
webbrowser.open(self.HN_URL_PREFIX + str(widget.hn_id))
142145

hackertray/firefox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import sqlite3
32
import shutil
43
import os

0 commit comments

Comments
 (0)