[Ocfs2-tools-commits] manish commits r541 - trunk/ocfs2tool
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jan 7 20:08:29 CST 2005
Author: manish
Date: 2005-01-07 20:08:27 -0600 (Fri, 07 Jan 2005)
New Revision: 541
Added:
trunk/ocfs2tool/about.py
trunk/ocfs2tool/menu.py
Modified:
trunk/ocfs2tool/bitmap.py
trunk/ocfs2tool/browser.py
trunk/ocfs2tool/cellmap.override
trunk/ocfs2tool/format.py
trunk/ocfs2tool/general.py
trunk/ocfs2tool/guiutil.py
trunk/ocfs2tool/main.py
trunk/ocfs2tool/nodemap.py
trunk/ocfs2tool/ocfs2module.c
trunk/ocfs2tool/ocfs2tool
trunk/ocfs2tool/process.py
Log:
Major ui revamp
Added: trunk/ocfs2tool/about.py
===================================================================
--- trunk/ocfs2tool/about.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/about.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -0,0 +1,107 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
+OCFS2TOOL_VERSION = '0.0.2'
+
+def print_version():
+ print 'OCFS2Tool version %s' % OCFS2TOOL_VERSION
+
+def print_usage(name):
+ print '''Usage: %s [OPTION]...
+Options:
+ -V, --version print version information and exit
+ --help display this help and exit''' % name
+
+def process_info_args():
+ import sys
+
+ for arg in sys.argv[1:]:
+ if arg == '--version' or arg == '-V':
+ print_version()
+ sys.exit(0)
+ elif arg == '--help':
+ print_usage(sys.argv[0])
+ sys.exit(0)
+ else:
+ print_usage(sys.argv[0])
+ sys.exit(1)
+
+def about(pv):
+ import gtk
+
+ from guiutil import set_props
+
+ if hasattr(gtk, 'AboutDialog'):
+ copyright = 'Copyright (C) 2002, 2005 Oracle. All rights reserved.'
+ license = '''
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public
+License along with this program; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+'''
+ blurb = 'GUI frontend for OCFS2 management and debugging'
+
+ logo = gtk.gdk.pixbuf_new_from_file('logo.png')
+
+ dialog = gtk.AboutDialog()
+ dialog.set_transient_for(pv.toplevel)
+ dialog.set_destroy_with_parent(True)
+
+ set_props(dialog, name='OCFS2 Tool',
+ version=OCFS2TOOL_VERSION,
+ copyright=copyright,
+ license=license,
+ website='http://oss.oracle.com',
+ comments=blurb)
+
+ else:
+ dialog = gtk.MessageDialog(parent=pv.toplevel,
+ flags=gtk.DIALOG_DESTROY_WITH_PARENT,
+ buttons=gtk.BUTTONS_CLOSE)
+ dialog.label.set_text(
+'''OCFS2 Tool
+Version %s
+Copyright (C) 2002, 2005 Oracle.
+All Rights Reserved.''' % OCFS2TOOL_VERSION)
+
+ dialog.run()
+ dialog.destroy()
+
+def main():
+ process_info_args()
+
+ class Dummy: pass
+
+ pv = Dummy()
+ pv.toplevel = None
+
+ about(pv)
+
+if __name__ == '__main__':
+ main()
Modified: trunk/ocfs2tool/bitmap.py
===================================================================
--- trunk/ocfs2tool/bitmap.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/bitmap.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
import ocfs2
Modified: trunk/ocfs2tool/browser.py
===================================================================
--- trunk/ocfs2tool/browser.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/browser.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,9 +1,31 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
+import pango
import ocfs2
from guiutil import set_props
+fields = ('Perms', '# Links', 'Owner', 'Group', 'Size', 'Alloc Size',
+ 'Timestamp', 'Name')
+sample = ('-rw-r--r--', '1', 'manish', 'manish', '133194', '262144', 'Sep 29 12:46', 'closobo.c')
+
class Browser:
def __init__(self, device=None, advanced=False):
self.widget = gtk.VBox(spacing=4)
@@ -18,8 +40,24 @@
tv.insert_column_with_attributes(-1, 'File', gtk.CellRendererText(),
text=0)
- table = gtk.Table(rows=4, columns=2)
+ table = gtk.Table(rows=2, columns=7)
set_props(table, row_spacing=4,
column_spacing=4,
border_width=4)
- self.widget.pack_end(table)
+ self.widget.pack_end(table, expand=False, fill=False)
+
+ font = pango.FontDescription('Monospace')
+
+ for i in range(0, len(fields)):
+ label = gtk.Label(fields[i])
+ set_props(label, xalign=0.0)
+ table.attach(label, i, i + 1, 0, 1)
+
+ label = gtk.Label(sample[i])
+ if i == 1 or i == 4 or i == 5:
+ set_props(label, xalign=1.0)
+ else:
+ set_props(label, xalign=0.0)
+ table.attach(label, i, i + 1, 1, 2)
+
+ label.modify_font(font)
Modified: trunk/ocfs2tool/cellmap.override
===================================================================
--- trunk/ocfs2tool/cellmap.override 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/cellmap.override 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,27 @@
+/*
+ * cellmap.override
+ *
+ * Python binding for a scrollable bitmap display widget
+ *
+ * Copyright (C) 2004 Oracle. All rights reserved.
+ *
+ * Author: Manish Singh <manish.singh at oracle.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have recieved a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
%%
headers
#include <Python.h>
@@ -4,6 +28,7 @@
#define NO_IMPORT_PYGOBJECT
#include "pygobject.h"
+
#include "ocfscellmap.h"
%%
modulename ocfs2
Modified: trunk/ocfs2tool/format.py
===================================================================
--- trunk/ocfs2tool/format.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/format.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
import ocfs2
@@ -141,7 +158,7 @@
widgets[0].grab_focus()
dialog.show_all()
-
+
if dialog.run() != gtk.RESPONSE_OK:
dialog.destroy()
return False
Modified: trunk/ocfs2tool/general.py
===================================================================
--- trunk/ocfs2tool/general.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/general.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
import ocfs2
@@ -35,6 +52,10 @@
if super:
if member == 'version':
val = '%d.%d' % super[0:2]
+ elif member == 's_label':
+ val = super.s_label
+ if not val:
+ val = 'N/A'
else:
val = getattr(super, member)
@@ -44,7 +65,7 @@
val = 'N/A'
self.add_field(desc, val)
-
+
def add_field(self, desc, val):
label = gtk.Label(desc + ':')
set_props(label, xalign=1.0)
Modified: trunk/ocfs2tool/guiutil.py
===================================================================
--- trunk/ocfs2tool/guiutil.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/guiutil.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
def set_props(obj, **kwargs):
Modified: trunk/ocfs2tool/main.py
===================================================================
--- trunk/ocfs2tool/main.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/main.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,4 +1,19 @@
-#!/usr/bin/python
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
import sys
@@ -7,37 +22,28 @@
import ocfs2
from guiutil import set_props, error_box, query_text
+
+from menu import Menu
+from about import about
from process import Process
from format import format_partition
from general import General
from nodemap import NodeMap
-from bitmap import Bitmap
from browser import Browser
+from clconfig import cluster_configurator
-OCFS2TOOL_VERSION = '0.0.1'
-
COLUMN_DEVICE = 0
COLUMN_MOUNTPOINT = 1
-MODE_BASIC = 0
-MODE_ADVANCED = 1
-
notebook_items = (
('general', 'General', General),
('browser', 'File Listing', Browser),
('nodemap', 'Configured Nodes', NodeMap),
- ('bitmap', 'Bitmap View', Bitmap),
)
def cleanup(*args):
gtk.main_quit()
-def usage(name):
- print '''Usage: %s [OPTION]...
-Options:
- -V, --version print version information and exit
- --help display this help and exit''' % name
-
class PartitionView(gtk.TreeView):
def __init__(self, toplevel):
store = gtk.ListStore(str, str, str)
@@ -91,7 +97,7 @@
if row[COLUMN_DEVICE] == device:
sel = self.get_selection()
sel.select_iter(row.iter)
-
+
def refresh_partitions(self):
def list_compare(store, a, b):
d1, m1 = store[a]
@@ -128,7 +134,7 @@
if len(store) and not selected:
sel.select_iter(store.get_iter_first())
-def mount(button, pv):
+def mount(pv):
device, mountpoint = pv.get_sel_values()
mountpoint = query_text(pv.toplevel, 'Mountpoint')
@@ -151,7 +157,7 @@
pv.refresh_partitions()
-def unmount(button, pv):
+def unmount(pv):
device, mountpoint = pv.get_sel_values()
command = ('umount', mountpoint)
@@ -173,7 +179,7 @@
'%s: Could not unmount %s mounted on %s' %
(output, device, mountpoint))
-def refresh(button, pv):
+def refresh(pv):
pv.refresh_partitions()
if len(pv.get_model()) == 0:
@@ -192,67 +198,36 @@
set_props(vbbox, layout_style=gtk.BUTTONBOX_START,
spacing=5,
border_width=5)
-
- button = gtk.Button("Mount")
+
+ button = gtk.Button('Mount')
vbbox.add(button)
button.connect('clicked', mount, pv)
pv.mount_button = button
-
- button = gtk.Button("Unmount")
+
+ button = gtk.Button('Unmount')
vbbox.add(button)
button.connect('clicked', unmount, pv)
pv.unmount_button = button
- button = gtk.Button("Refresh")
+ button = gtk.Button('Refresh')
vbbox.add(button)
button.connect('clicked', refresh, pv)
return vbbox
-def format(pv, action, w):
+def format(pv):
format_partition(pv.toplevel, pv.get_device(), pv.advanced)
pv.refresh_partitions()
-def genconfig(pv, action, w):
+def check(pv):
pass
-def level(pv, action, w):
- if action == MODE_ADVANCED:
- advanced = True
- else:
- advanced = False
+def repair(pv):
+ pass
- if pv.advanced == advanced:
- return
+def clconfig(pv):
+ cluster_configurator(pv.toplevel, pv.advanced)
- pv.advanced = advanced
-
-def about(pv, a, w):
- dialog = gtk.MessageDialog(parent=pv.toplevel,
- flags=gtk.DIALOG_DESTROY_WITH_PARENT,
- buttons=gtk.BUTTONS_CLOSE)
- dialog.label.set_text('''OCFS2 Tool
-Version %s
-Copyright (C) Oracle Corporation 2002, 2004
-All Rights Reserved''' % OCFS2TOOL_VERSION)
-
- dialog.run()
- dialog.destroy()
-
-menu_items = (
- ('/_File', None, None, 0, '<Branch>'),
- ('/File/_Quit', None, cleanup, 0, '<StockItem>', gtk.STOCK_QUIT),
- ('/_Tasks', None, None, 0, '<Branch>'),
- ('/Tasks/_Format...', '<control>F', format, 0),
- #('/Tasks/---', None, None, 0, '<Separator>'),
- #('/Tasks/_Generate Config...', '<control>G', genconfig, 0),
- ('/_Preferences', None, None, 0, '<Branch>'),
- ('/Preferences/_Basic', '<control>B', level, MODE_BASIC, '<RadioItem>'),
- ('/Preferences/_Advanced', '<control>A', level, MODE_ADVANCED, '/Preferences/Basic'),
- ('/_Help', None, None, 0, '<Branch>'),
- ('/Help/_About', None, about, 0)
-)
-
def create_window():
window = gtk.Window()
set_props(window, title='OCFS2 Tool',
@@ -263,24 +238,20 @@
pv = PartitionView(window)
- accel_group = gtk.AccelGroup()
- window.add_accel_group(accel_group)
-
- item_factory = gtk.ItemFactory(gtk.MenuBar, '<main>', accel_group)
- item_factory.create_items(menu_items, pv)
- window.item_factory = item_factory
-
vbox = gtk.VBox()
window.add(vbox)
- menubar = item_factory.get_widget('<main>')
+ menu = Menu(cleanup=cleanup, format=format, check=check, repair=repair,
+ clconfig=clconfig, about=about)
+
+ menubar = menu.get_widget(window, pv)
vbox.pack_start(menubar, expand=False, fill=False)
vpaned = gtk.VPaned()
vpaned.set_border_width(4)
vbox.pack_start(vpaned, expand=True, fill=True)
- hbox = gtk.HBox()
+ hbox = gtk.HBox(spacing=4)
vpaned.pack1(hbox)
scrl_win = gtk.ScrolledWindow()
@@ -319,19 +290,7 @@
window.show_all()
def main():
- for arg in sys.argv[1:]:
- if arg == '--version' or arg == '-V':
- print 'OCFS2Tool version %s' % OCFS2TOOL_VERSION
- sys.exit(0)
- elif arg == '--help':
- usage(sys.argv[0])
- sys.exit(0)
- else:
- usage(sys.argv[0])
- sys.exit(1)
-
create_window()
-
gtk.main()
if __name__ == '__main__':
Added: trunk/ocfs2tool/menu.py
===================================================================
--- trunk/ocfs2tool/menu.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/menu.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -0,0 +1,94 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
+import gtk
+
+try:
+ stock_about = gtk.STOCK_ABOUT
+except AttributeError:
+ stock_about = ''
+
+menu_data = (
+ ('/_File', None, None, 0, '<Branch>'),
+ ('/File/_Quit', None, 'cleanup', 0, '<StockItem>',
+ gtk.STOCK_QUIT),
+ ('/_Tasks', None, None, 0, '<Branch>'),
+ ('/Tasks/_Format...', '<control>F', 'format'),
+ ('/Tasks/---', None, None, 0, '<Separator>'),
+ ('/Tasks/Chec_k...', '<control>K', 'check'),
+ ('/Tasks/ Chec_k...', '<control>R', 'repair'),
+ ('/Tasks/---', None, None, 0, '<Separator>'),
+ ('/Tasks/_Cluster Config...', '<control>C', 'clconfig'),
+ ('/_Help', None, None, 0, '<Branch>'),
+ ('/Help/_About', None, 'about', 0, '<StockItem>',
+ stock_about)
+)
+
+class Menu:
+ def __init__(self, **callbacks):
+ self.items = []
+
+ for i in menu_data:
+ item = list(i)
+
+ if i[2]:
+ def make_cb():
+ callback = callbacks[i[2]]
+
+ def cb(d, a, w):
+ callback(d)
+
+ return cb
+
+ item[2] = make_cb()
+
+ self.items.append(tuple(item))
+
+ def get_widget(self, window, data=None):
+ accel_group = gtk.AccelGroup()
+ window.add_accel_group(accel_group)
+
+ item_factory = gtk.ItemFactory(gtk.MenuBar, '<main>', accel_group)
+ item_factory.create_items(self.items, data)
+
+ return item_factory.get_widget('<main>')
+
+def main():
+ def dummy(*args):
+ gtk.main_quit()
+
+ cb = {}
+ for i in menu_data:
+ if i[2]:
+ cb[i[2]] = dummy
+
+ menubar = Menu(**cb)
+
+ window = gtk.Window()
+ window.connect('delete_event', dummy)
+
+ vbox = gtk.VBox()
+ window.add(vbox)
+
+ vbox.add(menubar.get_widget(window))
+
+ window.show_all()
+
+ gtk.main()
+
+if __name__ == '__main__':
+ main()
Modified: trunk/ocfs2tool/nodemap.py
===================================================================
--- trunk/ocfs2tool/nodemap.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/nodemap.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import gtk
import ocfs2
@@ -29,7 +46,7 @@
store = gtk.ListStore(int, str, str, int, str)
tv = gtk.TreeView(store)
-
+
tv.insert_column_with_attributes(-1, 'Slot #',
gtk.CellRendererText(),
text=COLUMN_SLOT)
@@ -49,6 +66,7 @@
text=COLUMN_UUID)
return tv
+
def main():
import sys
Modified: trunk/ocfs2tool/ocfs2module.c
===================================================================
--- trunk/ocfs2tool/ocfs2module.c 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/ocfs2module.c 2005-01-08 02:08:27 UTC (rev 541)
@@ -3,7 +3,7 @@
*
* OCFS2 python binding.
*
- * Copyright (C) 2004 Oracle. All rights reserved.
+ * Copyright (C) 2004, 2005 Oracle. All rights reserved.
*
* Author: Manish Singh <manish.singh at oracle.com>
*
Modified: trunk/ocfs2tool/ocfs2tool
===================================================================
--- trunk/ocfs2tool/ocfs2tool 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/ocfs2tool 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,6 +1,10 @@
#!/usr/bin/python
+# XXX: for production
+#!/usr/bin/python -W ignore::DeprecationWarning
+
+from about import process_info_args
+process_info_args()
+
from main import main
-
-if __name__ == '__main__':
- main()
+main()
Modified: trunk/ocfs2tool/process.py
===================================================================
--- trunk/ocfs2tool/process.py 2005-01-08 00:01:52 UTC (rev 540)
+++ trunk/ocfs2tool/process.py 2005-01-08 02:08:27 UTC (rev 541)
@@ -1,3 +1,20 @@
+# OCFS2Tool - GUI frontend for OCFS2 management and debugging
+# Copyright (C) 2002, 2005 Oracle. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
+
import os
import types
import fcntl
More information about the Ocfs2-tools-commits
mailing list