diff --git a/src/gui/editors/editnote.py b/src/gui/editors/editnote.py index 249e4effa..6fd091645 100644 --- a/src/gui/editors/editnote.py +++ b/src/gui/editors/editnote.py @@ -263,8 +263,7 @@ class EditNote(EditPrimary): # create a formatting toolbar if not self.dbstate.db.readonly: vbox = self.top.get_object('container') - vbox.pack_start(label=self.texteditor.get_toolbar(), - expand=False, fill=False) + vbox.pack_start(self.texteditor.get_toolbar(), False, False, 0) # setup initial values for textview and textbuffer if self.obj: diff --git a/src/gui/glade/editnote.glade b/src/gui/glade/editnote.glade index d87a437b0..298d2e8a2 100644 --- a/src/gui/glade/editnote.glade +++ b/src/gui/glade/editnote.glade @@ -1,15 +1,81 @@ - - + + False 500 400 dialog - + True + False + vertical + + + True + False + end + + + gtk-cancel + False + True + True + True + True + False + True + + + False + False + 0 + + + + + gtk-ok + False + True + True + True + True + False + True + + + False + False + 1 + + + + + gtk-help + False + True + True + True + True + False + True + + + False + False + 2 + + + + + False + True + end + 0 + + True @@ -17,17 +83,17 @@ True + False True + False 6 6 True True - automatic - automatic True @@ -41,26 +107,35 @@ + True + True end 0 + True + True 0 True + False 6 3 5 6 6 + + + True + False 0 _Type: True @@ -78,12 +153,13 @@ True + False A type to classify the note. True - True - True + True + True @@ -98,6 +174,7 @@ True + False 0 _ID: True @@ -128,6 +205,7 @@ _Preformatted + False True True False @@ -137,7 +215,10 @@ When not checked, notes are automatically cleaned in the reports, which will imp When active the whitespace in your note will be respected in reports. Use this to add formatting layout with spaces, eg a table. When not checked, notes are automatically cleaned in the reports, which will improve the report layout. Use monospace font to keep preformatting. + end + False True + 0.5 True @@ -149,9 +230,11 @@ Use monospace font to keep preformatting. + False True True True + False none @@ -162,6 +245,7 @@ Use monospace font to keep preformatting. True + False gtk-dialog-authentication @@ -182,6 +266,7 @@ Use monospace font to keep preformatting. True + False 0 _Tags: True @@ -197,19 +282,25 @@ Use monospace font to keep preformatting. True + False True + False + True + True 0 + False True True True + False @@ -231,6 +322,7 @@ Use monospace font to keep preformatting. 5 2 3 + @@ -245,9 +337,19 @@ Use monospace font to keep preformatting. + + + + + + + + + False + True 1 @@ -256,6 +358,7 @@ Use monospace font to keep preformatting. True + False <b>Note</b> True @@ -264,64 +367,10 @@ Use monospace font to keep preformatting. - - 1 - - - - - True - end - - - gtk-cancel - True - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - True - True - True - True - True - - - False - False - 1 - - - - - gtk-help - True - True - True - True - True - - - False - False - 2 - - - False - end - 0 + True + 1 diff --git a/src/gui/widgets/undoablestyledbuffer.py b/src/gui/widgets/undoablestyledbuffer.py index fc1cf17e0..f6779c02d 100644 --- a/src/gui/widgets/undoablestyledbuffer.py +++ b/src/gui/widgets/undoablestyledbuffer.py @@ -40,7 +40,7 @@ class UndoableInsertStyled(UndoableInsert): #we obtain the buffer before the text has been inserted UndoableInsert.__init__(self, text_iter, text, length, text_buffer) self.tags = text_buffer.get_text(text_buffer.get_start_iter(), - text_buffer.get_end_iter()).get_tags() + text_buffer.get_end_iter(), True).get_tags() self.tagsafter = None class UndoableDeleteStyled(UndoableDelete): @@ -48,7 +48,7 @@ class UndoableDeleteStyled(UndoableDelete): #we obtain the buffer before the text has been deleted UndoableDelete.__init__(self, text_buffer, start_iter, end_iter) self.tags = text_buffer.get_text(text_buffer.get_start_iter(), - text_buffer.get_end_iter()).get_tags() + text_buffer.get_end_iter(), True).get_tags() class UndoableApplyStyle(): """a style has been applied to our textbuffer""" @@ -57,7 +57,7 @@ class UndoableApplyStyle(): self.mergeable = False self.tags = text_buffer.get_text(text_buffer.get_start_iter(), - text_buffer.get_end_iter()).get_tags() + text_buffer.get_end_iter(), True).get_tags() # self.tags_after = None self.offset_after = None @@ -100,7 +100,7 @@ class UndoableStyledBuffer(StyledTextBuffer): UndoableApplyStyle): return self.undo_stack[-1].set_after(buffer.get_text(buffer.get_start_iter(), - buffer.get_end_iter()).get_tags(), + buffer.get_end_iter(), True).get_tags(), buffer.get_iter_at_mark(buffer.get_insert()).get_offset()) def _undo_insert(self, undo_action): @@ -111,7 +111,7 @@ class UndoableStyledBuffer(StyledTextBuffer): self.delete(start, stop) #the text is correct again, now we create correct styled text s_text = StyledText(Gtk.TextBuffer.get_text(self, - self.get_start_iter(), self.get_end_iter()), undo_action.tags) + self.get_start_iter(), self.get_end_iter(), True), undo_action.tags) self.set_text(s_text) self.place_cursor(self.get_iter_at_offset(undo_action.offset)) @@ -120,7 +120,7 @@ class UndoableStyledBuffer(StyledTextBuffer): self.insert(start, undo_action.text) #the text is correct again, now we create correct styled text s_text = StyledText(Gtk.TextBuffer.get_text(self, - self.get_start_iter(), self.get_end_iter()), undo_action.tags) + self.get_start_iter(), self.get_end_iter(), True), undo_action.tags) self.set_text(s_text) if undo_action.delete_key_used: self.place_cursor(self.get_iter_at_offset(undo_action.start)) @@ -129,7 +129,7 @@ class UndoableStyledBuffer(StyledTextBuffer): def _redo_insert(self, redo_action): s_text = StyledText(Gtk.TextBuffer.get_text(self, - self.get_start_iter(), self.get_end_iter()), redo_action.tags) + self.get_start_iter(), self.get_end_iter(), True), redo_action.tags) self.set_text(s_text) start = self.get_iter_at_offset(redo_action.offset) self.insert(start, redo_action.text) @@ -144,21 +144,21 @@ class UndoableStyledBuffer(StyledTextBuffer): self.delete(start, stop) #the text is correct again, now we create correct styled text #s_text = StyledText(Gtk.TextBuffer.get_text(self, - # self.get_start_iter(), self.get_end_iter()), redo_action.tags) + # self.get_start_iter(), self.get_end_iter(), True), redo_action.tags) #self.set_text(s_text) self.place_cursor(self.get_iter_at_offset(redo_action.start)) def _handle_undo(self, undo_action): """ undo of apply of style """ s_text = StyledText(Gtk.TextBuffer.get_text(self, - self.get_start_iter(), self.get_end_iter()), undo_action.tags) + self.get_start_iter(), self.get_end_iter(), True), undo_action.tags) self.set_text(s_text) self.place_cursor(self.get_iter_at_offset(undo_action.offset)) def _handle_redo(self, redo_action): """ redo of apply of style """ s_text = StyledText(Gtk.TextBuffer.get_text(self, - self.get_start_iter(), self.get_end_iter()), + self.get_start_iter(), self.get_end_iter(), True), redo_action.tags_after) self.set_text(s_text) self.place_cursor(self.get_iter_at_offset(redo_action.offset_after))