diff -u gobby-0.3.0/debian/changelog gobby-0.3.0/debian/changelog --- gobby-0.3.0/debian/changelog +++ gobby-0.3.0/debian/changelog @@ -1,3 +1,12 @@ +gobby (0.3.0-1ubuntu4) dapper; urgency=low + + * Patch to fix glib thread initialization issue, now allowing gobby to + be run with GNOME accessibility enabled. (Closes Malone #49780) + * Patch to fix an issue in the copy and paste code, taken from the + 0.3.1 release. (Closes Malone #47488) + + -- Luke Yelavich Fri, 16 Jun 2006 11:19:33 +1000 + gobby (0.3.0-1ubuntu3) dapper; urgency=low * rebuild to enable zeroconf/howl support (closes malone #39802) only in patch2: unchanged: --- gobby-0.3.0.orig/src/document.cpp +++ gobby-0.3.0/src/document.cpp @@ -481,18 +481,51 @@ unsigned int num_line = begin.get_line(); unsigned int num_col = begin.get_line_index(); + unsigned int to_line = end.get_line(); + // Find author of the text - const obby::line& line = m_doc.get_content().get_line(num_line); + const obby::line* line = + &m_doc.get_content().get_line(num_line); + + const obby::user* author = NULL; - obby::line::author_iterator iter = line.author_begin(); - for(iter; iter != line.author_end(); ++ iter) - if(iter->position > num_col) - break; - --iter; + while(line && line->length() == 0) + { + ++ num_line; + num_col = 0; + + // Only empty lines have been inserted. This means we + // have no owner for those lines since newlines are + // not authored in 0.3. This also means that it is + // irrelevant who wrote the lines. + if(num_line > to_line) + line = NULL; + else + line = &m_doc.get_content().get_line(num_line); + } + + if(line != NULL) + { + obby::line::author_iterator iter = line->author_begin(); + for(iter; iter != line->author_end(); ++ iter) + if(iter->position > num_col) + break; + + if(iter == line->author_begin()) + { + throw std::logic_error( + "Gobby::Document::on_apply_tag_after:\n" + "Trying to find owner of empty line" + ); + } + + --iter; + author = iter->author; + } // Refresh. m_editing = true; - update_user_colour(begin, end, iter->author); + update_user_colour(begin, end, author); m_editing = false; } } only in patch2: unchanged: --- gobby-0.3.0.orig/src/main.cpp +++ gobby-0.3.0/src/main.cpp @@ -40,7 +40,8 @@ Gobby::init_gettext(gobby_package); Gtk::Main kit(argc, argv); - Glib::thread_init(); + if(!Glib::thread_supported()) + Glib::thread_init(); Gobby::IconManager icon_mgr;