gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #00532
[Merge] lp:~gtg-user/gtg/erroneus-revert into lp:gtg
Luca Invernizzi has proposed merging lp:~gtg-user/gtg/erroneus-revert into lp:gtg.
Requested reviews:
Gtg developers (gtg)
Unrolling erroneous revert in 316.1.17
--
https://code.launchpad.net/~gtg-user/gtg/erroneus-revert/+merge/14505
Your team Gtg developers is subscribed to branch lp:gtg.
=== modified file 'GTG/core/plugins/engine.py'
--- GTG/core/plugins/engine.py 2009-09-24 15:05:42 +0000
+++ GTG/core/plugins/engine.py 2009-11-05 21:40:45 +0000
@@ -176,8 +176,9 @@
# deactivate the enabled plugins
def deactivatePlugins(self, plugins, plugin_api):
for plugin in plugins:
- if plugin['state'] and not plugin['error'] and plugin['active']:
+ if not plugin['state'] and not plugin['error'] and plugin['active']:
plugin['instance'].deactivate(plugin_api)
+ plugin['instance'] = None
plugin['active'] = False
# loads the plug-in features for a task
@@ -198,19 +199,14 @@
for plugin in plugins:
if plugin['instance'] != None and plugin['state'] == False and plugin['active']:
try:
- #print "deactivating plugin: " + plgin['name']
- plugin['instance'].deactivate(plugin_api)
- plugin['instance'] = None
- plugin['active'] = False
+ self.deactivatePlugins([plugin],plugin_api)
except Exception, e:
print "Error: %s" % e
elif plugin['instance'] == None and plugin['state'] == True and not plugin['active']:
try:
#print "activating plugin: " + plgin['name']
if not plugin['error']:
- plugin['instance'] = plugin['class']()
- plugin['instance'].activate(plugin_api)
- plugin['active'] = True
+ self.activatePlugins([plugin],plugin_api)
else:
plugin['state'] = False
except Exception, e:
=== modified file 'GTG/core/plugins/manager.py'
--- GTG/core/plugins/manager.py 2009-09-24 15:05:42 +0000
+++ GTG/core/plugins/manager.py 2009-11-05 21:40:45 +0000
@@ -134,6 +134,13 @@
for plgin in self.plugins:
if model[path][1] == plgin['name'] and model[path][2] == plgin['version']:
plgin['state'] = not plgin['state']
+ #we instantly apply the plugin activation/deactivation
+ #to respect HIG
+ if plgin['state'] :
+ self.pengine.activatePlugins([plgin], self.plugin_api)
+ else :
+ self.pengine.deactivatePlugins([plgin], self.plugin_api)
+
def pluginExtraInfo(self, treeview, plugins):
@@ -209,4 +216,5 @@
self.config_btn.set_sensitive(False)
def plugin_configure_dialog(self, widget, data=None):
- self.current_plugin['instance'].configure_dialog(self.plugin_api)
\ No newline at end of file
+ self.current_plugin['instance'].configure_dialog(self.plugin_api)
+
=== modified file 'GTG/taskeditor/taskview.py'
--- GTG/taskeditor/taskview.py 2009-10-01 08:51:40 +0000
+++ GTG/taskeditor/taskview.py 2009-11-05 21:40:45 +0000
@@ -39,10 +39,10 @@
separators = [' ', '.', ',', '/', '\n', '\t', '!', '?', ';', '\0']
url_separators = [' ', ',', '\n', '\t', '\0']
-bullet1 = 'â'
+bullet1_ltr = 'â'
+bullet1_rtl = 'â'
bullet2 = 'â³'
-
class TaskView(gtk.TextView):
__gtype_name__ = 'HyperTextView'
__gsignals__ = {'anchor-clicked': (gobject.SIGNAL_RUN_LAST, \
@@ -151,6 +151,11 @@
self.connect("backspace",self.backspace)
self.tobe_refreshed = False
+ if self.get_direction() == gtk.TEXT_DIR_RTL :
+ self.bullet1 = bullet1_rtl
+ else:
+ self.bullet1 = bullet1_ltr
+
#This function is called to refresh the editor
#Specially when we change the title
@@ -890,7 +895,7 @@
indentation = indentation + (level-1)*spaces
#adding the symbol
if level == 1 :
- indentation = "%s%s "%(indentation,bullet1)
+ indentation = "%s%s "%(indentation,self.bullet1)
buff.insert(itera,indentation)
indenttag = self.create_indent_tag(buff,level)
self.__apply_tag_to_mark(start,end,tag=indenttag)
@@ -996,7 +1001,7 @@
#Then, if indent > 0, we increment it
#First step : we preserve it.
else :
- if not line.lstrip("%s "%bullet1) :
+ if not line.lstrip("%s "%self.bullet1) :
self.deindent(itera,newlevel=0)
tv.emit_stop_by_name('insert-text')
Follow ups