Esempio n. 1
0
 def create_partition(self, widget):
     self.create_bt.set_sensitive(False)
     self.delete_bt.set_sensitive(False)
     self.modify_bt.set_sensitive(False)
     self.auto_bt.set_sensitive(False)
     self.revert_bt.set_sensitive(False)
     if len(self.path) == 2 and how_partition(
             self.path) == 1 and self.slice == 'freespace':
         self.schemeEditor(False)
     elif len(self.path) == 3:
         if self.slice == 'freespace':
             self.labelEditor(self.path, self.slice, self.size, 'MBR',
                              False)
     elif len(self.path) == 2 and self.slice == 'freespace':
         if scheme_query(self.path) == "MBR" and self.path[1] < 4:
             self.sliceEditor()
         elif scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 'GPT',
                              False)
     else:
         if how_partition(self.path) == 1:
             self.schemeEditor(True)
         elif how_partition(self.path) == 0:
             self.schemeEditor(True)
         else:
             pass
Esempio n. 2
0
 def add_gpt_mbr(self, widget, data):
     diskSchemeChanger(self.scheme, self.path, self.slice, self.size)
     self.update()
     self.window.hide()
     if data is False:
         if scheme_query(self.path) == "MBR" and self.path[1] < 4:
             self.sliceEditor()
         elif scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 'GPT', False)
Esempio n. 3
0
 def create_partition(self, widget):
     if len(self.path) == 3:
         if self.slice == 'freespace':
             self.labelEditor(self.path, self.slice, self.size, 0, 1)
     elif len(self.path) == 2 and self.slice == 'freespace':
         if how_partition(self.path) == 1:
             self.schemeEditor(True)
         elif scheme_query(self.path) == "MBR" and self.path[1] < 4:
             self.sliceEditor()
         elif scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 1, 1)
     else:
         self.schemeEditor(True)
Esempio n. 4
0
 def add_gpt_mbr(self, widget):
     diskSchemeChanger(self.scheme, self.path, self.slice, self.size)
     self.update()
     self.window.hide()
     if scheme_query(self.path) == "MBR" and len(self.path) == 1:
         self.update()
         self.sliceEditor()
         self.update()
     elif scheme_query(self.path) == "MBR" and self.path[1] < 4:
         self.update()
         self.sliceEditor()
         self.update()
     elif scheme_query(self.path) == "GPT":
         self.labelEditor(self.path, self.slice, self.size, 1, 1)
Esempio n. 5
0
 def modify_partition(self, widget):
     if len(self.path) == 3:
         if self.slice != 'freespace':
             self.labelEditor(self.path, self.slice, self.size, 'MBR', True)
     elif len(self.path) == 2 and self.slice != 'freespace':
         if scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 'GPT', True)
Esempio n. 6
0
 def create_partition(self, widget):
     if len(self.path) == 3:
         if self.slice == 'freespace':
             self.labelEditor(self.path, self.slice, self.size, 0, 1)
     elif len(self.path) == 2 and self.slice == 'freespace':
         if scheme_query(self.path) == "MBR" and self.path[1] < 4:
             self.sliceEditor()
         elif scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 1, 1)
     else:
         if how_partition(self.path) == 1:
             self.schemeEditor(True)
         elif how_partition(self.path) == 0:
             self.schemeEditor(True)
         else:
             pass
Esempio n. 7
0
 def modify_partition(self, widget):
     if len(self.path) == 3:
         if self.slice != 'freespace':
             self.labelEditor(self.path, self.slice, self.size, 0, 0)
     elif len(self.path) == 2 and self.slice != 'freespace':
         if scheme_query(self.path) == "GPT":
             self.labelEditor(self.path, self.slice, self.size, 1, 0)