[Pidgin] #2642: GntTextView Multiline append goes weird

Pidgin trac at pidgin.im
Mon Aug 20 10:43:36 EDT 2007


#2642: GntTextView Multiline append goes weird
-----------------------------------+----------------------------------------
 Reporter:  aluink                 |       Owner:  sadrul
     Type:  defect                 |      Status:  new   
 Priority:  minor                  |   Milestone:        
Component:  finch (gnt/ncurses)    |     Version:  2.1.0 
 Keywords:  gnttextview multiline  |     Pending:  0     
-----------------------------------+----------------------------------------
 static void[[BR]]
 test()
 [[BR]]
 {[[BR]]
   GntWidget *win;
 [[BR]]
   GntWidget *tv;[[BR]]
   GntWidget *entry;
 [[BR]]
   [[BR]]
   win = gnt_window_box_new(FALSE, TRUE);
 [[BR]]
   tv = gnt_text_view_new();[[BR]]
   gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(tv),
 "line1\nline2\nline3\n", GNT_TEXT_FLAG_NORMAL);[[BR]]
 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(tv),"line4\n\nline5\n\nline6\n\n",
 GNT_TEXT_FLAG_NORMAL);[[BR]]
   gnt_text_view_scroll(GNT_TEXT_VIEW(tv), 10);
 [[BR]]
   gnt_box_add_widget(GNT_BOX(win), tv);[[BR]]
   [[BR]]
   entry = gnt_entry_new("");
 [[BR]]
   gnt_text_view_attach_scroll_widget(GNT_TEXT_VIEW(tv),entry);
 [[BR]]
   gnt_box_add_widget(GNT_BOX(win), entry);[[BR]]
 [[BR]]
 [[BR]]
   gnt_widget_show(win);
 [[BR]]
   [[BR]]
 }
 [[BR]]

 When this executes we get this in the tv (\n don't display, they are there
 for clarity)

 Line1\n
 Line2\n
 Line3\n
 Line4\n
 Line6\n\n

 Changing the two append lines to only the first line shows only "Line1\n"
 Similarly, showing the second line shows only "Line4\n"

-- 
Ticket URL: <http://developer.pidgin.im/ticket/2642>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list