summaryrefslogtreecommitdiff
path: root/invest-applet
diff options
context:
space:
mode:
Diffstat (limited to 'invest-applet')
-rw-r--r--invest-applet/data/financialchart.ui705
-rw-r--r--invest-applet/data/prefs-dialog.ui125
-rw-r--r--invest-applet/invest/__init__.py2
-rw-r--r--invest-applet/invest/applet.py99
-rw-r--r--invest-applet/invest/chart.py16
-rw-r--r--invest-applet/invest/quotes.py67
6 files changed, 451 insertions, 563 deletions
diff --git a/invest-applet/data/financialchart.ui b/invest-applet/data/financialchart.ui
index 1de0f38d..d7d80954 100644
--- a/invest-applet/data/financialchart.ui
+++ b/invest-applet/data/financialchart.ui
@@ -1,101 +1,37 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkListStore" id="model1">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Today</col>
- </row>
- <row>
- <col id="0" translatable="yes">5 Days</col>
- </row>
- <row>
- <col id="0" translatable="yes">3 Months</col>
- </row>
- <row>
- <col id="0" translatable="yes">6 Months</col>
- </row>
- <row>
- <col id="0" translatable="yes">1 Year</col>
- </row>
- <row>
- <col id="0" translatable="yes">5 Years</col>
- </row>
- <row>
- <col id="0" translatable="yes">Maximum</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="model2">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0">l</col>
- </row>
- <row>
- <col id="0">b</col>
- </row>
- <row>
- <col id="0">c</col>
- </row>
- </data>
- </object>
+ <!-- interface-requires gtk+ 2.12 -->
<object class="GtkWindow" id="window">
- <property name="border_width">6</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
<property name="title" translatable="yes">Financial Chart</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
+ <property name="window_position">center</property>
<property name="default_height">500</property>
- <property name="resizable">True</property>
<property name="destroy_with_parent">True</property>
<property name="icon_name">stock_chart</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">_Ticker symbol: </property>
<property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
<property name="mnemonic_widget">s</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -103,83 +39,55 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="autorefresh">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
+ <property name="can_focus">False</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
<child>
<object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="stock">gtk-refresh</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Auto _refresh</property>
<property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -188,265 +96,193 @@
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="t">
+ <object class="GtkComboBoxText" id="t">
<property name="visible">True</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- <property name="model">model1</property>
- <child>
- <object class="GtkCellRendererText" id="renderer1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Today</item>
+ <item translatable="yes">5 Days</item>
+ <item translatable="yes">3 Months</item>
+ <item translatable="yes">6 Months</item>
+ <item translatable="yes">1 Year</item>
+ <item translatable="yes">5 Years</item>
+ <item translatable="yes">Maximum</item>
+ </items>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="expander1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="expanded">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
<property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
<property name="label" translatable="yes">_Graph style: </property>
<property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">q</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide11.html and http://en.wikipedia.org/wiki/Moving_average">Moving average: </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide11.html and http://en.wikipedia.org/wiki/Moving_average">Moving average: </property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide12.html and http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average">Exponential moving average: </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide12.html and http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average">Exponential moving average: </property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="q">
- <property name="visible">True</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- <property name="model">model2</property>
- <child>
- <object class="GtkCellRendererText" id="renderer2"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="pe5">
+ <property name="label" translatable="yes">5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">5</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pe10">
+ <property name="label" translatable="yes">10</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">10</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pe20">
+ <property name="label" translatable="yes">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">20</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pe50">
+ <property name="label" translatable="yes">50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">50</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pe100">
+ <property name="label" translatable="yes">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">100</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pe200">
+ <property name="label" translatable="yes">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">200</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -455,112 +291,92 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="see http://en.wikipedia.org/wiki/Technical_analysis#Overlays">Overlays: </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="label" translatable="yes" comments="see http://en.wikipedia.org/wiki/Technical_analysis#Overlays">Overlays: </property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="pb">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide13.html and http://en.wikipedia.org/wiki/Bollinger_bands">Bollinger</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide13.html and http://en.wikipedia.org/wiki/Bollinger_bands">Bollinger</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pp">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide16.html and http://en.wikipedia.org/wiki/Parabolic_SAR">SAR</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide16.html and http://en.wikipedia.org/wiki/Parabolic_SAR">SAR</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ps">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide6.html and http://en.wikipedia.org/wiki/Stock_split">Splits</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide6.html and http://en.wikipedia.org/wiki/Stock_split">Splits</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pv">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide20.html and http://en.wikipedia.org/wiki/Volume_%28finance%29">Volumes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://biz.yahoo.com/charts/guide20.html and http://en.wikipedia.org/wiki/Volume_%28finance%29">Volumes</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -569,118 +385,91 @@
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide10.html and http://en.wikipedia.org/wiki/Technical_indicator#Charting_terms_and_indicators">Indicators: </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
+ <property name="label" translatable="yes" comments="see http://biz.yahoo.com/charts/guide10.html and http://en.wikipedia.org/wiki/Technical_indicator#Charting_terms_and_indicators">Indicators: </property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
<child>
<object class="GtkCheckButton" id="ar">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Relative_Strength_Index">RSI</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Relative_Strength_Index">RSI</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="av">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Volume_%28finance%29">Vol</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Volume_%28finance%29">Vol</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="af">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Money_flow_index">MFI</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Money_flow_index">MFI</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ass">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Stochastic_oscillator">Slow stoch</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Stochastic_oscillator">Slow stoch</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -688,20 +477,18 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="avm">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Volume_%28finance%29">Vol+MA</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Volume_%28finance%29">Vol+MA</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -709,41 +496,35 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ap">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Rate_of_change_%28technical_analysis%29">ROC</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Rate_of_change_%28technical_analysis%29">ROC</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="afs">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Stochastic_oscillator">Fast stoch</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Stochastic_oscillator">Fast stoch</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -751,20 +532,19 @@
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="aw">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Williams_%25R">W%R</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/Williams_%25R">W%R</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -772,29 +552,24 @@
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="am">
+ <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/MACD">MACD</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" comments="Please keep this term short. For its meaning, see http://en.wikipedia.org/wiki/MACD">MACD</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
</object>
@@ -803,121 +578,110 @@
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="pm5">
+ <property name="label" translatable="yes">5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">5</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pm10">
+ <property name="label" translatable="yes">10</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">10</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pm20">
+ <property name="label" translatable="yes">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">20</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
<property name="active">True</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pm50">
+ <property name="label" translatable="yes">50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">50</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pm100">
+ <property name="label" translatable="yes">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">100</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pm200">
+ <property name="label" translatable="yes">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">200</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -926,8 +690,81 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="q">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Line</item>
+ <item translatable="yes">Bar</item>
+ <item translatable="yes">Candle</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">50</property>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Scale: </property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="l">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Linear</item>
+ <item translatable="yes">Logarithmic</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -935,59 +772,44 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">_Options</property>
<property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="plotport">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="can_focus">False</property>
+ <property name="shadow_type">none</property>
<child>
<object class="GtkImage" id="plot">
<property name="visible">True</property>
- <property name="icon_size">5</property>
+ <property name="can_focus">False</property>
<property name="icon_name">stock_chart</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="icon-size">5</property>
</object>
</child>
</object>
</child>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -995,24 +817,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Downloading chart from &lt;b&gt;Yahoo!&lt;/b&gt;</property>
- <property name="use_underline">False</property>
<property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
<property name="selectable">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
</object>
<packing>
- <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
diff --git a/invest-applet/data/prefs-dialog.ui b/invest-applet/data/prefs-dialog.ui
index 0e83e372..c6d8b9f1 100644
--- a/invest-applet/data/prefs-dialog.ui
+++ b/invest-applet/data/prefs-dialog.ui
@@ -1,8 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="preferences">
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Invest Preferences</property>
<property name="modal">True</property>
@@ -10,22 +10,71 @@
<property name="default_height">450</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
- <signal name="response" handler="prefs_dialog_response_cb"/>
+ <signal name="response" handler="prefs_dialog_response_cb" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
+ <object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkVBox" id="big_box">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="spacing">18</property>
<child>
<object class="GtkVBox" id="loaded_extensions_box">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="explanation">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">label</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
@@ -40,6 +89,7 @@
<child>
<object class="GtkLabel" id="stocklabel">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Stocks</property>
<property name="use_underline">True</property>
@@ -57,11 +107,13 @@
<child>
<object class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="bottom_padding">18</property>
<property name="left_padding">18</property>
<child>
<object class="GtkVBox" id="vbox156">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="handlers">
@@ -69,7 +121,6 @@
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="stocks">
@@ -77,16 +128,22 @@
<property name="can_focus">True</property>
<property name="reorderable">True</property>
<property name="rules_hint">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<child>
@@ -95,9 +152,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -107,21 +167,26 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="default_info">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;i&gt;&lt;small&gt;&lt;b&gt;Note:&lt;/b&gt; Quotes are delayed at least 15 minutes.
&lt;b&gt;Source: &lt;/b&gt; Yahoo!&lt;/small&gt;&lt;/i&gt;</property>
@@ -137,12 +202,15 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="currencylabel">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Currency</property>
<property name="use_underline">True</property>
@@ -160,69 +228,34 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="left_padding">18</property>
<child>
<object class="GtkEntry" id="currency">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="close">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
<property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py
index da6a2512..d99328c2 100644
--- a/invest-applet/invest/__init__.py
+++ b/invest-applet/invest/__init__.py
@@ -149,6 +149,8 @@ try:
except Exception, msg:
CONFIG = {} # default configuration
+QUOTES_FILE = join(USER_INVEST_DIR, "quotes.csv")
+
# set default proxy config
PROXY = None
diff --git a/invest-applet/invest/applet.py b/invest-applet/invest/applet.py
index 4d877da6..33f11916 100644
--- a/invest-applet/invest/applet.py
+++ b/invest-applet/invest/applet.py
@@ -131,72 +131,69 @@ class InvestmentsListWindow(Gtk.Window):
"""
self.realize()
+ window = self.applet.get_window()
+ screen = window.get_screen()
+ monitor = screen.get_monitor_geometry (screen.get_monitor_at_window (window))
+
# Get our own dimensions & position
#(wx, wy) = self.get_origin()
- ax=0
- ay=0
- #FIXME this doesnt work with gir
- self.applet.window.get_origin(ax, ay)
-
- (ww, wh) = self.get_size ()
- (aw, ah) = self.applet.window.get_size ()
+ (ret, ax, ay) = window.get_origin()
- screen = self.applet.get_screen()
- monitor = Gdk.Rectangle(0, 0, 0, 0)
- screen.get_monitor_geometry (screen.get_monitor_at_window (self.applet.window), monitor)
+ (ww, wh) = self.get_size()
+ (ignored, ignored, aw, ah) = window.get_geometry()
if self.alignment == MatePanelApplet.AppletOrient.LEFT:
- x = ax - ww
- y = ay
-
- if (y + wh > monitor.y + monitor.height):
- y = monitor.y + monitor.height - wh
-
- if (y < 0):
- y = 0
-
- if (y + wh > monitor.height / 2):
- gravity = Gdk.Gravity.SOUTH_WEST
- else:
- gravity = Gdk.Gravity.NORTH_WEST
-
+ x = ax - ww
+ y = ay
+
+ if (y + wh > monitor.y + monitor.height):
+ y = monitor.y + monitor.height - wh
+
+ if (y < 0):
+ y = 0
+
+ if (y + wh > monitor.height / 2):
+ gravity = Gdk.Gravity.SOUTH_WEST
+ else:
+ gravity = Gdk.Gravity.NORTH_WEST
+
elif self.alignment == MatePanelApplet.AppletOrient.RIGHT:
- x = ax + aw
- y = ay
-
- if (y + wh > monitor.y + monitor.height):
- y = monitor.y + monitor.height - wh
-
- if (y < 0):
- y = 0
-
- if (y + wh > monitor.height / 2):
- gravity = Gdk.Gravity.SOUTH_EAST
- else:
- gravity = Gdk.Gravity.NORTH_EAST
+ x = ax + aw
+ y = ay
+
+ if (y + wh > monitor.y + monitor.height):
+ y = monitor.y + monitor.height - wh
+
+ if (y < 0):
+ y = 0
+
+ if (y + wh > monitor.height / 2):
+ gravity = Gdk.Gravity.SOUTH_EAST
+ else:
+ gravity = Gdk.Gravity.NORTH_EAST
elif self.alignment == MatePanelApplet.AppletOrient.DOWN:
- x = ax
- y = ay + ah
+ x = ax
+ y = ay + ah
- if (x + ww > monitor.x + monitor.width):
- x = monitor.x + monitor.width - ww
+ if (x + ww > monitor.x + monitor.width):
+ x = monitor.x + monitor.width - ww
- if (x < 0):
- x = 0
+ if (x < 0):
+ x = 0
- gravity = Gdk.Gravity.NORTH_WEST
+ gravity = Gdk.Gravity.NORTH_WEST
elif self.alignment == MatePanelApplet.AppletOrient.UP:
- x = ax
- y = ay - wh
+ x = ax
+ y = ay - wh
- if (x + ww > monitor.x + monitor.width):
- x = monitor.x + monitor.width - ww
+ if (x + ww > monitor.x + monitor.width):
+ x = monitor.x + monitor.width - ww
- if (x < 0):
- x = 0
+ if (x < 0):
+ x = 0
- gravity = Gdk.Gravity.SOUTH_WEST
+ gravity = Gdk.Gravity.SOUTH_WEST
self.move(x, y)
self.set_gravity(gravity)
diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py
index 044a2209..e12424a6 100644
--- a/invest-applet/invest/chart.py
+++ b/invest-applet/invest/chart.py
@@ -104,9 +104,15 @@ class FinancialChart:
def __init__(self, ui):
self.ui = ui
- #Time ranges of the plot
+ #Time ranges of the plot (parameter / combo-box t)
self.time_ranges = ["1d", "5d", "3m", "6m", "1y", "5y", "my"]
+ #plot types (parameter / combo-box q)
+ self.plot_types = ["l", "b", "c"]
+
+ #plot scales (parameter / combo-box l)
+ self.plot_scales = ["off", "on"]
+
# Window Properties
win = ui.get_object("window")
win.set_title(_("Financial Chart"))
@@ -119,7 +125,7 @@ class FinancialChart:
pass
# Defaut comboboxes values
- for widget in ["t", "q"]:
+ for widget in ["t", "q", "l"]:
ui.get_object(widget).set_active(0)
# Connect every option widget to its corresponding change signal
@@ -131,7 +137,7 @@ class FinancialChart:
"pe5","pe10", "pe20","pe50","pe100","pe200",
"pb","pp","ps","pv",
"ar","af","ap","aw","am","ass","afs","av","avm"), "toggled"),
- (("t", "q"), "changed"),
+ (("t", "q", "l"), "changed"),
(("s",), "activate"),
]:
for widget in widgets:
@@ -215,8 +221,8 @@ class FinancialChart:
url = chart_base_url % {
"s": tickers[0],
"t": self.time_ranges[self.ui.get_object("t").get_active()],
- "q": self.ui.get_object("q").get_active_text(),
- "l": "off",
+ "q": self.plot_types[self.ui.get_object("q").get_active()],
+ "l": self.plot_scales[self.ui.get_object("l").get_active()],
"z": "l",
"p": p,
"a": a,
diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py
index 0a48dc1e..d9bdb6b1 100644
--- a/invest-applet/invest/quotes.py
+++ b/invest-applet/invest/quotes.py
@@ -1,4 +1,4 @@
-from os.path import join
+from os.path import join, getmtime
from mate_invest.defs import GTK_API_VERSION
import gi
@@ -58,12 +58,14 @@ class QuotesRetriever(Thread, _IdleObject):
self.retrieved = False
self.data = []
self.currencies = []
+ mate_invest.debug("QuotesRetriever created");
def run(self):
+ mate_invest.debug("QuotesRetriever started");
quotes_url = QUOTES_URL % {"s": self.tickers}
try:
quotes_file = urlopen(quotes_url, proxies = mate_invest.PROXY)
- self.data = quotes_file.readlines ()
+ self.data = quotes_file.read ()
quotes_file.close ()
except Exception, msg:
mate_invest.debug("Error while retrieving quotes data (url = %s): %s" % (quotes_url, msg))
@@ -84,11 +86,37 @@ class QuoteUpdater(Gtk.ListStore):
self.change_icon_callback = change_icon_callback
self.set_tooltip_callback = set_tooltip_callback
self.set_sort_column_id(1, Gtk.SortType.ASCENDING)
- self.refresh()
+ self.load() # read the last cached quotes file
+ self.refresh() # download a new quotes file, this may fail if disconnected
# tell the network manager to notify me when network status changes
mate_invest.nm.set_statechange_callback(self.nm_state_changed)
+ # loads the cached csv file and its last-modification-time as self.last_updated
+ def load(self):
+ mate_invest.debug("Loading quotes");
+ try:
+ f = open(mate_invest.QUOTES_FILE, 'r')
+ data = f.readlines()
+ f.close()
+
+ self.populate(self.parse_yahoo_csv(csv.reader(data)))
+ self.updated = True
+ self.last_updated = datetime.datetime.fromtimestamp(getmtime(mate_invest.QUOTES_FILE))
+ self.update_tooltip()
+ except Exception, msg:
+ mate_invest.error("Could not load the cached quotes file %s: %s" % (mate_invest.QUOTES_FILE, msg) )
+
+ # stores the csv content on disk so it can be used on next start up
+ def save(self, data):
+ mate_invest.debug("Storing quotes")
+ try:
+ f = open(mate_invest.QUOTES_FILE, 'w')
+ f.write(data)
+ f.close()
+ except Exception, msg:
+ mate_invest.error("Could not save the retrieved quotes file to %s: %s" % (mate_invest.QUOTES_FILE, msg) )
+
def set_update_interval(self, interval):
if self.timeout_id != None:
mate_invest.debug("Canceling refresh timer")
@@ -115,12 +143,16 @@ class QuoteUpdater(Gtk.ListStore):
return False
if len(mate_invest.STOCKS) == 0:
+ mate_invest.debug("No stocks configured")
return True
tickers = '+'.join(mate_invest.STOCKS.keys())
+ mate_invest.debug("creating QuotesRetriever")
quotes_retriever = QuotesRetriever(tickers)
quotes_retriever.connect("completed", self.on_retriever_completed)
+ mate_invest.debug("starting QuotesRetriever")
quotes_retriever.start()
+ mate_invest.debug("started QuotesRetriever")
return True
@@ -135,16 +167,15 @@ class QuoteUpdater(Gtk.ListStore):
def on_retriever_completed(self, retriever):
if retriever.retrieved == False:
- tooltip = [_('Invest could not connect to Yahoo! Finance')]
- if self.last_updated != None:
- # Translators: %s is an hour (%H:%M)
- tooltip.append(_('Updated at %s') % self.last_updated.strftime("%H:%M"))
- self.set_tooltip_callback('\n'.join(tooltip))
+ mate_invest.debug("QuotesRetriever failed");
+ self.update_tooltip(_('Invest could not connect to Yahoo! Finance'))
+
else:
- self.populate(self.parse_yahoo_csv(csv.reader(retriever.data)))
- self.updated = True
- self.last_updated = datetime.datetime.now()
- self.update_tooltip()
+ mate_invest.debug("QuotesRetriever completed");
+ # cache the retrieved csv file
+ self.save(retriever.data)
+ # load the cache and parse it
+ self.load()
def on_currency_retriever_completed(self, retriever):
if retriever.retrieved == False:
@@ -153,7 +184,7 @@ class QuoteUpdater(Gtk.ListStore):
self.convert_currencies(self.parse_yahoo_csv(csv.reader(retriever.data)))
self.update_tooltip()
- def update_tooltip(self):
+ def update_tooltip(self, msg = None):
tooltip = []
if self.quotes_count > 0:
# Translators: This is share-market jargon. It is the average percentage change of all stock prices. The %s gets replaced with the string value of the change (localized), including the percent sign.
@@ -167,7 +198,10 @@ class QuoteUpdater(Gtk.ListStore):
# Translators: This is share-market jargon. It refers to the total difference between the current price and purchase price for all the shares put together for a particular currency. i.e. How much money would be earned if they were sold right now. The first string is the change value, the second the currency, and the third value is the percentage of the change, formatted using user's locale.
tooltip.append(_('Positions balance: %s %s (%s)') % (balance, currency, change))
- tooltip.append(_('Updated at %s') % self.last_updated.strftime("%H:%M"))
+ if self.last_updated != None:
+ tooltip.append(_('Updated at %s') % self.last_updated.strftime("%H:%M"))
+ if msg != None:
+ tooltip.append(msg)
self.set_tooltip_callback('\n'.join(tooltip))
@@ -245,6 +279,11 @@ class QuoteUpdater(Gtk.ListStore):
for ticker, val in quote_items:
pb = None
+ # ignore unknown stocks
+ if ticker not in mate_invest.STOCKS.keys():
+ mate_invest.debug("Observed unknown stock: %s" % ticker)
+ continue
+
# get the label of this stock for later reuse
label = mate_invest.STOCKS[ticker]["label"]
if len(label) == 0: