Changeset cb212b45f847c9f00759669c1ffe40b1e0c84569


Ignore:
Timestamp:
29/07/10 13:32:48 (3 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
ec0dd25d9243161fa02613630304e3d9c3a86de5
Parents:
b65029823727e85f9d8ee1d3d382fc8379a2ac79
git-committer:
Matias De la Puente <mfpuente.ar@…> (29/07/10 13:32:48)
Message:

Documents: Add go_to_line method and grab focus when openning a document

Location:
libi4uc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libi4uc/i4ucdocumentpageview.vala

    r8d57f47 rcb212b4  
    358358        } 
    359359         
     360        public void go_to_line (int line) 
     361        { 
     362                TextIter iter; 
     363                 
     364                if (line >= _source_buffer.get_line_count ()) 
     365                        _source_buffer.get_end_iter (out iter); 
     366                else 
     367                        _source_buffer.get_iter_at_line (out iter, line-1); 
     368                 
     369                _source_buffer.place_cursor (iter); 
     370        } 
     371         
    360372        private void create_error_bar () 
    361373        { 
  • libi4uc/i4ucdocumentpageviewiface.vala

    r8d57f47 rcb212b4  
    8383        public abstract void grab_focus (); 
    8484        public abstract void add_recent (string uri); 
     85        public abstract void go_to_line (int line); 
    8586} 
  • libi4uc/i4ucdocumentspresenter.vala

    r8d57f47 rcb212b4  
    7979                } 
    8080                _view.pages_panel.show_page (page_presenter.view); 
     81                page_presenter.view.grab_focus (); 
    8182        } 
    8283         
Note: See TracChangeset for help on using the changeset viewer.