Now can launch one process per core, and launch new ones when the old ones end

This commit is contained in:
Sergio Costas 2014-07-23 23:53:11 +02:00
parent 13f9e67eb1
commit 86f77faa3f
13 changed files with 761 additions and 77 deletions

View file

@ -0,0 +1,64 @@
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
#
# This file is part of DeVeDe-NG
#
# DeVeDe-NG 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 3 of the License, or
# (at your option) any later version.
#
# DeVeDe-NG 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, see <http://www.gnu.org/licenses/>
from gi.repository import Gtk
import os
import devede.configuration_data
class create_disk_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
def run(self):
builder = Gtk.Builder()
builder.set_translation_domain(self.config.gettext_domain)
builder.add_from_file(os.path.join(self.config.glade,"wcreate.ui"))
builder.connect_signals(self)
wcreate_window = builder.get_object("dialog_create")
self.wpath = builder.get_object("path")
self.wname = builder.get_object("name")
wshutdown = builder.get_object("shutdown")
self.waccept = builder.get_object("accept")
self.wname.set_text("movie")
self.wpath.set_current_folder(self.config.final_folder)
wcreate_window.show_all()
self.on_iface_changed(None)
retval = wcreate_window.run()
self.path = self.wpath.get_current_folder()
self.name = self.wname.get_text()
self.shutdown = wshutdown.get_active()
wcreate_window.destroy()
if (retval == 1):
return True
else:
return False
def on_iface_changed(self,b):
path = self.wpath.get_current_folder()
name = self.wname.get_text()
if ((path == None) or (path == "") or (name == None) or (name == "")):
self.waccept.set_sensitive(False)
else:
self.waccept.set_sensitive(True)