~noskcaj/ubuntu/trusty/gnome-documents/3.10.2

« back to all changes in this revision

Viewing changes to src/mainToolbar.js

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Jeremy Bicha
  • Date: 2013-06-17 22:24:54 UTC
  • mfrom: (3.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20130617222454-biw3dmaqdd9qpbh7
Tags: 3.8.3.1-1
[ Jeremy Bicha ]
* New upstream release
* debian/control.in:
  - Add missing dependency on gir1.2-gnomedesktop-3.0
  - Bump minimum GTK for newer libgd
  - Build-depend on gtk-doc-tools and yelp-tools
  - Build-depend on inkscape and poppler-utils to generate
    getting-started PDF
* debian/rules: --enable-getting-started

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    _init: function() {
41
41
        this._model = null;
 
42
        this._handleEvent = true;
42
43
 
43
44
        this.widget = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
44
45
        this.widget.show();
50
51
        this._searchbar = this.createSearchbar();
51
52
        if (this._searchbar)
52
53
            this.widget.add(this._searchbar.widget);
 
54
 
 
55
        Application.documentManager.connect('load-started', Lang.bind(this,
 
56
            function() {
 
57
                this._handleEvent = true;
 
58
            }));
 
59
 
 
60
        Application.documentManager.connect('load-error', Lang.bind(this, this._onLoadErrorOrPassword));
 
61
    },
 
62
 
 
63
    _onLoadErrorOrPassword: function() {
 
64
        this._handleEvent = false;
53
65
    },
54
66
 
55
67
    handleEvent: function(event) {
 
68
        if (!this._handleEvent)
 
69
            return false;
 
70
 
56
71
        let res = this._searchbar.handleEvent(event);
57
72
        return res;
58
73
    },