[xiph-commits] r7410 - in trunk: . xinole xinole/icons
arc at dactyl.lonelymoon.com
arc
Wed Jul 28 19:44:12 PDT 2004
xinole/icons/16x16 xinole/icons/22x22 xinole/icons/32x32
Message-ID: <20040729024412.0F8A29AAAB at dactyl.lonelymoon.com>
Author: arc
Date: Wed Jul 28 19:44:12 2004
New Revision: 7410
Added:
trunk/xinole/
trunk/xinole/icons/
trunk/xinole/icons/16x16/
trunk/xinole/icons/16x16/dev-lcl.png
trunk/xinole/icons/16x16/dev-p2p.png
trunk/xinole/icons/16x16/dev-web.png
trunk/xinole/icons/16x16/edit.png
trunk/xinole/icons/16x16/editclear.png
trunk/xinole/icons/16x16/editcopy.png
trunk/xinole/icons/16x16/editcut.png
trunk/xinole/icons/16x16/editdelete.png
trunk/xinole/icons/16x16/editpaste.png
trunk/xinole/icons/16x16/editshred.png
trunk/xinole/icons/16x16/edittrash.png
trunk/xinole/icons/16x16/filenew.png
trunk/xinole/icons/16x16/fileopen.png
trunk/xinole/icons/16x16/flac.png
trunk/xinole/icons/16x16/mux-opened.png
trunk/xinole/icons/16x16/mux-packed.png
trunk/xinole/icons/16x16/player_eject.png
trunk/xinole/icons/16x16/player_end.png
trunk/xinole/icons/16x16/player_fwd.png
trunk/xinole/icons/16x16/player_pause.png
trunk/xinole/icons/16x16/player_play.png
trunk/xinole/icons/16x16/player_rew.png
trunk/xinole/icons/16x16/player_start.png
trunk/xinole/icons/16x16/player_stop.png
trunk/xinole/icons/16x16/speex.png
trunk/xinole/icons/16x16/theora.png
trunk/xinole/icons/16x16/unknown.png
trunk/xinole/icons/16x16/vorbis.png
trunk/xinole/icons/22x22/
trunk/xinole/icons/22x22/edit.png
trunk/xinole/icons/22x22/edit_add.png
trunk/xinole/icons/22x22/edit_remove.png
trunk/xinole/icons/22x22/editclear.png
trunk/xinole/icons/22x22/editcopy.png
trunk/xinole/icons/22x22/editcut.png
trunk/xinole/icons/22x22/editdelete.png
trunk/xinole/icons/22x22/editpaste.png
trunk/xinole/icons/22x22/editshred.png
trunk/xinole/icons/22x22/edittrash.png
trunk/xinole/icons/22x22/filenew.png
trunk/xinole/icons/22x22/fileopen.png
trunk/xinole/icons/22x22/player_eject.png
trunk/xinole/icons/22x22/player_end.png
trunk/xinole/icons/22x22/player_fwd.png
trunk/xinole/icons/22x22/player_pause.png
trunk/xinole/icons/22x22/player_play.png
trunk/xinole/icons/22x22/player_rew.png
trunk/xinole/icons/22x22/player_start.png
trunk/xinole/icons/22x22/player_stop.png
trunk/xinole/icons/32x32/
trunk/xinole/icons/32x32/edit.png
trunk/xinole/icons/32x32/editclear.png
trunk/xinole/icons/32x32/editcopy.png
trunk/xinole/icons/32x32/editcut.png
trunk/xinole/icons/32x32/editdelete.png
trunk/xinole/icons/32x32/editpaste.png
trunk/xinole/icons/32x32/editshred.png
trunk/xinole/icons/32x32/edittrash.png
trunk/xinole/icons/32x32/filenew.png
trunk/xinole/icons/32x32/fileopen.png
trunk/xinole/icons/32x32/player_eject.png
trunk/xinole/icons/32x32/player_end.png
trunk/xinole/icons/32x32/player_fwd.png
trunk/xinole/icons/32x32/player_pause.png
trunk/xinole/icons/32x32/player_play.png
trunk/xinole/icons/32x32/player_rew.png
trunk/xinole/icons/32x32/player_start.png
trunk/xinole/icons/32x32/player_stop.png
trunk/xinole/images.py
trunk/xinole/images.pyc
trunk/xinole/main.py
trunk/xinole/main.pyc
trunk/xinole/sandbox.py
trunk/xinole/sandbox.pyc
Log:
This is the start of a beautiful cross-platform non-linear Ogg editor.
Currently, it is capable of little more than opening a GUI and allowing
you to add new media to the sandbox (lower left window). When you add
new media it detects only the codecs in the first chain, does not
traverse the rest of the stream to find other chains, and does not
calculate total length. It does not yet let you drag and drop anything.
Included are icons from KDE as well as some 16x16 icons I made for
various Xiph codecs based on Sheryl's logos. I hope to make larger
versions of these logos (22x22 and 32x32) for use in other sections.
It currently depends on wxPython and py-ogg2.
Added: trunk/xinole/icons/16x16/dev-lcl.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/dev-lcl.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/dev-p2p.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/dev-p2p.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/dev-web.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/dev-web.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/edit.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editclear.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editclear.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editcopy.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editcopy.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editcut.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editcut.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editdelete.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editdelete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editpaste.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editpaste.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/editshred.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/editshred.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/edittrash.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/edittrash.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/filenew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/filenew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/fileopen.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/fileopen.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/flac.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/flac.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/mux-opened.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/mux-opened.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/mux-packed.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/mux-packed.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_eject.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_eject.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_end.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_end.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_fwd.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_fwd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_pause.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_pause.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_play.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_play.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_rew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_rew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_start.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_start.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/player_stop.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/player_stop.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/speex.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/speex.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/theora.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/theora.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/unknown.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/unknown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/16x16/vorbis.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/16x16/vorbis.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/edit.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/edit_add.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/edit_add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/edit_remove.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/edit_remove.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editclear.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editclear.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editcopy.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editcopy.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editcut.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editcut.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editdelete.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editdelete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editpaste.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editpaste.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/editshred.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/editshred.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/edittrash.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/edittrash.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/filenew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/filenew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/fileopen.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/fileopen.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_eject.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_eject.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_end.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_end.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_fwd.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_fwd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_pause.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_pause.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_play.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_play.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_rew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_rew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_start.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_start.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/22x22/player_stop.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/22x22/player_stop.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/edit.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editclear.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editclear.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editcopy.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editcopy.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editcut.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editcut.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editdelete.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editdelete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editpaste.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editpaste.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/editshred.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/editshred.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/edittrash.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/edittrash.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/filenew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/filenew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/fileopen.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/fileopen.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_eject.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_eject.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_end.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_end.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_fwd.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_fwd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_pause.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_pause.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_play.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_play.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_rew.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_rew.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_start.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_start.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/icons/32x32/player_stop.png
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/icons/32x32/player_stop.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/images.py
===================================================================
--- trunk/xinole/images.py 2004-07-29 01:17:26 UTC (rev 7409)
+++ trunk/xinole/images.py 2004-07-29 02:44:11 UTC (rev 7410)
@@ -0,0 +1,6 @@
+from wxPython.wx import *
+
+def geticon(name, size=1):
+ sizes=('16x16','22x22','32x32')
+ f = 'icons/%s/%s.png' % (sizes[size], name)
+ return wxImage(f, wxBITMAP_TYPE_PNG).ConvertToBitmap()
Added: trunk/xinole/images.pyc
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/images.pyc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/main.py
===================================================================
--- trunk/xinole/main.py 2004-07-29 01:17:26 UTC (rev 7409)
+++ trunk/xinole/main.py 2004-07-29 02:44:11 UTC (rev 7410)
@@ -0,0 +1,170 @@
+from wxPython.wx import *
+import wx
+import time
+from sandbox import *
+from images import geticon
+
+def geticon(name, size=1):
+ sizes=('16x16','22x22','32x32')
+ f = 'icons/%s/%s.png' % (sizes[size], name)
+ return wxImage(f, wxBITMAP_TYPE_PNG).ConvertToBitmap()
+
+class MainFrame(wxFrame):
+ def __init__(self):
+ wxFrame.__init__(self, None, -1, 'Xinloe', size=(620,400))
+ self.CenterOnScreen()
+ self.CreateStatusBar()
+ self.SetStatusText("Ready.")
+ self.ToolLabels = 0
+ self.mainWin = MainWindow(self)
+ self.winCount = 0
+
+ menuBar = wxMenuBar()
+ toolBar = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT|wxTB_TEXT)
+
+ items=(('&File',(('&New', 'Create a new project', self.OnNewWindow, 'filenew'),
+ ('&Open', 'Open a saved project', self.OnToolClick, 'fileopen'),
+ ('&Close', 'Close Project', self.CloseWindow))),
+ ('&Edit',(('Cu&t', 'Move the selected text or item(s) to the clipboard', self.OnToolClick, 'editcut'),
+ ('&Copy', 'Copy the selected text or item(s) to the clipboard', self.OnToolClick, 'editcopy'),
+ ('&Paste', 'Paste the clipboard contents', self.OnToolClick, 'editpaste'))),
+ ('&Stream',(('Sta&rt', 'Move active cursor to head of the project',
+ self.OnToolClick, 'player_start'),
+ ('&Rewind', 'Move active cursor to start of the chain',
+ self.OnToolClick, 'player_rew'),
+ ('&Play', 'Stream from active cursor',
+ self.OnToolClick, 'player_play'),
+ ('&Stop', 'Stop streaming from active cursor',
+ self.OnToolClick, 'player_stop'),
+ ('&Forward', 'Move active cursor to the end of the chain',
+ self.OnToolClick, 'player_fwd'),
+ ('&End', 'Move active cursor to tail of the project',
+ self.OnToolClick, 'player_end'))))
+
+
+ i = 0
+ for m in items :
+ menu = wxMenu()
+ for t in m[1] :
+ if t :
+ menu.Append(i, t[0], t[1])
+ EVT_MENU(self, i, t[2])
+ if len(t) > 3 :
+ if self.ToolLabels :
+ toolBar.AddLabelTool(i, t[0].replace('&',''), geticon(t[3]), longHelp=t[1])
+ else :
+ toolBar.AddSimpleTool(i, geticon(t[3]), t[0].replace('&',''), t[1])
+ EVT_TOOL(self, i, t[2])
+ EVT_TOOL_RCLICKED(self, i, self.OnToolRClick)
+ else :
+ menu.AppendSeparator()
+ i = i + 1
+ menuBar.Append(menu, m[0])
+ toolBar.AddSeparator()
+
+ self.SetMenuBar(menuBar)
+
+ EVT_MENU_HIGHLIGHT_ALL(self, self.OnMenuHighlight)
+
+ def OnMenuHighlight(self, event):
+ # Show how to get menu item imfo from this event handler
+ id = event.GetMenuId()
+ item = self.GetMenuBar().FindItemById(id)
+ text = item.GetText()
+ help = item.GetHelp()
+ #print text, help
+ event.Skip() # but in this case just call Skip so the default is done
+
+ def CloseWindow(self, event):
+ self.Close()
+
+ def OnToolClick(self, event):
+ tb = self.GetToolBar()
+ #tb.EnableTool(10, not tb.GetToolEnabled(10))
+
+ def OnToolRClick(self, event):
+ return
+
+ def OnNewWindow(self, evt):
+ self.winCount = self.winCount + 1
+ win = wxPanel(self.mainWin.projectWin, -1)
+ self.mainWin.projectWin.AddPage(win, 'Untitled %d' % self.winCount)
+ #win = wxMDIChildFrame(self.mainWin.projectWin, -1, "Untitled %d" % self.winCount)
+ #canvas = MyCanvas(win)
+ #win.Show(True)
+
+ def OnExit(self, evt):
+ self.Close(True)
+
+
+class MainWindow(wxSplitterWindow):
+ def __init__(self, parent):
+ wxSplitterWindow.__init__(self, parent, -1)
+
+ # Project Window
+ self.projectWin = ProjectPanel(self)
+
+ # Bottom Window
+ self.bottomWin = BottomWindow(self)
+
+ self.SetMinimumPaneSize(5)
+ #self.SplitHorizontally(self.sandboxWin, self.projectWin, 100)
+ #self.SplitVertically(self.projectWin, self.sandboxWin, 100)
+ self.SplitHorizontally(self.projectWin, self.bottomWin, 250)
+
+
+class ProjectPanel(wxNotebook):
+ def __init__(self, parent):
+ wxNotebook.__init__(self, parent, -1, style=wxNB_BOTTOM)
+
+class BottomWindow(wxSplitterWindow):
+ def __init__(self, parent):
+ wxSplitterWindow.__init__(self, parent, -1)
+
+ # Sandbox Window
+ self.sandboxWin = SandboxPanel(self)
+
+ # Infobox Window
+ self.infoboxWin = SandboxPanel(self)
+
+ self.SetMinimumPaneSize(5)
+ self.SplitVertically(self.sandboxWin, self.infoboxWin, 200)
+
+
+
+
+import wx # This module uses the new wx namespace
+#print "wx.VERSION_STRING = ", wx.VERSION_STRING
+
+import sys, os
+
+#----------------------------------------------------------------------------
+
+
+class RunApp(wx.App):
+ def __init__(self):
+ wx.App.__init__(self, 0)
+
+ def OnInit(self):
+ wx.InitAllImageHandlers()
+ wx.Log_SetActiveTarget(wx.LogStderr())
+
+ win = MainFrame()
+ win.Show(True)
+
+ self.SetTopWindow(win)
+ self.frame = win
+ return True
+
+ def OnCloseFrame(self, evt):
+ if hasattr(self, "window") and hasattr(self.window, "ShutdownDemo"):
+ self.window.ShutdownDemo()
+ evt.Skip()
+
+
+app = RunApp()
+app.MainLoop()
+
+
+
+
Added: trunk/xinole/main.pyc
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/main.pyc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xinole/sandbox.py
===================================================================
--- trunk/xinole/sandbox.py 2004-07-29 01:17:26 UTC (rev 7409)
+++ trunk/xinole/sandbox.py 2004-07-29 02:44:11 UTC (rev 7410)
@@ -0,0 +1,148 @@
+import os
+import ogg2
+from wxPython.wx import *
+from wxPython.gizmos import wxTreeListCtrl
+
+import images
+
+class SBTreeCtrl(wxTreeCtrl):
+ def OnCompareItems(self, item1, item2):
+ t1 = self.GetItemText(item1)
+ t2 = self.GetItemText(item2)
+ if t1 < t2: return -1
+ if t1 == t2: return 0
+ return 1
+
+
+class SandboxPanel(wxPanel):
+ def __init__(self, parent):
+ wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS)
+ EVT_SIZE(self, self.OnSize)
+
+ #self.tree = wxTreeListCtrl(self, -1, style = wxTR_TWIST_BUTTONS)
+ self.tree = SBTreeCtrl(self, -1, wxDefaultPosition, wxDefaultSize,
+ wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS
+ | wxTR_MULTIPLE | wxTR_HIDE_ROOT
+ | wxTR_TWIST_BUTTONS)
+ isz = (16,16)
+ il = wxImageList(isz[0], isz[1])
+ self.lclidx = il.Add(images.geticon('dev-lcl',0))
+ self.p2pidx = il.Add(images.geticon('dev-p2p',0))
+ self.webidx = il.Add(images.geticon('dev-web',0))
+ self.fldridx = il.Add(wxArtProvider_GetBitmap(wxART_FOLDER, wxART_OTHER, isz))
+ self.fldropenidx = il.Add(wxArtProvider_GetBitmap(wxART_FILE_OPEN, wxART_OTHER, isz))
+ self.fileidx = il.Add(wxArtProvider_GetBitmap(wxART_REPORT_VIEW, wxART_OTHER, isz))
+ self.muxpackidx = il.Add(images.geticon('mux-packed',0))
+ self.muxopenidx = il.Add(images.geticon('mux-opened',0))
+ self.vorbisidx = il.Add(images.geticon('vorbis',0))
+ self.theoraidx = il.Add(images.geticon('theora',0))
+ self.speexidx = il.Add(images.geticon('speex',0))
+ self.flacidx = il.Add(images.geticon('flac',0))
+ self.unknownidx = il.Add(images.geticon('unknown',0))
+
+ self.tree.SetImageList(il)
+ self.il = il
+
+ self.root = self.tree.AddRoot("")
+ self.tree.SetPyData(self.root, None)
+
+ self.devlocal = self.tree.AppendItem(self.root, 'Local Media')
+ self.tree.SetPyData(self.devlocal, None)
+ self.tree.SetItemImage(self.devlocal, self.lclidx, which = wxTreeItemIcon_Normal)
+
+ self.share = self.tree.AppendItem(self.root, 'P2P Media')
+ self.tree.SetPyData(self.share, None)
+ self.tree.SetItemImage(self.share, self.p2pidx, which = wxTreeItemIcon_Normal)
+
+ self.web = self.tree.AppendItem(self.root, 'Web Media')
+ self.tree.SetPyData(self.web, None)
+ self.tree.SetItemImage(self.web, self.webidx, which = wxTreeItemIcon_Normal)
+
+ self.tree.Expand(self.root)
+ EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
+
+
+ def OnSize(self, evt):
+ self.tree.SetSize(self.GetSize())
+
+ def OnRightClick(self, evt):
+ pt = evt.GetPosition()
+ item, flags = self.tree.HitTest(pt)
+ if item == self.devlocal :
+ self.PopupDevLocalMenu(pt)
+
+ def PopupDevLocalMenu(self, pos) :
+ if not hasattr(self, "devlocalPopupNew"):
+ self.devlocalPopupNewFile = wxNewId()
+ EVT_MENU(self, self.devlocalPopupNewFile, self.OnNewLocalFile)
+ #self.devlocalPopupNewDir = wxNewId()
+ #EVT_MENU(self, self.devlocalPopupNewDir, self.OnNewLocalDir)
+ menu = wxMenu()
+ menu.Append(self.devlocalPopupNewFile, "Add New File")
+ self.PopupMenu(menu, pos)
+ menu.Destroy()
+
+ def OnNewLocalFile(self, evt):
+ dlg = wxFileDialog(None, "Choose a file", os.getcwd(), "",
+ "Ogg Media (.ogg)|*.ogg|All Files (*)|*",
+ wxOPEN | wxMULTIPLE | wxCHANGE_DIR )
+ if dlg.ShowModal() == wxID_OK:
+ paths = dlg.GetPaths()
+ for path in paths :
+ self.AddNewFile(path)
+ dlg.Destroy()
+
+
+ def AddNewFile(self, path):
+ fd = open(path,'r')
+ if fd.read(4) != 'OggS' :
+ print 'Non-Ogg file detected!'
+ return
+ fd.seek(0)
+ newfile = self.tree.AppendItem(self.devlocal, os.path.split(path)[1])
+ self.tree.SetPyData(newfile, None)
+ self.tree.SetItemImage(newfile, self.fileidx, which = wxTreeItemIcon_Normal)
+ chain = self.tree.AppendItem(newfile, 'Chain #0')
+ self.tree.SetPyData(chain, None)
+ self.tree.SetItemImage(chain, self.muxpackidx, which = wxTreeItemIcon_Normal)
+ self.tree.SetItemImage(chain, self.muxopenidx, which = wxTreeItemIcon_Expanded)
+
+ sy = ogg2.OggSyncState()
+ while sy:
+ sy.input(fd)
+ while 1:
+ page = sy.pageout()
+ if page :
+ if page.pageno > 0 :
+ sy = None
+ break
+ st = ogg2.OggStreamState(page.serialno)
+ st.pagein(page)
+ packet = st.packetout()
+ bp = ogg2.OggPackBuff(packet)
+ magic = ""
+ for a in range(10):
+ byte = bp.read(8)
+ if byte : magic = magic + chr(byte)
+ #print ord(magic[0]),magic
+ if magic[:7] == '\x01vorbis':
+ stream = self.tree.AppendItem(chain, 'Vorbis')
+ self.tree.SetPyData(stream, None)
+ self.tree.SetItemImage(stream, self.vorbisidx, which = wxTreeItemIcon_Normal)
+ elif magic[:7] == '\x80theora':
+ stream = self.tree.AppendItem(chain, 'Theora')
+ self.tree.SetPyData(stream, None)
+ self.tree.SetItemImage(stream, self.theoraidx, which = wxTreeItemIcon_Normal)
+ elif magic[:5] == 'Speex':
+ stream = self.tree.AppendItem(chain, 'Speex')
+ self.tree.SetPyData(stream, None)
+ self.tree.SetItemImage(stream, self.speexidx, which = wxTreeItemIcon_Normal)
+ elif magic[:4] == 'fLaC':
+ stream = self.tree.AppendItem(chain, 'FLAC')
+ self.tree.SetPyData(stream, None)
+ self.tree.SetItemImage(stream, self.flacidx, which = wxTreeItemIcon_Normal)
+ else :
+ stream = self.tree.AppendItem(chain, 'Unknown Codec')
+ self.tree.SetPyData(stream, None)
+ self.tree.SetItemImage(stream, self.unknownidx, which = wxTreeItemIcon_Normal)
+ else : break
Added: trunk/xinole/sandbox.pyc
===================================================================
(Binary files differ)
Property changes on: trunk/xinole/sandbox.pyc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the commits
mailing list