Exemplo n.º 1
0
 def show_layer_selection_dialog(self):
     dialog = LayerSelectionDialog(title = "Layer Selection",
                  layers = copy.deepcopy(self.configuration.layers),
                  all_layers = self.parameters.all_layers,
                  split_model = self.get_split_model(),
                  parent = self,
                  flags = gtk.DIALOG_MODAL
                      | gtk.DIALOG_DESTROY_WITH_PARENT
                      | gtk.DIALOG_NO_SEPARATOR,
                  buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
                             gtk.STOCK_OK, gtk.RESPONSE_YES))
     response = dialog.run()
     if response == gtk.RESPONSE_YES:
         self.configuration.layers = dialog.layers
         # DO refresh layers
         if dialog.layers_changed:
             self.switch_page(self.LAYER_CHANGED)
     dialog.destroy()
Exemplo n.º 2
0
 def show_layer_selection_dialog(self):
     dialog = LayerSelectionDialog(title="Layers",
                                   layers=copy.deepcopy(
                                       self.configuration.layers),
                                   all_layers=self.parameters.all_layers,
                                   parent=self,
                                   flags=gtk.DIALOG_MODAL
                                   | gtk.DIALOG_DESTROY_WITH_PARENT
                                   | gtk.DIALOG_NO_SEPARATOR)
     button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
     HobAltButton.style_button(button)
     button = dialog.add_button("OK", gtk.RESPONSE_YES)
     HobButton.style_button(button)
     response = dialog.run()
     if response == gtk.RESPONSE_YES:
         self.configuration.layers = dialog.layers
         self.save_defaults()  # remember layers
         # DO refresh layers
         if dialog.layers_changed:
             self.update_config_async()
     dialog.destroy()
Exemplo n.º 3
0
 def show_layer_selection_dialog(self):
     dialog = LayerSelectionDialog(
         title="Layers",
         layers=copy.deepcopy(self.configuration.layers),
         all_layers=self.parameters.all_layers,
         parent=self,
         flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.DIALOG_NO_SEPARATOR,
     )
     button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
     HobAltButton.style_button(button)
     button = dialog.add_button("OK", gtk.RESPONSE_YES)
     HobButton.style_button(button)
     response = dialog.run()
     if response == gtk.RESPONSE_YES:
         self.configuration.layers = dialog.layers
         self.save_defaults()  # remember layers
         # DO refresh layers
         if dialog.layers_changed:
             self.update_config_async()
     dialog.destroy()