Ticket #1474 (closed bug: fixed)

Opened 2 years ago

Last modified 6 months ago

"on_show_prefs" hook is not executed immediatly after enabling a plugin

Reported by: terror_macbeth_I Owned by:
Priority: minor Milestone: 1.3.6
Component: gtkui Version: 1.3.1
Keywords: Cc:

Description

Consider following example:

class GtkUI(GtkPluginBase):
    def enable(self):
        self.glade = gtk.glade.XML(get_resource("config.glade"))

        component.get("Preferences").add_page("AutoPriority", self.glade.get_widget("prefs_box"))
        component.get("PluginManager").register_hook("on_apply_prefs", self.on_apply_prefs)
        component.get("PluginManager").register_hook("on_show_prefs", self.on_show_prefs)

When the plugin is enable in the GTK preferences dialog and right away one clicks the added config notebook page the "on_show_prefs" callback is not executed. Only after closing the preferences window and reopening it the callback is executed properly.

The problem can be observed looking at the scheduler plugin.

Enabling it and right away clicking on the newly added notebook page shows all settings initialized to wrong defaults (GTK widget defaults).

Enabling it and closing the preferences window with "Cancel" ("OK" sets the GTK defaults as new values) and than reopening the preferences dialog shows the right plugin defaults.

Change History

Changed 2 years ago by Cas

  • type changed from defect to bug

Changed 2 years ago by Cas

  • milestone changed from Future to 1.3.2

Changed 2 years ago by Cas

  • milestone changed from 1.3.2 to 1.3.x

Changed 6 months ago by Cas

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.3.x to 1.3.6

Fixed 1.3-stable:  a3a9cae

Note: See TracTickets for help on using tickets.