Merge lp:~goehle/evolution-indicator/dont-quit-on-close into lp:evolution-indicator

Proposed by Geoff Goehle
Status: Needs review
Proposed branch: lp:~goehle/evolution-indicator/dont-quit-on-close
Merge into: lp:evolution-indicator
Diff against target: 1131 lines (+975/-24) (has conflicts)
5 files modified
ChangeLog (+628/-0)
autogen.sh (+0/-11)
configure.ac (+6/-1)
data/evolution-indicator.schemas.in (+33/-0)
src/evolution-indicator.c (+308/-12)
Text conflict in configure.ac
Text conflict in src/evolution-indicator.c
To merge this branch: bzr merge lp:~goehle/evolution-indicator/dont-quit-on-close
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+42151@code.launchpad.net

Description of the change

A fix of the last merge, which was bungled.

I've included functionality which allows the indicator-applet to have evolution run in the background with no open windows.

Using g_signal when the last open shell window is closed the indicator applet hides the window instead of deleting it. This gives the impression that evolution is "running in the applet".

I also implemented the ability to turn this feature on and off and to run evolution on startup.

To post a comment you must log in.
Revision history for this message
Geoff Goehle (goehle) wrote :

Still getting used to merging and bzr. Some of these changes are not intended.... The bulk should be there but lines 70-120, 190-162, 380-414, 488-565 should removed.

74. By Geoff Goehle

Fixed unintended changes and added a missing file

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks a lot for your work there, you should have a look at the ayatana discussions that took place during latest UDS, particularly this spec and the video associated. You can find the reference there:
https://lists.launchpad.net/ayatana/msg04650.html

So, even if I was convinced that the "don't quit on close" and seeing email as a service was the right stuff to do, I'm not anymore and let you raise the point on the ayatana mailing list (maybe a follow up on that email?) and asking Matthew to restate those points.

Revision history for this message
Geoff Goehle (goehle) wrote :

I can't say that I really understand the discussion, but then again I'm
a mathematician and not a coder. The distinction between "service" vs
"nonservice" appliations is lost on me...

In any case, the whole thing is kind of moot since ubuntu is moving to
unity.

On Mon, 2011-02-07 at 15:54 +0000, Didier Roche wrote:
> Thanks a lot for your work there, you should have a look at the ayatana discussions that took place during latest UDS, particularly this spec and the video associated. You can find the reference there:
> https://lists.launchpad.net/ayatana/msg04650.html
>
> So, even if I was convinced that the "don't quit on close" and seeing email as a service was the right stuff to do, I'm not anymore and let you raise the point on the ayatana mailing list (maybe a follow up on that email?) and asking Matthew to restate those points.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

> In any case, the whole thing is kind of moot since ubuntu is moving to
unity.

Why do you say that? the indicator are completely part of the unity experience, so this work is primordial.

Revision history for this message
Geoff Goehle (goehle) wrote :

I haven't used unity regularly, but from what I remember unity has the "mac" style program launchers. If there is an evolution icon on the launcher bar and evolution is minimized then there isn't a visible "window". All that changes is the icon on the launcher bar picks up a little triangle underneath, as opposed to gnome where the window stays on the task bar. So it unity you can effectively replicate the minimize to applet functionality by using the minimize button.

Still it doesn't address the fact that clicking "close" closes evolution, and it doesn't close any other Indicator Applet applications, which is a point of confusion.

75. By Geoff Goehle

Updated previous patch to work with new version of evolution indicator.
When the option is enabled the indicator will allow evolution to run
without a visible window.

76. By Geoff Goehle

Fixed unintended changes

Revision history for this message
Geoff Goehle (goehle) wrote :

Well I've been using unity since release and changed my mind about the need for "dont-quit-on-close" functionality being obsolete.

1. Space on the sidebar is at a premium. The icons are large enough that having the evolution icon there all the time adds clutter.

2. There are now 5 programs that make use of the indicator area (evolution, banshee, empathy, gwibber, and ubuntu-one). Of these evolution is the only one that doesn't run without an open window.

I updated my patch for the new version.

Unmerged revisions

76. By Geoff Goehle

Fixed unintended changes

75. By Geoff Goehle

Updated previous patch to work with new version of evolution indicator.
When the option is enabled the indicator will allow evolution to run
without a visible window.

74. By Geoff Goehle

Fixed unintended changes and added a missing file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2009-02-03 13:43:52 +0000
3+++ ChangeLog 2011-05-09 14:58:08 +0000
4@@ -1,1 +1,629 @@
5+# Generated by Makefile. Do not edit.
6+
7+2011-01-14 Ted Gould <ted@gould.cx>
8+
9+ 0.2.14
10+
11+2011-01-14 Ted Gould <ted@gould.cx>
12+
13+ Updating to new libindicate
14+
15+2011-01-14 Ken VanDine <ken.vandine@canonical.com>
16+
17+ Change pkgconfig check for indicate to indicate-0.5 and require 0.4.91
18+
19+2010-11-23 Didier Roche <didier.roche@canonical.com>
20+
21+ build with new evolution
22+
23+2010-11-23 Didier Roche <didier.roche@canonical.com>
24+
25+ new upstream release
26+
27+2010-10-14 Didier Roche <didier.roche@canonical.com>
28+
29+ remove workaround as e-d-s get it right now
30+
31+2010-10-13 Didier Roche <didier.roche@canonical.com>
32+
33+ workaround for local Inbox as not tagged as an Inbox for evolution
34+
35+2010-10-13 Didier Roche <didier.roche@canonical.com>
36+
37+ better debug messages
38+
39+2010-10-13 Didier Roche <didier.roche@canonical.com>
40+
41+ prefer a debug to print
42+
43+2010-10-13 Didier Roche <didier.roche@canonical.com>
44+
45+ correct gdk_display transtype
46+
47+2010-10-12 Didier Roche <didier.roche@canonical.com>
48+
49+ add some flags for deprecation
50+
51+2010-10-07 Didier Roche <didier.roche@canonical.com>
52+
53+ build with gtk deprecation flags (LP: #655937)
54+
55+2010-06-22 Didier Roche <didier.roche@canonical.com>
56+
57+ bump version for release
58+
59+2010-06-22 Didier Roche <didier.roche@canonical.com>
60+
61+ merge evo 2.30 branch
62+
63+2010-03-31 Francesco Marella <francesco.marella@gmail.com>
64+
65+ merge master branch
66+
67+2010-03-08 Francesco Marella <francesco.marella@gmail.com>
68+
69+ Merge with master branch
70+
71+2010-03-02 Francesco Marella <francesco.marella@gmail.com>
72+
73+ Remove hook for event "started.done"
74+
75+2010-03-01 Francesco Marella <francesco.marella@gmail.com>
76+
77+ Fix evolution-indicator to work with Evolution 2.30
78+
79+ Changes:
80+ - rip off e-shell.h, tomboy copy-paste code
81+ - properly get the shell and the shell window (mail-notification plugin inspired me :))
82+ - present the shell window with event time provided by libindicate
83+
84+2010-03-30 Ted Gould <ted@gould.cx>
85+
86+ 0.2.8
87+
88+2010-03-30 Ted Gould <ted@gould.cx>
89+
90+ Use property syntax for ngettext
91+
92+2010-03-29 Ted Gould <ted@gould.cx>
93+
94+ Bug number
95+
96+2010-03-29 Ted Gould <ted@gould.cx>
97+
98+ Remove extra _() markers that are messing up translation.
99+
100+2010-03-04 Ted Gould <ted@gould.cx>
101+
102+ 0.2.7
103+
104+2010-03-04 Ted Gould <ted@gould.cx>
105+
106+ Command items for running evolution.
107+
108+2010-03-03 Ted Gould <ted@gould.cx>
109+
110+ Adding some command menu items.
111+
112+2010-03-03 Ted Gould <ted@gould.cx>
113+
114+ Need newest libindicate
115+
116+2010-03-04 Ted Gould <ted@gould.cx>
117+
118+ Updating to signals from new libindicate and using the timestamps.
119+
120+2010-03-03 Ted Gould <ted@gould.cx>
121+
122+ Bumping up indicate required version to 0.3.0 to get the new signals.
123+
124+2010-03-03 Ted Gould <ted@gould.cx>
125+
126+ Excising the tomboy present code.
127+
128+2010-03-03 Ted Gould <ted@gould.cx>
129+
130+ Getting the timestamp out of the display signal and switching to present_with_time
131+
132+2010-01-21 Neil Jagdish Patel <neil.patel@canonical.com>
133+
134+ [release] 0.2.6
135+
136+2009-12-21 Ken VanDine <ken.vandine@canonical.com>
137+
138+ The Evolution Desktop file has moved.
139+
140+2009-12-17 Ken VanDine <ken.vandine@canonical.com>
141+
142+ Fixed path to evolution desktop file
143+
144+2009-11-19 Neil Jagdish Patel <neil.patel@canonical.com>
145+
146+ Fix 436755 (indicator-applet doesn't change icon when I recieve new e-mails via Evolution)
147+
148+ Basically add support for a default Inbox for POP3
149+
150+ modified:
151+ po/Makefile.in.in
152+ src/evolution-indicator.c
153+
154+2009-11-19 Neil Jagdish Patel <neil.patel@canonical.com>
155+
156+ modified:
157+ src/evolution-indicator.c
158+ - A line went missing :(
159+
160+2009-11-19 Neil Jagdish Patel <neil.patel@canonical.com>
161+
162+ modified:
163+ src/evolution-indicator.c
164+ - Some stability fixes
165+
166+2009-11-19 Neil Jagdish Patel <neil.patel@canonical.com>
167+
168+ modified:
169+ po/Makefile.in.in
170+ src/evolution-indicator.c
171+ - Add support POP accounts (default Inbox)
172+ - Make sure we can translate it without requiring new strings
173+
174+2009-09-17 Neil Jagdish Patel <neil.patel@canonical.com>
175+
176+ modified:
177+ configure.ac
178+ - New release 0.2.4
179+
180+2009-09-17 Neil Jagdish Patel <neil.patel@canonical.com>
181+
182+ modified:
183+ src/evolution-indicator.c
184+ pending merges:
185+ Neil Jagdish Patel 2009-09-16 modified:
186+ Neil Jagdish Patel 2009-09-16 modified:
187+ Neil Jagdish Patel 2009-09-16 modified:
188+
189+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
190+
191+ modified:
192+ src/evolution-indicator.c
193+ - Create directory before writing to it as per teds comments
194+
195+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
196+
197+ modified:
198+ src/evolution-indicator.c
199+ - Be more strict in hiding the server is show_messages is disabled
200+
201+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
202+
203+ modified:
204+ src/evolution-indicator.c
205+ - Add support to writing/deleting the blacklist file
206+ - Show/hide the evolution entry in the menu depending on the user checking
207+ /unchecking the "show in panel" box and/or enabling/disabling the
208+ plugin
209+
210+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
211+
212+ modified:
213+ src/evolution-indicator.c
214+ pending merges:
215+ Neil Jagdish Patel 2009-09-16 modified:
216+ Neil Jagdish Patel 2009-09-16 modified:
217+ Neil Jagdish Patel 2009-09-16 modified:
218+ Neil Jagdish Patel 2009-09-16 modified:
219+
220+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
221+
222+ modified:
223+ src/evolution-indicator.c
224+ - Don't show accounts that can't receive mail, and therefore will never have
225+ an unread message count
226+
227+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
228+
229+ modified:
230+ src/evolution-indicator.c
231+ - Instead of destroying the indicator of an inactive account, hide it
232+
233+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
234+
235+ modified:
236+ src/evolution-indicator.c
237+ - Woops, forgot to increment i in while loop
238+
239+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
240+
241+ modified:
242+ src/evolution-indicator.c
243+ - Ignore accounts where enabled==false in gconf
244+
245+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
246+
247+ modified:
248+ src/evolution-indicator.c
249+ pending merges:
250+ Neil Jagdish Patel 2009-09-16 modified:
251+
252+2009-09-16 Neil Jagdish Patel <neil.patel@canonical.com>
253+
254+ modified:
255+ src/evolution-indicator.c
256+ - Zero the global message count when we zero the indicator counts
257+
258+2009-09-10 Neil Jagdish Patel <neil.patel@canonical.com>
259+
260+ modified:
261+ configure.ac
262+ - New release
263+
264+2009-09-10 Neil Jagdish Patel <neil.patel@canonical.com>
265+
266+ modified:
267+ src/evolution-indicator.c
268+ - Woops, typo
269+
270+2009-09-10 Neil Jagdish Patel <neil.patel@canonical.com>
271+
272+ modified:
273+ src/evolution-indicator.c
274+ - Update the names to be lowercase
275+
276+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
277+
278+ modified:
279+ configure.ac
280+ - Bump required version of libindicate to 0.2.0
281+
282+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
283+
284+ modified:
285+ configure.ac
286+ - Release 0.2.0 for libindicate-0.2
287+
288+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
289+
290+ removed:
291+ src/mail-server.c
292+ src/mail-server.h
293+ modified:
294+ .bzrignore
295+ Makefile.am
296+ configure.ac
297+ src/Makefile.am
298+ src/evolution-indicator.c
299+ pending merges:
300+ Neil Jagdish Patel 2009-09-09 modified:
301+ Neil Jagdish Patel 2009-09-09 modified:
302+ Neil Jagdish Patel 2009-09-09 modified:
303+ Neil Jagdish Patel 2009-09-09 modified:
304+ Neil Jagdish Patel 2009-09-09 modified:
305+ Neil Jagdish Patel 2009-09-09 modified:
306+ Neil Jagdish Patel 2009-09-09 modified:
307+ Neil Jagdish Patel 2009-09-09 modified:
308+ Neil Jagdish Patel 2009-09-09 modified:
309+ Neil Jagdish Patel 2009-09-09 Update ignores
310+ Neil Jagdish Patel 2009-09-09 removed:
311+
312+ - Merged branch that added support for the new libindicate (0.2) and
313+ added support for multiple-mailboxes
314+
315+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
316+
317+ modified:
318+ Makefile.am
319+ - Add support for generating ChangeLog on make dist
320+
321+ src/evolution-indicator.c
322+ Make Ted's suggested changes (thanks!)
323+ - Move "unread" string into #define
324+ - Use g_strdup_printf instead of pre-alloc'ed buf & g_sprintf
325+ - Initialise GTimeVal struct to NULL properly
326+
327+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
328+
329+ modified:
330+ src/evolution-indicator.c
331+ - Fix warning
332+
333+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
334+
335+ modified:
336+ src/evolution-indicator.c
337+ - Add some support for showing the evolution window
338+
339+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
340+
341+ modified:
342+ src/evolution-indicator.c
343+ - Clean up read-notify a bit
344+
345+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
346+
347+ modified:
348+ src/evolution-indicator.c
349+ - Reset count and don't look for attention when the mail is 'read' as
350+ defined by evolution :)
351+
352+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
353+
354+ modified:
355+ src/evolution-indicator.c
356+ - Stray '-' screwed up processing of new mail
357+
358+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
359+
360+ modified:
361+ src/evolution-indicator.c
362+ - Added a debug statement
363+
364+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
365+
366+ modified:
367+ src/evolution-indicator.c
368+ - Add some support for indicating new messages
369+
370+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
371+
372+ modified:
373+ src/evolution-indicator.c
374+ - Try updating with multiples of minutes
375+
376+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
377+
378+ Update ignores
379+
380+2009-09-09 Neil Jagdish Patel <neil.patel@canonical.com>
381+
382+ removed:
383+ src/mail-server.c
384+ src/mail-server.h
385+ - Not needed anymore
386+
387+ modified:
388+ configure.ac
389+ - Bump version
390+
391+ src/Makefile.am
392+ - Remove mail-server.*
393+
394+ src/evolution-indicator.c
395+ - Use libindicate directly, creating indicator per account
396+
397+2009-09-08 Neil Jagdish Patel <neil.patel@canonical.com>
398+
399+ modified:
400+ po/Makefile.in.in
401+ src/evolution-indicator.c
402+ pending merges:
403+ Neil Jagdish Patel 2009-09-08 modified:
404+ Neil Jagdish Patel 2009-09-08 modified:
405+ Neil Jagdish Patel 2009-09-08 modified:
406+ Neil Jagdish Patel 2009-08-25 modified:
407+
408+ - Move the preferences group to the top of the tab
409+ - Add support for changing the strings used depending on the number of
410+ configured accounts
411+
412+2009-09-08 Neil Jagdish Patel <neil.patel@canonical.com>
413+
414+ modified:
415+ src/evolution-indicator.c
416+ - Capitalise 'any' in 'Any Inbox', so it matches with the rest of the
417+ sentence, and the 'Any Folder' option.
418+
419+2009-09-08 Neil Jagdish Patel <neil.patel@canonical.com>
420+
421+ modified:
422+ src/evolution-indicator.c
423+ - Depending on the number of accounts, change the text shown in
424+ the combo (Inbox vs. any Inbox)
425+
426+2009-09-08 Neil Jagdish Patel <neil.patel@canonical.com>
427+
428+ modified:
429+ po/Makefile.in.in
430+ src/evolution-indicator.c
431+ - Add some support to get the number of accounts
432+
433+2009-08-25 Neil Jagdish Patel <neil.patel@canonical.com>
434+
435+ modified:
436+ src/evolution-indicator.c
437+ - Move the preferences to the top of the pane
438+
439+2009-08-04 Ted Gould <ted@canonical.com>
440+
441+ Releasing version 0.1.16
442+
443+2009-08-04 Ted Gould <ted@canonical.com>
444+
445+ Cleaning up some more
446+
447+2009-08-03 Ted Gould <ted@canonical.com>
448+
449+ Ken Vandine's patch to include gtk-html-editor as it's needed for the new Evolution
450+
451+2009-07-30 Ken VanDine <ken.vandine@canonical.com>
452+
453+ Added gtkhtml-editor to PKG_CHECK_MODULES, some evolution headers have changed so now we need to find the include path for it.
454+
455+2009-04-23 Ted Gould <ted@canonical.com>
456+
457+ Making a 15 -- brown paper bag release.
458+
459+2009-04-22 Ted Gould <ted@canonical.com>
460+
461+ Changing the truthiness of the string comparison
462+
463+2009-04-21 Ted Gould <ted@canonical.com>
464+
465+ Making 14
466+
467+2009-04-21 Ted Gould <ted@canonical.com>
468+
469+ Use 'g_strcmp0' instead of 'g_str_equal' to protect against the NULL string from '_wnck_get_wmclass'
470+
471+2009-04-08 Ted Gould <ted@canonical.com>
472+
473+ Now we're 13.
474+
475+2009-04-07 Ted Gould <ted@canonical.com>
476+
477+ Adding the LP bug.
478+
479+2009-04-07 Ted Gould <ted@canonical.com>
480+
481+ Switch to using the library version of the GLib Internationalization code.
482+
483+2009-04-07 Ted Gould <ted@canonical.com>
484+
485+ These seem to change the domain for all of Evolution, which really isn't a good idea.
486+
487+2009-04-06 Ted Gould <ted@canonical.com>
488+
489+ Wow, growing up to 12 already.
490+
491+2009-04-06 Ted Gould <ted@canonical.com>
492+
493+ Patch to fix i18n issues in sending notifications. Patch from Timo Jyrinki.
494+
495+2009-04-03 Ted Gould <ted@canonical.com>
496+
497+ Ah, forgot to add files
498+
499+2009-04-03 Ted Gould <ted@canonical.com>
500+
501+ Patch from the great Neil Patel to make it so that we use X.org to determine if the current window is Evolution.
502+
503+2009-04-03 Ted Gould <ted@canonical.com>
504+
505+ Hmm, not sure why this change, but seems benign
506+
507+2009-03-18 Ted Gould <ted@canonical.com>
508+
509+ Bumping version number
510+
511+2009-03-18 Ted Gould <ted@canonical.com>
512+
513+ Patch from Neil which makes it so that Evo doesn't send notificaitons when focused
514+
515+2009-03-15 Ted Gould <ted@canonical.com>
516+
517+ Adding a configure option to override the install directory so that we can pass distcheck
518+
519+2009-03-15 Ted Gould <ted@canonical.com>
520+
521+ Incrementing version number
522+
523+2009-03-15 Ted Gould <ted@canonical.com>
524+
525+ Make it so that the IDs are always unique, even if they're not used heavily. This fixes some warnings on the listeners.
526+
527+2009-03-09 Ted Gould <ted@canonical.com>
528+
529+ Changing the icon name. Match from Mirco Muller.
530+
531+2009-02-16 Ted Gould <ted@canonical.com>
532+
533+ 0.1.9
534+
535+2009-02-16 Ted Gould <ted@canonical.com>
536+
537+ Some slight changes for distcheck to be happy.
538+
539+2009-02-16 Ted Gould <ted@canonical.com>
540+
541+ Leaving the packaging for the packaging branch
542+
543+2009-02-16 Ted Gould <ted@canonical.com>
544+
545+ releasing version 0.1.8+ppa1
546+
547+2009-02-15 Ted Gould <ted@canonical.com>
548+
549+ releasing version 0.1.8
550+
551+2009-02-15 Ted Gould <ted@canonical.com>
552+
553+ Setting the destkop file and the type for the indicator
554+ server subclass.
555+
556+2009-02-15 Ted Gould <ted@canonical.com>
557+
558+ releasing version 0.1.7+ppa2
559+
560+2009-02-15 Ted Gould <ted@canonical.com>
561+
562+ releasing version 0.1.7+ppa1
563+
564+2009-02-09 Neil Jagdish Patel <neil.patel@canonical.com>
565+
566+ -Redo the way message count is stored and signalled to the server
567+ -Send indicator-added indicator-removed for every individual email
568+ -Allow the user to disable the indicator aspect of the notifications
569+
570+2009-02-05 Neil Jagdish Patel <neil.patel@canonical.com>
571+
572+ releasing version 0.1.7
573+
574+2009-02-05 Neil Jagdish Patel <neil.patel@canonical.com>
575+
576+ * Added support for
577+ - Only Inbox/All Folders notification
578+ - Showing notification bubbles, updating them
579+ - Playing sounds through the bubble
580+
581+2009-02-05 Neil Jagdish Patel <neil.patel@canonical.com>
582+
583+ Update ignores
584+
585+2009-02-05 Neil Jagdish Patel <neil.patel@canonical.com>
586+
587+ * Hook up the preferences to gconf, install schemas and keep up-to-date
588+ * Added support for showing the preferences in the general tab of mail
589+ preferences
590+
591+2009-02-04 Neil Jagdish Patel <neil.patel@canonical.com>
592+
593+ Add support for GConf and i18n support
594+
595+2009-02-04 Neil Jagdish Patel <neil.patel@canonical.com>
596+
597+ Initial support for preferences (layout)
598+
599+2009-02-04 Neil Jagdish Patel <neil.patel@canonical.com>
600+
601+ evolution-indicator (0.1.3) intrepid; urgency=low
602+
603+ * Reset indicator count when the user requests the showing of the window.
604+
605+ -- Neil J. Patel <neil.patel@canonical.com> Wed, 04 Feb 2009 11:53:04 +0100
606+
607+2009-02-04 Neil Jagdish Patel <neil.patel@canonical.com>
608+
609+ add the e-shell.h header
610+
611+2009-02-04 Neil Jagdish Patel <neil.patel@canonical.com>
612+
613+ evolution-indicator (0.1.2) intrepid; urgency=low
614+
615+ * Add support for ShowIndicatorToUser, by presenting the current Evolution
616+ "Mail" window. If it does not exist, present the first window available.
617+
618+ -- Neil J. Patel <neil.patel@canonical.com> Wed, 04 Feb 2009 11:39:27 +0100
619+
620+ evolution-indicator (0.1.1) intrepid; urgency=low
621+
622+2009-02-03 Neil Jagdish Patel <neil.patel@canonical.com>
623+
624+ Update packaging
625+
626+2009-02-03 Neil Jagdish Patel <neil.patel@canonical.com>
627+
628+ * Seconf to initial commit
629+
630+2009-02-03 Neil Jagdish Patel <neil.patel@canonical.com>
631+
632+ Initial Commit
633
634
635=== removed file 'autogen.sh'
636--- autogen.sh 2009-02-03 14:47:26 +0000
637+++ autogen.sh 1970-01-01 00:00:00 +0000
638@@ -1,11 +0,0 @@
639-#!/bin/sh
640-
641-PKG_NAME="evolution-indicator"
642-
643-which gnome-autogen.sh || {
644- echo "You need gnome-common from GNOME SVN"
645- exit 1
646-}
647-
648-USE_GNOME2_MACROS=1 \
649-. gnome-autogen.sh
650
651=== modified file 'configure.ac'
652--- configure.ac 2011-02-25 18:17:25 +0000
653+++ configure.ac 2011-05-09 14:58:08 +0000
654@@ -66,7 +66,12 @@
655 libnotify
656 libcanberra
657 gtkhtml-editor-3.14
658- unity
659+<<<<<<< TREE
660+ unity
661+=======
662+ unity
663+ dee-1.0
664+>>>>>>> MERGE-SOURCE
665 )
666 AC_SUBST(DEPS_CFLAGS)
667 AC_SUBST(DEPS_LIBS)
668
669=== modified file 'data/evolution-indicator.schemas.in'
670--- data/evolution-indicator.schemas.in 2009-02-09 15:27:51 +0000
671+++ data/evolution-indicator.schemas.in 2011-05-09 14:58:08 +0000
672@@ -45,5 +45,38 @@
673 </locale>
674 </schema>
675
676+ <schema>
677+ <key>/schemas/apps/evolution/eplugin/evolution_indicator/minimize_to_applet</key>
678+ <applyto>/apps/evolution/eplugin/evolution_indicator/minimize_to_applet</applyto>
679+ <owner>evolution-indicator</owner>
680+ <type>bool</type>
681+ <default>true</default>
682+ <locale name="C">
683+ <short>Use the indicator applet to keep evolution running without any visible windows.</short>
684+ </locale>
685+ </schema>
686+
687+ <schema>
688+ <key>/schemas/apps/evolution/eplugin/evolution_indicator/run_on_startup</key>
689+ <applyto>/apps/evolution/eplugin/evolution_indicator/run_on_startup</applyto>
690+ <owner>evolution-indicator</owner>
691+ <type>bool</type>
692+ <default>false</default>
693+ <locale name="C">
694+ <short>Run evolution when computer starts.</short>
695+ </locale>
696+ </schema>
697+
698+ <schema>
699+ <key>/schemas/apps/evolution/eplugin/evolution_indicator/hide_on_startup</key>
700+ <applyto>/apps/evolution/eplugin/evolution_indicator/hide_on_startup</applyto>
701+ <owner>evolution-indicator</owner>
702+ <type>bool</type>
703+ <default>false</default>
704+ <locale name="C">
705+ <short>Hide evolution once it starts.</short>
706+ </locale>
707+ </schema>
708+
709 </schemalist>
710 </gconfschemafile>
711
712=== modified file 'src/evolution-indicator.c'
713--- src/evolution-indicator.c 2011-02-25 18:17:25 +0000
714+++ src/evolution-indicator.c 2011-05-09 14:58:08 +0000
715@@ -55,6 +55,9 @@
716 #define PLAY_SOUND CONF_DIR"/play_sound"
717 #define SHOW_BUBBLE CONF_DIR"/show_bubble"
718 #define SHOW_NEW_IN_PANEL CONF_DIR"/show_new_messages_in_panel"
719+#define MINIMIZE_TO_APPLET CONF_DIR"/minimize_to_applet"
720+#define RUN_ON_STARTUP CONF_DIR"/run_on_startup"
721+#define HIDE_ON_STARTUP CONF_DIR"/hide_on_startup"
722
723 #define ACCOUNT_DIR "/apps/evolution/mail"
724 #define ACCOUNTS ACCOUNT_DIR"/accounts"
725@@ -84,11 +87,17 @@
726 static gboolean play_sound = TRUE;
727 static gboolean show_bubble = TRUE;
728 static gboolean show_count = FALSE;
729+static gboolean minimize_to_applet = TRUE;
730+static gboolean run_on_startup = FALSE;
731+static gboolean hide_on_startup = FALSE;
732
733 static guint only_inbox_id = 0;
734 static guint play_sound_id = 0;
735 static guint show_bubble_id = 0;
736 static guint show_count_id = 0;
737+static guint minimize_to_applet_id = 0;
738+static guint run_on_startup_id = 0;
739+static guint hide_on_startup_id = 0;
740 static guint accounts_id = 0;
741
742 static gint message_count = 0;
743@@ -98,8 +107,11 @@
744
745 int e_plugin_lib_enable (EPlugin *ep, int enable);
746 GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *ep);
747+static GtkWidget * get_cfg_widget (void);
748
749 static void show_evolution (gpointer arg0, guint timestamp, gpointer arg1);
750+static gboolean window_created_event (EShell *shell, GtkWindow *window);
751+static gboolean window_delete_event (EShell *shell, GtkWindow *window);
752
753 static void show_evolution_in_indicator_applet (void);
754 static void hide_evolution_in_indicator_applet (void);
755@@ -122,18 +134,6 @@
756 REAP_NAME
757 };
758
759-static GtkWidget *
760-get_cfg_widget (void)
761-{
762- GtkWidget *vbox;
763-
764- vbox = gtk_vbox_new (FALSE, 6);
765-
766- gtk_widget_show (vbox);
767-
768- return vbox;
769-}
770-
771 static gboolean
772 evolution_is_focused (void)
773 {
774@@ -429,6 +429,83 @@
775 }
776
777 static void
778+minimize_to_applet_changed (GConfClient *gclient,
779+ guint id,
780+ GConfEntry *entry,
781+ gpointer data)
782+{
783+ GConfValue *value;
784+
785+ value = entry->value;
786+
787+ minimize_to_applet = gconf_value_get_bool (value);
788+
789+ g_debug ("EI: Minimize to applet %s", minimize_to_applet ? "true" : "false");
790+}
791+
792+static void
793+hide_on_startup_changed (GConfClient *gclient,
794+ guint id,
795+ GConfEntry *entry,
796+ gpointer data)
797+{
798+ GConfValue *value;
799+
800+ value = entry->value;
801+
802+ hide_on_startup = gconf_value_get_bool (value);
803+
804+ g_debug ("EI: Hide on Startup %s", hide_on_startup ? "true" : "false");
805+}
806+
807+static void
808+run_on_startup_changed (GConfClient *gclient,
809+ guint id,
810+ GConfEntry *entry,
811+ gpointer data)
812+{
813+ GConfValue *value;
814+ char *home ;
815+ char *command ;
816+ char *desktopfile;
817+ gboolean result;
818+
819+ value = entry->value;
820+
821+ run_on_startup = gconf_value_get_bool (value);
822+
823+ home = getenv ("HOME");
824+ desktopfile = g_strdup(EVOLUTION_DESKTOP_FILE);
825+
826+ if (run_on_startup) {
827+ command = g_strdup_printf("test -d %s/.config/autostart", home);
828+ result = system(command);
829+ g_free(command);
830+ if (result) {
831+ command = g_strdup_printf("mkdir -p %s/.config/autostart",home);
832+ result = system(command);
833+ g_free(command);
834+
835+ }
836+
837+ command = g_strdup_printf("cp %s %s/.config/autostart/",desktopfile,home);
838+ result = system(command);
839+ g_free(command);
840+
841+ if (result)
842+ g_debug("EI: could not create file in autostart!");
843+ } else {
844+ command = g_strdup_printf("rm %s/.config/autostart/evolution.desktop",home);
845+ result = system(command);
846+ g_free(command);
847+ }
848+
849+ g_free(desktopfile);
850+ g_debug ("EI: run_on_startup %s", run_on_startup ? "true" : "false");
851+
852+}
853+
854+static void
855 show_new_in_panel_changed (GConfClient *gclient,
856 guint id,
857 GConfEntry *entry,
858@@ -641,6 +718,7 @@
859 }
860 else
861 {
862+<<<<<<< TREE
863 if (data.url && g_str_has_prefix (data.url, "pop:"))
864 {
865 indicator = create_indicator ("pop:",
866@@ -651,6 +729,18 @@
867 {
868 indicator = create_indicator (data.url, data.name);
869 }
870+=======
871+ if (data.url && g_str_has_prefix (data.url, "pop:"))
872+ {
873+ indicator = create_indicator ("pop:",
874+ g_dgettext (EVO_I18N_DOMAIN,
875+ "Inbox"));
876+ }
877+ else
878+ {
879+ indicator = create_indicator (data.url, data.name);
880+ }
881+>>>>>>> MERGE-SOURCE
882 indicators = g_slist_append (indicators, indicator);
883
884 g_debug ("EI: New account: %s (%s)", data.name, data.url);
885@@ -792,12 +882,70 @@
886 show_count_id = gconf_client_notify_add (client, SHOW_NEW_IN_PANEL,
887 show_new_in_panel_changed, NULL, NULL, NULL);
888
889+ minimize_to_applet = gconf_client_get_bool (client,
890+ MINIMIZE_TO_APPLET,
891+ NULL);
892+ minimize_to_applet_id = gconf_client_notify_add (client, MINIMIZE_TO_APPLET,
893+ minimize_to_applet_changed, NULL, NULL, NULL);
894+
895+ run_on_startup = gconf_client_get_bool (client,
896+ RUN_ON_STARTUP,
897+ NULL);
898+ run_on_startup_id = gconf_client_notify_add (client, RUN_ON_STARTUP,
899+ run_on_startup_changed, NULL, NULL, NULL);
900+
901+ hide_on_startup = gconf_client_get_bool (client,
902+ HIDE_ON_STARTUP,
903+ NULL);
904+ hide_on_startup_id = gconf_client_notify_add (client, HIDE_ON_STARTUP,
905+ hide_on_startup_changed, NULL, NULL, NULL);
906+
907 gconf_client_add_dir (client, ACCOUNT_DIR,GCONF_CLIENT_PRELOAD_NONE, NULL);
908 update_accounts ();
909 accounts_id = gconf_client_notify_add (client, ACCOUNTS,
910 on_accounts_changed, NULL,
911 NULL, NULL);
912
913+ EShell *shell = e_shell_get_default ();
914+
915+ /* If we are minimizing to the applet, listen for created windows */
916+ if (shell && minimize_to_applet)
917+ {
918+ g_signal_connect (
919+ shell, "window-created",
920+ G_CALLBACK (window_created_event), NULL);
921+
922+ /* Since a window was probably already created before we started
923+ we should find that window and connect up our custom delete event */
924+
925+ GList *list = e_shell_get_watched_windows(shell);
926+ EShellWindow *window;
927+
928+ while (list != NULL) {
929+ window = list->data;
930+ if (E_IS_SHELL_WINDOW(window)) {
931+
932+ /* block evolutions built in handlers from acting */
933+ g_signal_handlers_block_matched(window, G_SIGNAL_MATCH_DATA,
934+ 0, 0, NULL, NULL, shell);
935+
936+ /* add our handler for the window deleted signal */
937+ g_signal_connect_swapped (
938+ window, "delete-event",
939+ G_CALLBACK (window_delete_event), shell);
940+
941+ /* If we are asking evolution to hide its shell windows on
942+ then do that*/
943+ if (hide_on_startup) {
944+ gtk_window_iconify (GTK_WINDOW(window));
945+ gtk_widget_hide (GTK_WIDGET(window));
946+ }
947+
948+ }
949+ list = g_list_next(list);
950+ }
951+ }
952+
953 if (show_count)
954 {
955 indicate_server_show (server);
956@@ -815,6 +963,9 @@
957 gconf_client_notify_remove (client, play_sound_id);
958 gconf_client_notify_remove (client, show_bubble_id);
959 gconf_client_notify_remove (client, show_count_id);
960+ gconf_client_notify_remove (client, minimize_to_applet_id);
961+ gconf_client_notify_remove (client, run_on_startup_id);
962+ gconf_client_notify_remove (client, hide_on_startup_id);
963 gconf_client_notify_remove (client, accounts_id);
964
965 g_object_unref (client);
966@@ -839,6 +990,54 @@
967 return 0;
968 }
969
970+gboolean
971+window_created_event (EShell *shell, GtkWindow *window)
972+{
973+
974+ if (E_IS_SHELL_WINDOW(window)) {
975+
976+ /* block evolutions built in handlers from acting */
977+ g_signal_handlers_block_matched(window, G_SIGNAL_MATCH_DATA,
978+ 0, 0, NULL, NULL, shell);
979+
980+ /* add our handler for the window deleted signal */
981+ g_signal_connect_swapped (
982+ window, "delete-event",
983+ G_CALLBACK (window_delete_event), shell);
984+
985+ }
986+}
987+
988+gboolean
989+window_delete_event (EShell *shell, GtkWindow *window)
990+{
991+ /* If there is more than one window open then we can safely close this one.
992+ If there is only one then hide it instead of deleteing. */
993+
994+ gboolean at_least_one = FALSE;
995+ GList *list = e_shell_get_watched_windows (shell);
996+ EShellWindow *shell_window;
997+
998+ /* Check if there is more than one shell window in the list */
999+ while (list != NULL) {
1000+
1001+ if (E_IS_SHELL_WINDOW (list->data) && at_least_one) {
1002+ return FALSE;
1003+ } else if (E_IS_SHELL_WINDOW (list->data)) {
1004+ at_least_one = TRUE;
1005+ shell_window = list->data;
1006+ }
1007+ list = g_list_next (list);
1008+ }
1009+
1010+ /* If there wasn't more than one then hide the window.*/
1011+ gtk_window_iconify (GTK_WINDOW(shell_window));
1012+ gtk_widget_hide (GTK_WIDGET(shell_window));
1013+
1014+ return TRUE;
1015+
1016+}
1017+
1018 GtkWidget *
1019 e_plugin_lib_get_configure_widget (EPlugin *ep)
1020 {
1021@@ -876,6 +1075,27 @@
1022 gtk_toggle_button_get_active (button), NULL);
1023 }
1024
1025+static void
1026+on_minimize_to_applet_toggled (GtkToggleButton *button, gpointer null)
1027+{
1028+ gconf_client_set_bool (client, MINIMIZE_TO_APPLET,
1029+ gtk_toggle_button_get_active (button), NULL);
1030+}
1031+
1032+static void
1033+on_run_on_startup_toggled (GtkToggleButton *button, gpointer null)
1034+{
1035+ gconf_client_set_bool (client, RUN_ON_STARTUP,
1036+ gtk_toggle_button_get_active (button), NULL);
1037+}
1038+
1039+static void
1040+on_hide_on_startup_toggled (GtkToggleButton *button, gpointer null)
1041+{
1042+ gconf_client_set_bool (client, HIDE_ON_STARTUP,
1043+ gtk_toggle_button_get_active (button), NULL);
1044+}
1045+
1046 GtkWidget *
1047 org_gnome_get_prefs (EPlugin *ep, EConfigHookItemFactoryData *data)
1048 {
1049@@ -976,6 +1196,82 @@
1050 return check;
1051 }
1052
1053+GtkWidget *
1054+get_cfg_widget (void)
1055+{
1056+ GtkWidget *vbox, *box, *check;
1057+ GtkWidget *label1, *label2, *label3, *combo;
1058+ const gchar *markup = "<b>%s</b>";
1059+ gchar *str1;
1060+ gchar *str2;
1061+
1062+ vbox = gtk_vbox_new (FALSE, 6);
1063+
1064+ box = gtk_hbox_new (FALSE, 0);
1065+
1066+ check = gtk_check_button_new_with_mnemonic (_("Keep _Evolution running in the background"));
1067+ g_object_set (check, "active", minimize_to_applet, NULL);
1068+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1069+ g_signal_connect (check, "toggled", G_CALLBACK (on_minimize_to_applet_toggled), NULL);
1070+
1071+ check = gtk_check_button_new_with_mnemonic (_("_Run Evolution when computer starts"));
1072+ g_object_set (check, "active", run_on_startup, NULL);
1073+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1074+ g_signal_connect (check, "toggled", G_CALLBACK (on_run_on_startup_toggled), NULL);
1075+
1076+ check = gtk_check_button_new_with_mnemonic (_("_Hide Evolution on startup"));
1077+ g_object_set (check, "active", hide_on_startup, NULL);
1078+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1079+ g_signal_connect (check, "toggled", G_CALLBACK (on_hide_on_startup_toggled), NULL);
1080+
1081+ label1 = gtk_label_new (" ");
1082+ str1 = g_strdup_printf (markup, _("When new mail arri_ves in"));
1083+ gtk_label_set_markup_with_mnemonic (GTK_LABEL (label1), str1);
1084+ g_free (str1);
1085+
1086+ label2 = gtk_label_new (" ");
1087+
1088+ combo = gtk_combo_box_new_text ();
1089+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo),
1090+ n_accounts > 1 ? _("any Inbox") : _("Inbox"));
1091+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("any Folder"));
1092+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo),
1093+ only_inbox ? 0 : 1);
1094+ g_signal_connect (combo, "changed", G_CALLBACK (on_combo_changed), NULL);
1095+
1096+ label3 = gtk_label_new (":");
1097+ /* i18n: ':' is used in the end of the above line (When New Mail Arrives:)*/
1098+ str2 = g_strdup_printf (markup, _(":"));
1099+ gtk_label_set_markup (GTK_LABEL (label3), str2);
1100+ g_free (str2);
1101+
1102+ gtk_box_pack_start (GTK_BOX (box), label1, FALSE, FALSE, 0);
1103+ gtk_box_pack_start (GTK_BOX (box), label2, FALSE, FALSE, 0);
1104+ gtk_box_pack_start (GTK_BOX (box), combo, FALSE, FALSE, 0);
1105+ gtk_box_pack_start (GTK_BOX (box), label3, FALSE, FALSE, 0);
1106+
1107+ gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
1108+
1109+ check = gtk_check_button_new_with_mnemonic (_("Pla_y a sound"));
1110+ g_object_set (check, "active", play_sound, NULL);
1111+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1112+ g_signal_connect (check, "toggled", G_CALLBACK (on_sound_toggled), NULL);
1113+
1114+ check = gtk_check_button_new_with_mnemonic (_("_Display a notification"));
1115+ g_object_set (check, "active", show_bubble, NULL);
1116+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1117+ g_signal_connect (check, "toggled", G_CALLBACK (on_bubble_toggled), NULL);
1118+
1119+ check = gtk_check_button_new_with_mnemonic (_("_Indicate new messages in the panel"));
1120+ g_object_set (check, "active", show_count, NULL);
1121+ gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
1122+ g_signal_connect (check, "toggled", G_CALLBACK (on_show_panel_toggled), NULL);
1123+
1124+ gtk_widget_show_all (vbox);
1125+
1126+ return vbox;
1127+}
1128+
1129 /*
1130 *
1131 * SHOW EVOLUTION CODE

Subscribers

People subscribed via source and target branches