Changeset 29715c255541ab3aa8d8f67699d73b3d998e4f3d
- Timestamp:
- 01/06/07 23:39:05 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- 51c5ddfd7bdcfb903514afe7b9a3d69c1092c508
- Children:
- 8343ef5b25d88a8435bcc3c904c1653f928f3950
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:39:05Z+0000
- Message:
-
[project @ Enable highlighting when subscribed]
Original author: Armin Burgmeier <armin@…>
Date: 2005-06-14 16:26:27+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
ree9a068
|
r29715c2
|
|
| 62 | 62 | buf->set_language(language); |
| 63 | 63 | } |
| 64 | | |
| 65 | | // Do not highlight anything until the user subscribed |
| 66 | | buf->set_highlight(false); |
| 67 | 64 | #endif |
| 68 | 65 | |
| … |
… |
|
| 343 | 340 | // Get document we subscribed to |
| 344 | 341 | obby::local_document& doc = *m_doc.get_document(); |
| | 342 | #ifdef WITH_GTKSOURCEVIEW |
| | 343 | Glib::RefPtr<Gtk::SourceBuffer> buf = get_buffer(); |
| | 344 | #else |
| 345 | 345 | Glib::RefPtr<Gtk::TextBuffer> buf = get_buffer(); |
| | 346 | #endif |
| 346 | 347 | |
| 347 | 348 | // Install singal handlers |
| … |
… |
|
| 362 | 363 | set_editable(true); |
| 363 | 364 | set_wrap_mode(Gtk::WRAP_NONE); |
| | 365 | |
| | 366 | // Enable highlighting |
| | 367 | buf->set_highlight(true); |
| 364 | 368 | |
| 365 | 369 | // TODO: Do this in an idle handler? *kA* |
| … |
… |
|
| 588 | 592 | void Gobby::Document::set_intro_text() |
| 589 | 593 | { |
| 590 | | get_buffer()->set_text(_( |
| | 594 | #ifdef WITH_GTKSOURCEVIEW |
| | 595 | Glib::RefPtr<Gtk::SourceBuffer> buf = get_buffer(); |
| | 596 | #else |
| | 597 | Glib::RefPtr<Gtk::TextBuffer> buf = get_buffer(); |
| | 598 | #endif |
| | 599 | |
| | 600 | buf->set_text(_( |
| 591 | 601 | "You are not subscribed to the document \"") + |
| 592 | 602 | m_doc.get_title() + _("\".\n\nTo view changes that " |
| … |
… |
|
| 597 | 607 | |
| 598 | 608 | Glib::RefPtr<Gtk::TextChildAnchor> anchor = |
| 599 | | get_buffer()->create_child_anchor(get_buffer()->end() ); |
| | 609 | buf->create_child_anchor(buf->end() ); |
| 600 | 610 | |
| 601 | 611 | // Activate the subscribe button, if it isn't |
| 602 | 612 | m_btn_subscribe.set_sensitive(true); |
| 603 | 613 | |
| | 614 | // Add the button to the anchor |
| 604 | 615 | add_child_at_anchor(m_btn_subscribe, anchor); |
| 605 | 616 | |
| … |
… |
|
| 608 | 619 | set_editable(false); |
| 609 | 620 | set_wrap_mode(Gtk::WRAP_WORD_CHAR); |
| | 621 | |
| | 622 | // Do not highlight anything until the user subscribed |
| | 623 | buf->set_highlight(false); |
| 610 | 624 | } |
| 611 | 625 | |