Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguzubiaga97@gmail.com>2012-02-06 18:32:38 (GMT)
committer Agustin Zubiaga <aguzubiaga97@gmail.com>2012-02-06 18:32:38 (GMT)
commitf20f076fad10551e66c0e20785f504ad54065e02 (patch)
tree739b616f095b09a9fbae6b8e8f9a1ccedf052f24
parent565c0fe93ee2a9c3cd2e0ccc4666d67877e6e77e (diff)
More bugs in entries fixed
-rw-r--r--activity.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/activity.py b/activity.py
index 5cf8c28..a4aa7cd 100644
--- a/activity.py
+++ b/activity.py
@@ -432,12 +432,6 @@ class SimpleGraph(activity.Activity):
self.metadata['mime_type'] = "activity/x-simplegraph"
if self.current_chart:
- if self.x_label == "":
- self.x_label = _("Horizontal label...")
-
- elif self.y_label == "":
- self.y_label = _("Vertical label...")
-
data = {}
data['title'] = self.metadata["title"]
data['x_label'] = self.x_label
@@ -471,8 +465,13 @@ class SimpleGraph(activity.Activity):
# Update the controls in the config subtoolbar
self.chart_color_btn.set_color(gtk.gdk.Color(self.chart_color))
self.line_color_btn.set_color(gtk.gdk.Color(self.chart_line_color))
- self.h_label.entry.set_text(self.x_label)
- self.v_label.entry.set_text(self.y_label)
+
+ # If the saved label is not '', set the text entry with the saved label
+ if self.x_label != '':
+ self.h_label.entry.set_text(self.x_label)
+
+ if self.y_label != '':
+ self.v_label.entry.set_text(self.y_label)
#load the data
for row in chart_data: