Changeset 3134
- Timestamp:
- 07/11/08 01:17:35 (5 years ago)
- Location:
- branch/UmitPlugins
- Files:
-
- 3 modified
-
higwidgets/higrichlists.py (modified) (2 diffs)
-
umitPlugin/PathPage.py (modified) (1 diff)
-
umitPlugin/PluginPage.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branch/UmitPlugins/higwidgets/higrichlists.py
r3102 r3134 333 333 def set_activatable(self, value): 334 334 self._activatable = value 335 335 self.__on_activate(self) 336 336 337 def get_saturate(self): 337 338 return self._saturate … … 412 413 413 414 self.vbox.foreach(remove, self.vbox) 415 416 def get_rows(self): 417 return len(self.vbox) 414 418 415 419 def foreach(self, callback, userdata): -
branch/UmitPlugins/umitPlugin/PathPage.py
r3132 r3134 196 196 self.p_window.engine.plugins.save_changes() 197 197 198 # Warn the user199 self.p_window.animated_bar.label = \200 _('Remember that you have to restart umit to changes makes effect')201 self.p_window.animated_bar.start_animation(True)202 203 198 PluginEngine().recache() 204 self.p_window.plug_page.clear(False) 199 200 if self.p_window.plug_page.clear(False) > 0: 201 # Warn the user 202 self.p_window.animated_bar.label = _("Remember that you have to " 203 "restart umit to changes makes" 204 ". Plugins disable pending.") 205 self.p_window.animated_bar.start_animation(True) 206 207 def block_row(row, blah): 208 row.activatable = False 209 row.message = _("Need umit restart to disable.") 210 211 self.p_window.plug_page.richlist.foreach(block_row, None) 212 205 213 self.p_window.plug_page.populate() -
branch/UmitPlugins/umitPlugin/PluginPage.py
r3132 r3134 91 91 92 92 self.richlist.foreach(remove, self.richlist) 93 return self.richlist.get_rows() 93 94 94 95 def populate(self): 95 96 "Populate the richlist using avaiable_plugins field" 96 97 98 # We need a list of present plugin row to check for dup 99 presents = [] 100 101 def add_to_list(row, list): 102 list.append(row) 103 104 self.richlist.foreach(add_to_list, presents) 105 106 warn_reboot = False 107 97 108 # We have to load avaiable_plugins from engine 98 109 for reader in self.p_window.engine.avaiable_plugins: 110 111 # Check if it's already present then remove the original 112 # and add the new in case something is getting update. 99 113 row = PluginRow(self.richlist, reader) 114 115 for old in presents: 116 # FIXME? we need to check also for version equality 117 # and if are different just ignore the addition and 118 # continue with the loop 119 if old.reader.get_path() == row.reader.get_path(): 120 self.richlist.remove_row(old) 121 row.enabled = True 122 warn_reboot = True 100 123 101 124 # Connect the various buttons … … 108 131 109 132 self.richlist.append_row(row) 110 133 134 if warn_reboot: 135 # Warn the user 136 self.p_window.animated_bar.label = \ 137 _('Remember that you have to restart umit to make new version' \ 138 ' of plugins to be loaded correctly.') 139 self.p_window.animated_bar.start_animation(True) 140 111 141 def __on_restart(self, widget): 112 142 "Called when the user click on the restart button" … … 241 271 242 272 self.p_window.update_eng.updating = False 273 self.find_updates_btn.set_sensitive(True) 274 self.menu_enabled = True 275 276 self.populate() 243 277 return 244 278 … … 337 371 "Popup menu" 338 372 339 if not self.menu_enabled :373 if not self.menu_enabled or not row.activatable: 340 374 return 341 375
