Add skeleton for file properties plugin
This commit is contained in:
parent
519ac2bf99
commit
6eb37ebc3c
41
debug-viewer/GstDebugViewer/Plugins/FileProperties.py
Normal file
41
debug-viewer/GstDebugViewer/Plugins/FileProperties.py
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
from GstDebugViewer.Plugins import *
|
||||
import logging
|
||||
import gtk
|
||||
|
||||
class FilePropertiesSentinel (object):
|
||||
|
||||
pass
|
||||
|
||||
class FilePropertiesDialog (gtk.Dialog):
|
||||
|
||||
pass
|
||||
|
||||
class FilePropertiesFeature (FeatureBase):
|
||||
|
||||
def __init__ (self):
|
||||
|
||||
self.action_group = gtk.ActionGroup ("FilePropertiesActions")
|
||||
self.action_group.add_actions ([("show-file-properties", gtk.STOCK_PROPERTIES,
|
||||
_("_Properties"), "<Ctrl>P")])
|
||||
|
||||
def attach (self, window):
|
||||
|
||||
ui = window.ui_manager
|
||||
ui.insert_action_group (self.action_group, 0)
|
||||
|
||||
self.merge_id = ui.new_merge_id ()
|
||||
ui.add_ui (self.merge_id, "/menubar/FileMenu/FileMenuAdditions",
|
||||
"FileProperties", "show-file-properties",
|
||||
gtk.UI_MANAGER_MENUITEM, False)
|
||||
|
||||
handler = self.handle_action_activate
|
||||
self.action_group.get_action ("show-file-properties").connect ("activate", handler)
|
||||
|
||||
def handle_action_activate (self, action):
|
||||
|
||||
pass
|
||||
|
||||
class Plugin (PluginBase):
|
||||
|
||||
features = (FilePropertiesFeature,)
|
@ -4,6 +4,7 @@
|
||||
<menu name="FileMenu" action="FileMenuAction">
|
||||
<menuitem name="FileNewWindow" action="new-window"/>
|
||||
<menuitem name="FileOpen" action="open-file"/>
|
||||
<separator/>
|
||||
<placeholder name="FileMenuAdditions"/>
|
||||
<separator/>
|
||||
<menuitem name="FileCloseWindow" action="close-window"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user