← Back to team overview

gtg team mailing list archive

[Merge] lp:~nimit-svnit/gtg/plugin-clean into lp:gtg

 

Nimit Shah has proposed merging lp:~nimit-svnit/gtg/plugin-clean into lp:gtg.

Requested reviews:
  Gtg developers (gtg)

For more details, see:
https://code.launchpad.net/~nimit-svnit/gtg/plugin-clean/+merge/140096

Was bored in the evening and hence some winter cleaning :)
-- 
https://code.launchpad.net/~nimit-svnit/gtg/plugin-clean/+merge/140096
Your team Gtg developers is requested to review the proposed merge of lp:~nimit-svnit/gtg/plugin-clean into lp:gtg.
=== modified file 'GTG/plugins/notification_area/notification_area.py'
--- GTG/plugins/notification_area/notification_area.py	2012-11-11 09:43:07 +0000
+++ GTG/plugins/notification_area/notification_area.py	2012-12-16 15:04:21 +0000
@@ -41,7 +41,7 @@
         super(TheIndicator, self).__init__()
         if not hasattr(self, "_indicator"):
             try:
-                self._indicator = appindicator.Indicator( \
+                self._indicator = appindicator.Indicator(
                               "gtg",
                               "indicator-messages",
                                appindicator.CATEGORY_APPLICATION_STATUS)
@@ -126,7 +126,6 @@
                        button, timestamp, icon)
 
 
-
 def _due_within(task, danger_zone):
     """
     Determine if a task is the danger zone.
@@ -204,7 +203,6 @@
     MAX_TITLE_LEN = 30
     MAX_ITEMS = 10
 
-
     def __init__(self):
         self._indicator = IconIndicator()
         self.__browser_handler = None
@@ -302,7 +300,7 @@
 
         self.__tasks_menu = SortedLimitedMenu(self.MAX_ITEMS,
                             menu, menu_top_length)
-        
+
         self._indicator.activate(self.__show_browser, menu)
 
     def __init_attention(self):
@@ -311,7 +309,7 @@
         # Convention: if danger zone is <=0, disable attention
         # Fallback: if there is no indicator we pass the status icon instead
         if self.preferences['danger_zone'] > 0:
-            self.__attention = _Attention( \
+            self.__attention = _Attention(
                 self.preferences['danger_zone'],
                 self._indicator,
                 self.__tree_att,

=== modified file 'GTG/plugins/urgency_color/urgency_color.py'
--- GTG/plugins/urgency_color/urgency_color.py	2012-07-13 17:00:44 +0000
+++ GTG/plugins/urgency_color/urgency_color.py	2012-12-16 15:04:21 +0000
@@ -115,7 +115,8 @@
         self.spinbutton_reddays = self.builder.get_object('spinbutton_reddays')
 
         #   Colorbutton - OVERDUE
-        self.colorbutton_overdue = self.builder.get_object('colorbutton_overdue')
+        self.colorbutton_overdue = self.builder.get_object(
+                                                         'colorbutton_overdue')
 
         #   Colorbutton - HIGH
         self.colorbutton_high = self.builder.get_object('colorbutton_high')
@@ -187,7 +188,7 @@
         self.prefs_update_widgets()
 
     def prefs_load(self):
-        data = self._plugin_api.load_configuration_object( \
+        data = self._plugin_api.load_configuration_object(
             self.PLUGIN_NAME,
             'preferences')
         if not data or not isinstance(data, dict):
@@ -197,9 +198,9 @@
             # This is a dirty fix and thus should be removed in a
             # distant future, when nobody has "red", "yellow" or "green"
             # settings
-            namepairs = {'red':'high','yellow':'normal','green':'low'}
-            for key,val in data.iteritems():
-                for oldname,newname in namepairs.iteritems():
+            namepairs = {'red': 'high', 'yellow': 'normal', 'green': 'low'}
+            for key, val in data.iteritems():
+                for oldname, newname in namepairs.iteritems():
                     if key == "color_"+oldname:
                         data['color_'+newname] = data.pop(key)
             # Add new preferences where not present
@@ -208,9 +209,8 @@
                     data[setting] = self.DEFAULT_PREFS[setting]
             self._pref_data = dict(data)
 
-
     def prefs_store(self):
-        self._plugin_api.save_configuration_object( \
+        self._plugin_api.save_configuration_object(
             self.PLUGIN_NAME,
             'preferences',
             self._pref_data)