for field in ordered_fields:
if (field in fields_to_show) and (field in entry_fields):
info.append((field, entry[field]))
+ if not 'image' in fields_to_show and 'image' in entry.keys():
+ info.append(('image', entry['image']))
return info
def get_all_folders(self, parent=0):
def get_fields(self):
"""Returns all fields from FIELDS table."""
- return [item[0] for item in self.conn.execute( \
- "SELECT name FROM fields").fetchall()]
+ return [item[0] for item in self.conn.execute("SELECT name FROM \
+ fields").fetchall() if item[0]!='image']
# operations with DATA table
def add_entry(self, entry):
def show_settings_dialog(widget, parent, func1, func2, entry_id):
dialog = ConfigurationDialog(self.controller, self.config)
response = getattr(dialog, func1)(None, parent)
- print response
if response == gtk.RESPONSE_OK:
func2(parent, entry_id)
pannable_area.set_property('mov-mode', hildon.MOVEMENT_MODE_BOTH)
image = self.renderer.render_image(dict(entry))
for fname, fvalue in entry:
+ if fname == 'image':
+ continue
button = self.renderer.render_button(_(fname) , fvalue, fname)
info_box.pack_start(button, expand=False)
# pack widgets