diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py index 9ea512f214..a20afcd50f 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py | |||
@@ -29,10 +29,12 @@ class SaveImageDialog (CrumbsDialog): | |||
29 | This class is used to create a dialog that permits to save | 29 | This class is used to create a dialog that permits to save |
30 | a custom image in a predefined directory. | 30 | a custom image in a predefined directory. |
31 | """ | 31 | """ |
32 | def __init__(self, directory, title, parent, flags, buttons=None): | 32 | def __init__(self, directory, name, description, title, parent, flags, buttons=None): |
33 | super(SaveImageDialog, self).__init__(title, parent, flags, buttons) | 33 | super(SaveImageDialog, self).__init__(title, parent, flags, buttons) |
34 | self.directory = directory | 34 | self.directory = directory |
35 | self.builder = parent | 35 | self.builder = parent |
36 | self.name_field = name | ||
37 | self.description_field = description | ||
36 | 38 | ||
37 | # create visual elements on the dialog | 39 | # create visual elements on the dialog |
38 | self.create_visual_elements() | 40 | self.create_visual_elements() |
@@ -52,6 +54,7 @@ class SaveImageDialog (CrumbsDialog): | |||
52 | content += "characters. The only special character you can use is the ASCII hyphen (-)." | 54 | content += "characters. The only special character you can use is the ASCII hyphen (-)." |
53 | sub_label.set_markup(content) | 55 | sub_label.set_markup(content) |
54 | self.name_entry = gtk.Entry() | 56 | self.name_entry = gtk.Entry() |
57 | self.name_entry.set_text(self.name_field) | ||
55 | self.name_entry.set_size_request(350,30) | 58 | self.name_entry.set_size_request(350,30) |
56 | self.name_entry.connect("changed", self.name_entry_changed) | 59 | self.name_entry.connect("changed", self.name_entry_changed) |
57 | sub_vbox.pack_start(label, expand=False, fill=False) | 60 | sub_vbox.pack_start(label, expand=False, fill=False) |
@@ -67,6 +70,7 @@ class SaveImageDialog (CrumbsDialog): | |||
67 | sub_label.set_alignment(0, 0) | 70 | sub_label.set_alignment(0, 0) |
68 | sub_label.set_markup("The description should be less than 150 characters long.") | 71 | sub_label.set_markup("The description should be less than 150 characters long.") |
69 | self.description_entry = gtk.TextView() | 72 | self.description_entry = gtk.TextView() |
73 | self.description_entry.get_buffer().set_text(self.description_field) | ||
70 | self.description_entry.set_wrap_mode(gtk.WRAP_WORD) | 74 | self.description_entry.set_wrap_mode(gtk.WRAP_WORD) |
71 | self.description_entry.set_size_request(350,150) | 75 | self.description_entry.set_size_request(350,150) |
72 | sub_vbox.pack_start(label, expand=False, fill=False) | 76 | sub_vbox.pack_start(label, expand=False, fill=False) |
@@ -124,6 +128,8 @@ class SaveImageDialog (CrumbsDialog): | |||
124 | self.builder.recipe_model.set_in_list(text, description) | 128 | self.builder.recipe_model.set_in_list(text, description) |
125 | self.builder.recipe_model.set_selected_image(text) | 129 | self.builder.recipe_model.set_selected_image(text) |
126 | self.builder.image_details_page.show_page(self.builder.IMAGE_GENERATED) | 130 | self.builder.image_details_page.show_page(self.builder.IMAGE_GENERATED) |
131 | self.builder.image_details_page.name_field_template = text | ||
132 | self.builder.image_details_page.description_field_template = description | ||
127 | self.destroy() | 133 | self.destroy() |
128 | else: | 134 | else: |
129 | self.show_invalid_input_error_dialog() | 135 | self.show_invalid_input_error_dialog() |