Subversion Repositories basico

Compare Revisions

Ignore whitespace Rev 239 → Rev 240

/branches/BR-0.3/basico/widgets/annotationview.py
181,9 → 181,19
 
# Url
hbox = Gtk.HBox()
 
## url entry
a_link = self.gui.add_widget('gtk_entry_annotation_link', Gtk.Entry())
a_link.set_placeholder_text("Type a url here...")
hbox.pack_start(a_link, True, True, 3)
 
## url button
a_link_button = self.gui.add_widget('gtk_link_button_annotation_link', Gtk.LinkButton())
a_link_button.set_relief(Gtk.ReliefStyle.NORMAL)
a_link_button.set_label('Visit')
hbox.pack_start(a_link_button, False, False, 3)
 
# url type
a_link_type_model = Gtk.ListStore(str)
self.gui.add_widget('annotation_link_type_Intranet', a_link_type_model.append(['Intranet']))
self.gui.add_widget('annotation_link_type_SAP Blog', a_link_type_model.append(['SAP Blog']))
192,6 → 202,7
self.gui.add_widget('annotation_link_type_SAP Incident', a_link_type_model.append(['SAP Incident']))
self.gui.add_widget('annotation_link_SAP Questions and Answers', a_link_type_model.append(['SAP Questions and Answers']))
self.gui.add_widget('annotation_link_type_SAP Wiki', a_link_type_model.append(['SAP Wiki']))
# ~ 'Knowledge Base Search'
active = self.gui.add_widget('annotation_link_type_Website', a_link_type_model.append(['Website']))
a_link_type = Gtk.ComboBox.new_with_model(a_link_type_model)
a_link_type.set_active_iter(active)
259,6 → 270,7
a_wdg_human_timestamp = self.gui.get_widget('gtk_label_human_timestamp')
a_wdg_text = self.gui.get_widget('gtk_textview_annotation_text')
a_wdg_link = self.gui.get_widget('gtk_entry_annotation_link')
a_wdg_link_button = self.gui.get_widget('gtk_link_button_annotation_link')
a_wdg_link_type = self.gui.get_widget('gtk_combobox_annotation_link_type')
# ~ a_wdg_cal = self.gui.get_widget('gtk_calendar_annotation_timestamp')
 
269,6 → 281,7
a_wdg_type.set_active_iter(self.gui.get_widget('annotation_type_%s' % annotation['type']))
self.uif.set_textview_text(a_wdg_text, open(ANNOTATION_FILE_CONTENT).read())
a_wdg_link.set_text(annotation['link'])
a_wdg_link_button.set_uri(annotation['link'])
a_wdg_link_type.set_active_iter(self.gui.get_widget('annotation_link_type_%s' % annotation['link_type']))
human_timestamp = self.utils.get_human_date_from_timestamp(annotation['timestamp'])
a_wdg_human_timestamp.set_text(human_timestamp)