Hi guys, <br>I've created the new Database menu as discussed at the HF. <br>This menu is available from QGis trunk r14638.<br><br>Here an example which explains how you can insert your plugin into this new menu:<br><br>
<span style="font-family: courier new,monospace;">self.iface.addPluginToDatabaseMenu("&PostGIS", self.action)</span><br><br>and how remove it:<br><br><span style="font-family: courier new,monospace;">self.iface.removePluginDatabaseMenu("&PostGIS", self.action)</span><br>
<br>If you want that your python plugin works also with previous QGis version (< 1.7), <br>you should use the following codes instead.<br><br>(add to Database menu)<br><span style="font-family: courier new,monospace;"><br>
try:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.iface.addPluginToDatabaseMenu("&PostGIS", self.action)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">except AttributeError:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.iface.addPluginToMenu("&PostGIS", self.action)</span><br>
<br>----<br>(remove from Database menu)<br><span style="font-family: courier new,monospace;"><br>try:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.iface.removePluginDatabaseMenu("&PostGIS", self.action)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">except AttributeError:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.iface.removePluginToMenu("&PostGIS", self.action)</span><br>
<br><br>I'm going to move the existent trunk Database plugins to the Database menu and <br>my (Faunalia) DB plugins too.<br><br>Cheers.<br style="font-family: courier new,monospace;" clear="all"><br>-- <br>Giuseppe Sucameli<br>
<br>