~ubuntu-branches/debian/sid/gnote/sid

« back to all changes in this revision

Viewing changes to src/gnote.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Cheng
  • Date: 2011-07-30 16:48:32 UTC
  • mfrom: (1.3.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110730164832-u2xq6ywe0aduil1r
Tags: 0.7.5-1
* New upstream release.
* Remove "Provides: tomboy" from debian/control. (Closes: #627347)
* Update debian/rules to dh 7 "rules.tiny" style.
  - Drop cdbs from build dependencies.
* Really update Standards version from 3.9.1 to 3.9.2, no updates required.
* Update debhelper compatiblity level from 7 to 8.
* Add Vcs-* fields to debian/control.
* Update debian/copyright to fully conform with DEP-5.
* Remove unneeded debian/fdl-1.2.txt; a copy of the GFDL can be found in
  /usr/share/common-licenses/GFDL-1.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
namespace gnote {
66
66
 
67
 
  bool Gnote::s_tray_icon_showing = false;
68
 
 
69
67
  Gnote::Gnote()
70
68
    : m_manager(NULL)
71
69
    , m_keybinder(NULL)
123
121
 
124
122
    if(m_is_panel_applet) {
125
123
      DBG_OUT("starting applet");
126
 
      s_tray_icon_showing = true;
127
124
 
128
125
      am["CloseWindowAction"]->set_visible(true);
129
126
      am["QuitGNoteAction"]->set_visible(false);
179
176
 
180
177
    // Give the TrayIcon 2 seconds to appear.  If it
181
178
    // doesn't by then, open the SearchAllNotes window.
182
 
    s_tray_icon_showing = m_tray_icon->is_embedded() 
 
179
    bool is_tray_icon_showing = m_tray_icon->is_embedded()
183
180
      && m_tray_icon->get_visible();
184
181
      
185
 
    if (!s_tray_icon_showing) {
 
182
    if (!is_tray_icon_showing) {
186
183
      Glib::RefPtr<Glib::TimeoutSource> timeout 
187
184
        = Glib::TimeoutSource::create(2000);
188
185
      timeout->connect(sigc::mem_fun(*this, &Gnote::check_tray_icon_showing));
195
192
 
196
193
  bool Gnote::check_tray_icon_showing()
197
194
  {
198
 
    s_tray_icon_showing = m_tray_icon->is_embedded() 
 
195
    bool is_tray_icon_showing = m_tray_icon->is_embedded()
199
196
      && m_tray_icon->get_visible();
200
 
    if(!s_tray_icon_showing) {
 
197
    if(!is_tray_icon_showing) {
201
198
      ActionManager & am(ActionManager::obj());
202
199
      am["ShowSearchAllNotesAction"]->activate();
203
200
    }
361
358
    about.set_documenters(documenters);
362
359
    about.set_translator_credits(translators);
363
360
//      about.set_icon_name("gnote");
 
361
    NoteRecentChanges *recent_changes = NoteRecentChanges::get_instance();
 
362
    if(recent_changes && recent_changes->get_visible()) {
 
363
      about.set_transient_for(*recent_changes);
 
364
      recent_changes->present();
 
365
    }
364
366
    about.run();
365
367
  }
366
368