~ubuntu-branches/ubuntu/lucid/tomboy/lucid-proposed

« back to all changes in this revision

Viewing changes to Tomboy/Applet.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-28 14:11:49 UTC
  • mfrom: (1.3.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100128141149-snoxliun1ta8x8d2
Tags: 1.1.1-0ubuntu1
* New upstream version
* debian/control.in:
  - build-depends on cdbs to get strip-schema installed
  - updated cli build-depends for the new binary changes
* debian/rules:
  - set gettext domain in the desktop entry and run strip-schema on build

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
 
189
189
                void ButtonPress (object sender, Gtk.ButtonPressEventArgs args)
190
190
                {
 
191
 
191
192
                        Gtk.Widget parent = (Gtk.Widget) sender;
192
193
 
193
194
                        switch (args.Event.Button) {
194
195
                        case 1:
195
 
                                TomboyTrayUtils.UpdateTomboyTrayMenu (tray, parent);
196
 
                                GuiUtils.PopupMenu (tray.TomboyTrayMenu, args.Event);
 
196
                                manager.GtkInvoke (() => {
 
197
                                        TomboyTrayUtils.UpdateTomboyTrayMenu (tray, parent);
 
198
                                        GuiUtils.PopupMenu (tray.TomboyTrayMenu, args.Event);
 
199
                                });
197
200
                                args.RetVal = true;
198
201
                                break;
199
202
                        case 2:
200
203
                                if ((bool) Preferences.Get (Preferences.ENABLE_ICON_PASTE)) {
201
204
                                        // Give some visual feedback
202
205
                                        Gtk.Drag.Highlight (this);
203
 
                                        args.RetVal = PastePrimaryClipboard ();
 
206
                                        manager.GtkInvoke (() => {
 
207
                                                args.RetVal = PastePrimaryClipboard ();
 
208
                                        });
204
209
                                        Gtk.Drag.Unhighlight (this);
205
210
                                }
206
211
                                break;
276
281
 
277
282
                public void ShowMenu (bool select_first_item)
278
283
                {
279
 
                        TomboyTrayUtils.UpdateTomboyTrayMenu (tray, this);
280
 
                        if (select_first_item)
281
 
                                tray.TomboyTrayMenu.SelectFirst (false);
 
284
                        manager.GtkInvoke (() => {
 
285
                                TomboyTrayUtils.UpdateTomboyTrayMenu (tray, this);
 
286
                                if (select_first_item)
 
287
                                        tray.TomboyTrayMenu.SelectFirst (false);
282
288
 
283
 
                        GuiUtils.PopupMenu (tray.TomboyTrayMenu, null);
 
289
                                GuiUtils.PopupMenu (tray.TomboyTrayMenu, null);
 
290
                        });
284
291
                }
285
292
 
286
293
                // Support dropping text/uri-lists and _NETSCAPE_URLs currently.
329
336
                                more_than_one = true;
330
337
                        }
331
338
 
332
 
                        Note link_note = manager.FindByUri (NoteManager.StartNoteUri);
333
 
                        if (link_note != null) {
334
 
                                link_note.Window.Present ();
335
 
                                PrependTimestampedText (link_note,
336
 
                                                        DateTime.Now,
337
 
                                                        insert_text.ToString ());
338
 
                        }
 
339
                        manager.GtkInvoke (() => {
 
340
                                Note link_note = manager.FindByUri (NoteManager.StartNoteUri);
 
341
                                if (link_note != null) {
 
342
                                        link_note.Window.Present ();
 
343
                                        PrependTimestampedText (link_note,
 
344
                                                                DateTime.Now,
 
345
                                                                insert_text.ToString ());
 
346
                                }
 
347
                        });
339
348
                }
340
349
 
341
350
                void InitPixbuf ()