2013-12-17 08:42:53 +00:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > accounting.gtkclient — Accounting API 0.1-beta documentation< / title >
2013-12-20 15:00:09 +00:00
< link rel = "stylesheet" href = "../../_static/flasky.css" type = "text/css" / >
2013-12-17 08:42:53 +00:00
< link rel = "stylesheet" href = "../../_static/pygments.css" type = "text/css" / >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.1-beta',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "../../_static/jquery.js" > < / script >
< script type = "text/javascript" src = "../../_static/underscore.js" > < / script >
< script type = "text/javascript" src = "../../_static/doctools.js" > < / script >
< link rel = "top" title = "Accounting API 0.1-beta documentation" href = "../../index.html" / >
2013-12-20 15:00:09 +00:00
< link rel = "up" title = "Module code" href = "../index.html" / >
< meta name = "viewport" content = "width=device-width, initial-scale=0.9, maximum-scale=0.9" >
2013-12-17 08:42:53 +00:00
< / head >
< body >
2013-12-20 15:00:09 +00:00
2013-12-17 08:42:53 +00:00
< div class = "related" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "../../genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
2013-12-18 21:46:19 +00:00
< li class = "right" >
< a href = "../../http-routingtable.html" title = "HTTP Routing Table"
>routing table< / a > |< / li >
2013-12-17 08:42:53 +00:00
< li class = "right" >
< a href = "../../py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
< li > < a href = "../../index.html" > Accounting API 0.1-beta documentation< / a > » < / li >
2013-12-20 15:00:09 +00:00
< li > < a href = "../index.html" accesskey = "U" > Module code< / a > » < / li >
2013-12-17 08:42:53 +00:00
< / ul >
< / div >
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" >
< h1 > Source code for accounting.gtkclient< / h1 > < div class = "highlight" > < pre >
2013-12-20 15:00:09 +00:00
< span class = "c" > # Part of accounting-api project:< / span >
< span class = "c" > # https://gitorious.org/conservancy/accounting-api< / span >
< span class = "c" > # License: AGPLv3-or-later< / span >
2013-12-17 08:42:53 +00:00
< span class = "kn" > import< / span > < span class = "nn" > sys< / span >
< span class = "kn" > import< / span > < span class = "nn" > logging< / span >
< span class = "kn" > import< / span > < span class = "nn" > threading< / span >
< span class = "kn" > import< / span > < span class = "nn" > pkg_resources< / span >
< span class = "kn" > from< / span > < span class = "nn" > functools< / span > < span class = "kn" > import< / span > < span class = "n" > wraps< / span >
< span class = "kn" > from< / span > < span class = "nn" > datetime< / span > < span class = "kn" > import< / span > < span class = "n" > datetime< / span >
< span class = "kn" > from< / span > < span class = "nn" > gi.repository< / span > < span class = "kn" > import< / span > < span class = "n" > Gtk< / span >
< span class = "kn" > from< / span > < span class = "nn" > gi.repository< / span > < span class = "kn" > import< / span > < span class = "n" > GLib< / span >
< span class = "kn" > from< / span > < span class = "nn" > gi.repository< / span > < span class = "kn" > import< / span > < span class = "n" > GObject< / span >
< span class = "kn" > from< / span > < span class = "nn" > accounting.client< / span > < span class = "kn" > import< / span > < span class = "n" > Client< / span >
< span class = "n" > _log< / span > < span class = "o" > =< / span > < span class = "n" > logging< / span > < span class = "o" > .< / span > < span class = "n" > getLogger< / span > < span class = "p" > (< / span > < span class = "n" > __name__< / span > < span class = "p" > )< / span >
< div class = "viewcode-block" id = "indicate_activity" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.indicate_activity" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > indicate_activity< / span > < span class = "p" > (< / span > < span class = "n" > func_or_str< / span > < span class = "p" > ):< / span >
< span class = "n" > description< / span > < span class = "o" > =< / span > < span class = "bp" > None< / span >
< span class = "k" > def< / span > < span class = "nf" > decorator< / span > < span class = "p" > (< / span > < span class = "n" > func< / span > < span class = "p" > ):< / span >
< span class = "nd" > @wraps< / span > < span class = "p" > (< / span > < span class = "n" > func< / span > < span class = "p" > )< / span >
< span class = "k" > def< / span > < span class = "nf" > wrapper< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "o" > *< / span > < span class = "n" > args< / span > < span class = "p" > ,< / span > < span class = "o" > **< / span > < span class = "n" > kw< / span > < span class = "p" > ):< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_description< / span > < span class = "o" > .< / span > < span class = "n" > set_text< / span > < span class = "p" > (< / span > < span class = "n" > description< / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_indicator< / span > < span class = "o" > .< / span > < span class = "n" > show< / span > < span class = "p" > ()< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_indicator< / span > < span class = "o" > .< / span > < span class = "n" > start< / span > < span class = "p" > ()< / span >
< span class = "k" > return< / span > < span class = "n" > func< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "o" > *< / span > < span class = "n" > args< / span > < span class = "p" > ,< / span > < span class = "o" > **< / span > < span class = "n" > kw< / span > < span class = "p" > )< / span >
< span class = "k" > return< / span > < span class = "n" > wrapper< / span >
< span class = "k" > if< / span > < span class = "nb" > callable< / span > < span class = "p" > (< / span > < span class = "n" > func_or_str< / span > < span class = "p" > ):< / span >
< span class = "n" > description< / span > < span class = "o" > =< / span > < span class = "s" > ' Working' < / span >
< span class = "k" > return< / span > < span class = "n" > decorator< / span > < span class = "p" > (< / span > < span class = "n" > func_or_str< / span > < span class = "p" > )< / span >
< span class = "k" > else< / span > < span class = "p" > :< / span >
< span class = "n" > description< / span > < span class = "o" > =< / span > < span class = "n" > func_or_str< / span >
< span class = "k" > return< / span > < span class = "n" > decorator< / span >
< / div >
< div class = "viewcode-block" id = "indicate_activity_done" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.indicate_activity_done" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > indicate_activity_done< / span > < span class = "p" > (< / span > < span class = "n" > func< / span > < span class = "p" > ):< / span >
< span class = "nd" > @wraps< / span > < span class = "p" > (< / span > < span class = "n" > func< / span > < span class = "p" > )< / span >
< span class = "k" > def< / span > < span class = "nf" > wrapper< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "o" > *< / span > < span class = "n" > args< / span > < span class = "p" > ,< / span > < span class = "o" > **< / span > < span class = "n" > kw< / span > < span class = "p" > ):< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_description< / span > < span class = "o" > .< / span > < span class = "n" > set_text< / span > < span class = "p" > (< / span > < span class = "s" > ' ' < / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_indicator< / span > < span class = "o" > .< / span > < span class = "n" > stop< / span > < span class = "p" > ()< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > activity_indicator< / span > < span class = "o" > .< / span > < span class = "n" > hide< / span > < span class = "p" > ()< / span >
< span class = "k" > return< / span > < span class = "n" > func< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "o" > *< / span > < span class = "n" > args< / span > < span class = "p" > ,< / span > < span class = "o" > **< / span > < span class = "n" > kw< / span > < span class = "p" > )< / span >
< span class = "k" > return< / span > < span class = "n" > wrapper< / span >
< / div >
< div class = "viewcode-block" id = "AccountingApplication" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication" > [docs]< / a > < span class = "k" > class< / span > < span class = "nc" > AccountingApplication< / span > < span class = "p" > :< / span >
< span class = "k" > def< / span > < span class = "nf" > __init__< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ):< / span >
< span class = "c" > #Gtk.Window.__init__(self, title=' Accounting Client' )< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > client< / span > < span class = "o" > =< / span > < span class = "n" > Client< / span > < span class = "p" > ()< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > load_ui< / span > < span class = "p" > (< / span > < span class = "n" > pkg_resources< / span > < span class = "o" > .< / span > < span class = "n" > resource_filename< / span > < span class = "p" > (< / span >
< span class = "s" > ' accounting' < / span > < span class = "p" > ,< / span > < span class = "s" > ' res/client-ui.glade' < / span > < span class = "p" > ))< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > about_dialog< / span > < span class = "o" > .< / span > < span class = "n" > set_transient_for< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > accounting_window< / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > accounting_window< / span > < span class = "o" > .< / span > < span class = "n" > connect< / span > < span class = "p" > (< / span > < span class = "s" > ' delete-event' < / span > < span class = "p" > ,< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > main_quit< / span > < span class = "p" > )< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > accounting_window< / span > < span class = "o" > .< / span > < span class = "n" > set_border_width< / span > < span class = "p" > (< / span > < span class = "mi" > 0< / span > < span class = "p" > )< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > accounting_window< / span > < span class = "o" > .< / span > < span class = "n" > set_default_geometry< / span > < span class = "p" > (< / span > < span class = "mi" > 640< / span > < span class = "p" > ,< / span > < span class = "mi" > 360< / span > < span class = "p" > )< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > accounting_window< / span > < span class = "o" > .< / span > < span class = "n" > show_all< / span > < span class = "p" > ()< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_detail< / span > < span class = "o" > .< / span > < span class = "n" > hide< / span > < span class = "p" > ()< / span >
2013-12-17 08:42:53 +00:00
< div class = "viewcode-block" id = "AccountingApplication.load_ui" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.load_ui" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > load_ui< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > path< / span > < span class = "p" > ):< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' Loading UI...' < / span > < span class = "p" > )< / span >
< span class = "n" > builder< / span > < span class = "o" > =< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > Builder< / span > < span class = "p" > ()< / span >
< span class = "n" > builder< / span > < span class = "o" > .< / span > < span class = "n" > add_from_file< / span > < span class = "p" > (< / span > < span class = "n" > path< / span > < span class = "p" > )< / span >
< span class = "n" > builder< / span > < span class = "o" > .< / span > < span class = "n" > connect_signals< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > )< / span >
< span class = "k" > for< / span > < span class = "n" > element< / span > < span class = "ow" > in< / span > < span class = "n" > builder< / span > < span class = "o" > .< / span > < span class = "n" > get_objects< / span > < span class = "p" > ():< / span >
2013-12-20 15:00:09 +00:00
< span class = "k" > try< / span > < span class = "p" > :< / span >
< span class = "nb" > setattr< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > Buildable< / span > < span class = "o" > .< / span > < span class = "n" > get_name< / span > < span class = "p" > (< / span > < span class = "n" > element< / span > < span class = "p" > ),< / span > < span class = "n" > element< / span > < span class = "p" > )< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' Loaded < / span > < span class = "si" > %s< / span > < span class = "s" > ' < / span > < span class = "p" > ,< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > Buildable< / span > < span class = "o" > .< / span > < span class = "n" > get_name< / span > < span class = "p" > (< / span > < span class = "n" > element< / span > < span class = "p" > ))< / span >
< span class = "k" > except< / span > < span class = "ne" > TypeError< / span > < span class = "k" > as< / span > < span class = "n" > exc< / span > < span class = "p" > :< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > error< / span > < span class = "p" > (< / span > < span class = "s" > ' < / span > < span class = "si" > %s< / span > < span class = "s" > could not be loaded: < / span > < span class = "si" > %s< / span > < span class = "s" > ' < / span > < span class = "p" > ,< / span > < span class = "n" > element< / span > < span class = "p" > ,< / span > < span class = "n" > exc< / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' UI loaded' < / span > < span class = "p" > )< / span >
< / div >
2013-12-20 15:00:09 +00:00
< div class = "viewcode-block" id = "AccountingApplication.on_transaction_new_activate" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_transaction_new_activate" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_transaction_new_activate< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > widget< / span > < span class = "p" > ):< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_edit_window< / span > < span class = "o" > .< / span > < span class = "n" > show_all< / span > < span class = "p" > ()< / span >
< / div >
< div class = "viewcode-block" id = "AccountingApplication.on_transaction_view_cursor_changed" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_transaction_view_cursor_changed" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_transaction_view_cursor_changed< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > widget< / span > < span class = "p" > ):< / span >
2013-12-17 08:42:53 +00:00
< span class = "n" > selection< / span > < span class = "o" > =< / span > < span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_view< / span > < span class = "o" > .< / span > < span class = "n" > get_selection< / span > < span class = "p" > ()< / span >
< span class = "n" > selection< / span > < span class = "o" > .< / span > < span class = "n" > set_mode< / span > < span class = "p" > (< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > SelectionMode< / span > < span class = "o" > .< / span > < span class = "n" > SINGLE< / span > < span class = "p" > )< / span >
< span class = "n" > xact_store< / span > < span class = "p" > ,< / span > < span class = "n" > xact_iter< / span > < span class = "o" > =< / span > < span class = "n" > selection< / span > < span class = "o" > .< / span > < span class = "n" > get_selected< / span > < span class = "p" > ()< / span >
< span class = "n" > xact_id< / span > < span class = "o" > =< / span > < span class = "n" > xact_store< / span > < span class = "o" > .< / span > < span class = "n" > get_value< / span > < span class = "p" > (< / span > < span class = "n" > xact_iter< / span > < span class = "p" > ,< / span > < span class = "mi" > 0< / span > < span class = "p" > )< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' selection: < / span > < span class = "si" > %s< / span > < span class = "s" > ' < / span > < span class = "p" > ,< / span > < span class = "n" > xact_id< / span > < span class = "p" > )< / span >
< span class = "k" > for< / span > < span class = "n" > transaction< / span > < span class = "ow" > in< / span > < span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_data< / span > < span class = "p" > :< / span >
< span class = "k" > if< / span > < span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > id< / span > < span class = "o" > ==< / span > < span class = "n" > xact_id< / span > < span class = "p" > :< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_header< / span > < span class = "o" > .< / span > < span class = "n" > set_text< / span > < span class = "p" > (< / span > < span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > payee< / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > posting_store< / span > < span class = "o" > .< / span > < span class = "n" > clear< / span > < span class = "p" > ()< / span >
< span class = "k" > for< / span > < span class = "n" > posting< / span > < span class = "ow" > in< / span > < span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > postings< / span > < span class = "p" > :< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > posting_store< / span > < span class = "o" > .< / span > < span class = "n" > append< / span > < span class = "p" > ([< / span >
< span class = "n" > posting< / span > < span class = "o" > .< / span > < span class = "n" > account< / span > < span class = "p" > ,< / span >
< span class = "nb" > str< / span > < span class = "p" > (< / span > < span class = "n" > posting< / span > < span class = "o" > .< / span > < span class = "n" > amount< / span > < span class = "o" > .< / span > < span class = "n" > amount< / span > < span class = "p" > ),< / span >
< span class = "n" > posting< / span > < span class = "o" > .< / span > < span class = "n" > amount< / span > < span class = "o" > .< / span > < span class = "n" > symbol< / span >
< span class = "p" > ])< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_detail< / span > < span class = "o" > .< / span > < span class = "n" > show< / span > < span class = "p" > ()< / span >
2013-12-17 08:42:53 +00:00
< span class = "k" > break< / span >
< / div >
< div class = "viewcode-block" id = "AccountingApplication.on_show_about_activate" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_show_about_activate" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_show_about_activate< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > widget< / span > < span class = "p" > ):< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' Showing About' < / span > < span class = "p" > )< / span >
2013-12-20 15:00:09 +00:00
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > about_dialog< / span > < span class = "o" > .< / span > < span class = "n" > show_all< / span > < span class = "p" > ()< / span >
2013-12-17 08:42:53 +00:00
< / div >
2013-12-20 15:00:09 +00:00
< div class = "viewcode-block" id = "AccountingApplication.on_about_dialog_response" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_about_dialog_response" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_about_dialog_response< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > widget< / span > < span class = "p" > ,< / span > < span class = "n" > response_type< / span > < span class = "p" > ):< / span >
2013-12-17 08:42:53 +00:00
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' Closing About' < / span > < span class = "p" > )< / span >
2013-12-20 15:00:09 +00:00
< span class = "k" > if< / span > < span class = "n" > response_type< / span > < span class = "o" > ==< / span > < span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > ResponseType< / span > < span class = "o" > .< / span > < span class = "n" > CANCEL< / span > < span class = "p" > :< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > about_dialog< / span > < span class = "o" > .< / span > < span class = "n" > hide< / span > < span class = "p" > ()< / span >
< span class = "k" > else< / span > < span class = "p" > :< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > error< / span > < span class = "p" > (< / span > < span class = "s" > ' Unexpected response_type: < / span > < span class = "si" > %d< / span > < span class = "s" > ' < / span > < span class = "p" > ,< / span > < span class = "n" > response_type< / span > < span class = "p" > )< / span >
2013-12-17 08:42:53 +00:00
< / div >
< span class = "nd" > @indicate_activity< / span > < span class = "p" > (< / span > < span class = "s" > ' Refreshing Transactions' < / span > < span class = "p" > )< / span >
2013-12-20 15:00:09 +00:00
< div class = "viewcode-block" id = "AccountingApplication.on_transaction_refresh_activate" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_transaction_refresh_activate" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_transaction_refresh_activate< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > widget< / span > < span class = "p" > ):< / span >
2013-12-17 08:42:53 +00:00
< span class = "k" > def< / span > < span class = "nf" > load_transactions< / span > < span class = "p" > ():< / span >
< span class = "n" > transactions< / span > < span class = "o" > =< / span > < span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > client< / span > < span class = "o" > .< / span > < span class = "n" > get_register< / span > < span class = "p" > ()< / span >
< span class = "n" > GLib< / span > < span class = "o" > .< / span > < span class = "n" > idle_add< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > on_transactions_loaded< / span > < span class = "p" > ,< / span > < span class = "n" > transactions< / span > < span class = "p" > )< / span >
< span class = "n" > threading< / span > < span class = "o" > .< / span > < span class = "n" > Thread< / span > < span class = "p" > (< / span > < span class = "n" > target< / span > < span class = "o" > =< / span > < span class = "n" > load_transactions< / span > < span class = "p" > )< / span > < span class = "o" > .< / span > < span class = "n" > start< / span > < span class = "p" > ()< / span >
< / div >
< span class = "nd" > @indicate_activity_done< / span >
< div class = "viewcode-block" id = "AccountingApplication.on_transactions_loaded" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.AccountingApplication.on_transactions_loaded" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > on_transactions_loaded< / span > < span class = "p" > (< / span > < span class = "bp" > self< / span > < span class = "p" > ,< / span > < span class = "n" > transactions< / span > < span class = "p" > ):< / span >
< span class = "n" > _log< / span > < span class = "o" > .< / span > < span class = "n" > debug< / span > < span class = "p" > (< / span > < span class = "s" > ' transactions: < / span > < span class = "si" > %s< / span > < span class = "s" > ' < / span > < span class = "p" > ,< / span > < span class = "n" > transactions< / span > < span class = "p" > )< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_data< / span > < span class = "o" > =< / span > < span class = "n" > transactions< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_store< / span > < span class = "o" > .< / span > < span class = "n" > clear< / span > < span class = "p" > ()< / span >
< span class = "k" > for< / span > < span class = "n" > transaction< / span > < span class = "ow" > in< / span > < span class = "n" > transactions< / span > < span class = "p" > :< / span >
< span class = "bp" > self< / span > < span class = "o" > .< / span > < span class = "n" > transaction_store< / span > < span class = "o" > .< / span > < span class = "n" > append< / span > < span class = "p" > ([< / span >
< span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > id< / span > < span class = "p" > ,< / span >
< span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > date< / span > < span class = "o" > .< / span > < span class = "n" > strftime< / span > < span class = "p" > (< / span > < span class = "s" > ' %Y-%m-< / span > < span class = "si" > %d< / span > < span class = "s" > ' < / span > < span class = "p" > ),< / span >
< span class = "n" > transaction< / span > < span class = "o" > .< / span > < span class = "n" > payee< / span >
< span class = "p" > ])< / span >
< / div > < / div >
< div class = "viewcode-block" id = "main" > < a class = "viewcode-back" href = "../../api/accounting.html#accounting.gtkclient.main" > [docs]< / a > < span class = "k" > def< / span > < span class = "nf" > main< / span > < span class = "p" > (< / span > < span class = "n" > argv< / span > < span class = "o" > =< / span > < span class = "bp" > None< / span > < span class = "p" > ):< / span >
< span class = "n" > logging< / span > < span class = "o" > .< / span > < span class = "n" > basicConfig< / span > < span class = "p" > (< / span > < span class = "n" > level< / span > < span class = "o" > =< / span > < span class = "n" > logging< / span > < span class = "o" > .< / span > < span class = "n" > DEBUG< / span > < span class = "p" > )< / span >
< span class = "n" > GObject< / span > < span class = "o" > .< / span > < span class = "n" > threads_init< / span > < span class = "p" > ()< / span >
< span class = "n" > accounting< / span > < span class = "o" > =< / span > < span class = "n" > AccountingApplication< / span > < span class = "p" > ()< / span >
< span class = "n" > Gtk< / span > < span class = "o" > .< / span > < span class = "n" > main< / span > < span class = "p" > ()< / span >
< / div >
< span class = "k" > if< / span > < span class = "n" > __name__< / span > < span class = "o" > ==< / span > < span class = "s" > ' __main__' < / span > < span class = "p" > :< / span >
< span class = "n" > sys< / span > < span class = "o" > .< / span > < span class = "n" > exit< / span > < span class = "p" > (< / span > < span class = "n" > main< / span > < span class = "p" > ())< / span >
< / pre > < / div >
< / div >
< / div >
< / div >
< div class = "sphinxsidebar" >
< div class = "sphinxsidebarwrapper" >
2013-12-20 15:00:09 +00:00
< p class = "logo" > < a href = "../../index.html" >
< img class = "logo" src = "../../_static/accounting-api-logo.png" alt = "Logo" / >
< / a > < / p > < h3 > Related Topics< / h3 >
< ul >
< li > < a href = "../../index.html" > Documentation overview< / a > < ul >
< li > < a href = "../index.html" > Module code< / a > < ul >
< / ul > < / li >
< / ul > < / li >
< / ul >
2013-12-17 08:42:53 +00:00
< div id = "searchbox" style = "display: none" >
< h3 > Quick search< / h3 >
< form class = "search" action = "../../search.html" method = "get" >
< input type = "text" name = "q" / >
< input type = "submit" value = "Go" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< p class = "searchtip" style = "font-size: 90%" >
Enter search terms or a module, class or function name.
< / p >
< / div >
< script type = "text/javascript" > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
2013-12-20 15:00:09 +00:00
< div class = "footer" >
© Copyright 2013, Joar Wandborg.
Created using < a href = "http://sphinx.pocoo.org/" > Sphinx< / a > .
< / div >
2013-12-17 08:42:53 +00:00
< / body >
< / html >