diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 7647d2139f..06d936e71b 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
@@ -99,12 +99,15 @@ class MainWindow (gtk.Window): | |||
99 | dialog.add_buttons(gtk.STOCK_NO, gtk.RESPONSE_NO, | 99 | dialog.add_buttons(gtk.STOCK_NO, gtk.RESPONSE_NO, |
100 | gtk.STOCK_YES, gtk.RESPONSE_YES) | 100 | gtk.STOCK_YES, gtk.RESPONSE_YES) |
101 | resp = dialog.run() | 101 | resp = dialog.run() |
102 | dialog.destroy() | ||
102 | if resp == gtk.RESPONSE_YES: | 103 | if resp == gtk.RESPONSE_YES: |
103 | if not self.save_path: | 104 | if not self.save_path: |
104 | self.get_save_path() | 105 | self.get_save_path() |
105 | self.save_recipe_file() | 106 | |
106 | rep = self.model.get_build_rep() | 107 | if self.save_path: |
107 | rep.writeRecipe(self.save_path, self.model) | 108 | self.save_recipe_file() |
109 | rep = self.model.get_build_rep() | ||
110 | rep.writeRecipe(self.save_path, self.model) | ||
108 | 111 | ||
109 | gtk.main_quit() | 112 | gtk.main_quit() |
110 | 113 | ||
@@ -325,17 +328,22 @@ class MainWindow (gtk.Window): | |||
325 | chooser.set_current_name("myimage.bb") | 328 | chooser.set_current_name("myimage.bb") |
326 | response = chooser.run() | 329 | response = chooser.run() |
327 | if response == gtk.RESPONSE_OK: | 330 | if response == gtk.RESPONSE_OK: |
328 | self.save_path = chooser.get_filename() | 331 | save_path = chooser.get_filename() |
332 | else: | ||
333 | save_path = None | ||
329 | chooser.destroy() | 334 | chooser.destroy() |
335 | self.save_path = save_path | ||
330 | 336 | ||
331 | def save_cb(self, action): | 337 | def save_cb(self, action): |
332 | if not self.save_path: | 338 | if not self.save_path: |
333 | self.get_save_path() | 339 | self.get_save_path() |
334 | self.save_recipe_file() | 340 | if self.save_path: |
341 | self.save_recipe_file() | ||
335 | 342 | ||
336 | def save_as_cb(self, action): | 343 | def save_as_cb(self, action): |
337 | self.get_save_path() | 344 | self.get_save_path() |
338 | self.save_recipe_file() | 345 | if self.save_path: |
346 | self.save_recipe_file() | ||
339 | 347 | ||
340 | def open_cb(self, action): | 348 | def open_cb(self, action): |
341 | chooser = gtk.FileChooserDialog(title=None, parent=self, | 349 | chooser = gtk.FileChooserDialog(title=None, parent=self, |