Project

General

Profile

« Previous | Next » 

Revision a0f033b8

Added by David Sorber almost 6 years ago

Minor updates mainly to pwmgr to fix Gtk3.0 deprecations.

View differences:

software/dbus_test/service.py
@dbus.service.method("com.example.service.Poke", in_signature='', out_signature='')
def poke(self):
print('Got a poke!')
GLib.timeout_add(10, self.poke_runner)
GLib.timeout_add(1, self.poke_runner)
print('Post idle add')
def poke_runner(self):
software/misc/generate_rows.py
import sys
# This script is for creating rows for the repayment schedule page:
# https://baranovich.homelinux.org:3268/schedule.html
# https://phalanx.homelinuxserver.org/schedule.html
PAYMENT_AMOUNT = 500
ROW_TEMPLATE = ' <tr{:s}>\n <td class="align-center">{:d}</td>'\
......
'<td>{:s}</td>\n </tr>'
def main():
num_rows = 75
row_idx = 20
month_idx = 5
num_rows = 68
row_idx = 23
month_idx = 8
year_idx = 2020
principal = 37000
principal = 34000
for idx in range(num_rows):
row = ((row_idx % 2 == 0) and ' class="even_row"' or '',
software/pwmgr/pwmgr.py
ENC_TMP_FILE_PATH = '/home/dsorber/Documents/chicken_soup.enc.tmp'
KEY_FILE_PATH = '/mnt/pw_ramdisk/.f05d11ef-000c-45c2-ae14-56b56c23e1c5'
VERSION = '0.0.9-alpha'
VERSION = '0.0.9-beta'
class BetterSearchWindow(Gtk.Window):
......
https://stackoverflow.com/questions/13970445/python-gtk3-how-to-add-a-gtk-entry-to-a-gtk-messagedialog
"""
dialog = Gtk.MessageDialog(parent,
Gtk.DialogFlags.MODAL |
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.QUESTION,
Gtk.ButtonsType.OK_CANCEL,
message)
dialog = Gtk.MessageDialog(parent=parent,
modal=True,
destroy_with_parent=True,
message_type=Gtk.MessageType.QUESTION,
buttons=Gtk.ButtonsType.OK_CANCEL,
text=message)
dialog.set_title(title)

Also available in: Unified diff