Changeset 83c8dff04a6f233caea7d1c27f9cca83c6150574

Show
Ignore:
Timestamp:
01/06/07 23:48:18 (6 years ago)
Author:
Philipp Kern <phil@…>
Parents:
41c1d8c0ed98f7095dee17fa1883342103b525fb
Children:
c4c59451bdaf2ad064fc5e5e6800ca4e1d0f6bee
git-committer:
Philipp Kern <phil@0x539.de> / 2007-01-06T22:48:18Z+0000
Message:

[project @ Removed pending changes and revision from the status bar]

Original author: Philipp Kern <phil@…>
Date: 2005-09-15 20:19:56+00:00

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • inc/statusbar.hpp

    r4a2cffc r83c8dff  
    3939 
    4040        void update_language(Document& document); 
    41         void update_sync(Document& document); 
    42         void update_revision(Document& document); 
    4341        void update_cursor(Document& document); 
    4442 
     
    5654        Gtk::HBox m_box; 
    5755        Gtk::Label m_language; 
    58         Gtk::Label m_sync; 
    59         Gtk::Label m_revision; 
    6056        Gtk::Label m_position; 
    6157}; 
  • src/statusbar.cpp

    r4a2cffc r83c8dff  
    2727 : Frame(),  
    2828   m_language("", Gtk::ALIGN_LEFT), 
    29    m_sync("", Gtk::ALIGN_LEFT), 
    30    m_revision("", Gtk::ALIGN_LEFT), 
    3129   m_position("", Gtk::ALIGN_LEFT) 
    3230{ 
    3331        m_box.pack_start(m_language, Gtk::PACK_SHRINK); 
    34         m_box.pack_start(*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); 
    35         m_box.pack_start(m_sync, Gtk::PACK_SHRINK); 
    36         m_box.pack_start(*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); 
    37         m_box.pack_start(m_revision, Gtk::PACK_SHRINK); 
    3832        m_box.pack_end(m_position, Gtk::PACK_SHRINK, 2); 
    3933        m_box.set_spacing(5); 
     
    4438        folder.document_cursor_moved_event().connect( 
    4539                sigc::mem_fun(*this, &StatusBar::update_cursor) ); 
    46         folder.document_content_changed_event().connect( 
    47                 sigc::mem_fun(*this, &StatusBar::update_sync) ); 
    48         folder.document_content_changed_event().connect( 
    49                 sigc::mem_fun(*this, &StatusBar::update_revision) ); 
    5040        folder.document_language_changed_event().connect( 
    5141                sigc::mem_fun(*this, &StatusBar::update_language) ); 
     
    7363} 
    7464 
    75 void Gobby::StatusBar::update_sync(Document& document) 
    76 { 
    77         unsigned int n = document.get_unsynced_changes_count(); 
    78         obby::format_string str( 
    79                 ngettext("%0% pending change", "%0% pending changes", n) ); 
    80         str << n; 
    81         m_sync.set_text(str.str() ); 
    82 } 
    83  
    84 void Gobby::StatusBar::update_revision(Document& document) 
    85 { 
    86         obby::format_string str(_("Revision: %0%") ); 
    87         str << document.get_revision(); 
    88         m_revision.set_text(str.str() ); 
    89 } 
    90  
    9165void Gobby::StatusBar::update_cursor(Document& document) 
    9266{ 
     
    10276{ 
    10377        update_language(document); 
    104         update_sync(document); 
    105         update_revision(document); 
    10678        update_cursor(document); 
    10779} 
     
    11486{ 
    11587        m_language.set_text(""); 
    116         m_sync.set_text(""); 
    117         m_revision.set_text(""); 
    11888        m_position.set_text(""); 
    11989}