Commit Graph

499 Commits

Author SHA1 Message Date
foudfou 083304cd56 * refactor testing code
* create hidden proxy window (corresponding to our unique tray icon)
2013-11-22 23:05:43 +01:00
foudfou d358416414 fix NOTIFYICONDATAW, NOTIFYICONDATAW_Vx_SIZE definitions 2013-11-19 01:00:51 +01:00
foudfou 02e849c602 * a step forward: actually create the icon (Shell_NotifyIcon)
* cleaning

The icon gets created but GetLastError always returns
ERROR_INVALID_WINDOW_HANDLE, at least under win7.

We should be fine with callbacks' ABI as they are defined outside ctypes-utils.
2013-11-17 23:11:17 +01:00
foudfou bcb7764b8f first step to porting to Windows
Does nothing particular, except get few informations from the registeredwindow.
ctypes-utils.jsm needs to be ironed out (ABI used for .so version and lib type
for .dll), and we'll probably have problems when declaring callbacks
(ctypes.stdcall_abi on 32bits ?).
2013-11-16 15:56:42 +01:00
foudfou 3b80f4b618 Merge branch 'master' of github.com:foudfou/FireTray 2013-11-12 21:17:58 +01:00
Florian Haftmann 03b9007c0d new de-DE localization 2013-11-12 17:49:07 +01:00
foudfou 1c76f1c1f9 * update preferences-system.svg for DFSG-compatibility
* add check for loglevel in Makefile
2013-11-06 22:23:36 +01:00
foudfou 402eb46c38 deprecation cleaning 2013-11-04 21:23:50 +01:00
foudfou 0f28d23f71 * add mail_urgency_hint pref
* fix options' window size
2013-11-03 15:38:15 +01:00
foudfou ee7e691dae update it fr locales (thx Underpass!) 2013-11-03 11:46:57 +01:00
foudfou 595dcf42b7 bump version to 0.4.8 2013-11-03 03:12:24 +01:00
foudfou 088f7f56e4 cleaner observer for accountmanager.accounts
We also need to start observing the mail.accountmanager.accounts pref *after*
it's fully built.
2013-11-03 02:09:07 +01:00
foudfou 6d2bd81053 fix bogus import in Firefox 2013-11-01 15:28:06 +01:00
foudfou eda4302ba5 * remove calls to old/deprecated interfaces (reported by AMO)
* reset logging level
2013-10-27 23:05:25 +01:00
foudfou 1fc3b93bd7 fix Accounts() generator (bug introduced in 65d175) 2013-10-27 18:35:33 +01:00
foudfou 590c257788 inject scm revision into built install.rdf 2013-10-27 16:09:09 +01:00
foudfou 05a9d401b1 bump version to 0.4.7 2013-10-27 15:23:06 +01:00
foudfou 65d17531ec * fix detection of account deletion/addition (see b3869630)
* cleaning (use fixIterator on MailServices.accounts)

thx mailInstrumentation !
2013-10-26 02:21:31 +02:00
foudfou 30772d56de add locales for preferences item in popup menu 2013-10-26 01:49:58 +02:00
foudfou c96ff01ebd add preferences item to popup menu 2013-10-25 17:49:01 +02:00
foudfou 80b0384397 new es-AR fr it nl zh-TW locales
thx BabelZillians profediego, Goofy, Jojaba, nico, Underpass, markh,
Velociraptor !
2013-10-25 16:51:42 +02:00
foudfou 8d8395b946 better remember_desktop.label string 2013-10-10 22:24:42 +02:00
foudfou 28c0932e57 comment on restoring minimized windows when hides_on_minimize 2013-10-10 22:16:19 +02:00
foudfou 4bbb66cde8 broader detection of the iconify event
Revert using getXWindowStates() instead of gdk_window_get_state(). Xfce only
sets_NET_WM_STATE_HIDDEN after iconify.
2013-10-10 22:01:29 +02:00
foudfou 6459bc6e4f * revert to using setVisibility() instead of baseWin.visibility=false on
* startupHide cleaning

It looks like setting baseWin.visibility=false removes the possibility to
restore the app by calling it from the command line. This is why we use
setVisibility() instead if start_hidden.
2013-10-07 21:44:34 +02:00
foudfou ef30cd16e2 * fix: correct launch of app-started event in Thunderbird when windows not
actually mapped (or "mapped" to another desktop)
* check app started if -firetrayShowHide or -firetrayPresent

We can't base the app-started event solely on MapNotify, at least because the
app could be started on another desktop (not mapped). The app-started event in
Thunderbird is not based on mail-startup-done events. We might have to consider
implementing a watchdog for unexpected cases...
2013-10-07 00:24:29 +02:00
foudfou d8536d8127 fix error catching when accounts not yet initialized 2013-09-19 16:49:07 +02:00
foudfou f6508616e6 Merge branch 'urgency'
Conflicts:
	src/modules/FiretrayChat.jsm
	src/modules/linux/FiretrayChatStatusIcon.jsm
2013-07-24 15:46:12 +02:00
foudfou 2749816a4d Merge branch 'fade'
Conflicts:
	src/modules/linux/FiretrayChatStatusIcon.jsm
2013-07-24 15:38:17 +02:00
foudfou 6615219f95 use 'focus-in' event for unsetting urgency hint
Unsetting urgency hint can't be base on MapNotify when working on a single
desktop.
2013-07-23 23:35:21 +02:00
foudfou 419ac2d0f0 set urgency hint on all windows for new messages 2013-07-22 17:23:33 +02:00
foudfou 91792afe0b tune pref tooltip for mail_change_trigger 2013-07-22 11:40:42 +02:00
foudfou 35ed1efb6f * handle chat_icon_blink and chat_icon_enable prefs properly
* better use of ChatStatusIcon timers
2013-06-23 21:45:15 +02:00
foudfou 2875aaa7ba remove experimental fade feature for AMO review 2013-06-18 22:48:23 +02:00
foudfou 7070794fcd cleaning 2013-06-18 09:55:40 +02:00
foudfou 8aaf2cfda7 fix: add long-living references to timers for ChatStatusIcon blinking 2013-06-17 23:45:38 +02:00
foudfou 97ef0cb65f fix ChatStatusIcon blinking 2013-05-31 15:43:34 +02:00
foudfou 9b190f20bd attempt to address the the compatibility warning "Some JS modules were moved
from resource:/// and resource://gre/ to resource://app/"

https://blog.mozilla.org/addons/2013/04/26/compatibility-for-firefox-21/
2013-05-30 23:15:32 +02:00
foudfou 5ddf23a59d * fix merge: ChatStatusIcon.stopCrossFading() was defined twice
* fix: ChatStatusIcon.dropPixBuf() at right time
* cleaning
2013-05-30 22:52:01 +02:00
foudfou 9472fe22a2 Merge branch 'cross-fade' into v0.4.6rc2
Conflicts:
	src/modules/FiretrayChat.jsm
	src/modules/linux/FiretrayChatStatusIcon.jsm
2013-05-30 22:22:08 +02:00
foudfou 08bd79a1c9 * add chat_icon_blink, chat_icon_blink_style options
* fix MailChatPrefListener unregistering
* use GDK_INTERP_BILINEAR for gdk_pixbuf_composite
2013-05-10 15:33:50 +02:00
foudfou c439efb036 Merge branch 'startup' into v0.4.6rc2 2013-05-01 15:45:35 +02:00
foudfou 2e064cae99 use |yield| in addition to nested timers for ChatStatusIcon fading
http://syzygy.st/javascript-coroutines/ is worth mentioning
2013-05-01 15:44:52 +02:00
foudfou 5882e3b9c5 use nested timers to mimic sleep()
thread.processNextEvent() is prohibited in Firefox (though used in
mozmill/util.js). Nested timers are a bit twisted and ugly. Need to check
|yield| and generators: http://unixpapa.com/js/sleep.html, dactyl/base.jsm
(K. Maglione)
2013-04-29 02:10:04 +02:00
foudfou 08828ce825 for Thunderbird, base startup event on the last restored window's map.
Unfortunately there is not equivalent "sessionstore-windows-restored" in TB
yet.  Many events related to windows are issued before windows are fully
realized. "mail-startup-done"/"mail-tabs-session-restored" are issued by *each*
window. "console-api-log-event" is not reliable and can be issued at relatively
early stage on heavy configs. So that the best solution is probably to count
restored windows ourselves...
2013-04-21 14:17:29 +02:00
foudfou c4c5a3425b address compatibility warnings from AMO
https://addons.mozilla.org/en-US/developers/addon/firetray/file/203468/validation.
Not sure if we should not just drop compatibility...  We should be able to
support back to Gecko 4.0 but ctypes-utils.jsm uses features introduced in 7.0.
2013-04-19 22:09:40 +02:00
foudfou 55bd8ce670 bump version to 0.4.6 2013-04-14 16:07:36 +02:00
foudfou 2c5a99c159 fix start_hidden by hiding only when app not started
base startup event on "sessionstore-windows-restored" and
"console-api-log-event", instead of the first "before-first-paint", reverting
some of 29de64e5
2013-04-14 15:55:20 +02:00
foudfou 31149d40ad bump Zotero version to 4.* 2013-04-08 00:46:38 +02:00
foudfou d43e992ed4 * use a pool of conversations for handling attention calling
* ignore messages from self (can be sent from other application)
2013-04-08 00:42:51 +02:00
foudfou 837901c301 Merge branch 'twitter-blink' into icon-blink
Conflicts:
	src/modules/FiretrayChat.jsm
2013-04-07 21:50:57 +02:00
foudfou 7af80d0119 handle blinking on new messages for twitter accounts
No 'new-directed-incoming-message' event is issued on new messages for twitter
accounts, which seem to be considered chatrooms (instead of private
conversations).
2013-04-07 16:45:17 +02:00
foudfou 208db6f906 implement experimental cross-fading for blinking chat icon 2013-04-01 02:58:15 +02:00
foudfou 4360e3f499 cleaning 2013-03-30 14:27:05 +01:00
foudfou f3a988444e do chat icon blinking ourselves
gtk_status_icon_set_blinking() deprecated deprecated since version 2.22,
removed in GTK+ 3
2013-03-30 12:29:38 +01:00
foudfou 3aca4f64f1 support urgency hint 2013-03-30 01:12:35 +01:00
foudfou 53e3421a51 refactor startIconBlinkingMaybe() 2013-03-28 16:22:28 +01:00
foudfou 6b1bd0cfe6 cleaning 2013-03-21 08:57:17 +01:00
foudfou 8c1ae188b2 don't actually use libfirtray (nor display gtk version)
this would lead to shipping compiled version for multiple platforms...
2013-03-21 01:13:41 +01:00
foudfou 270807380d example of using libfirtray to display gtk version 2013-03-21 01:09:08 +01:00
foudfou d91bfd1259 fix negative message count bug 2013-03-21 00:33:09 +01:00
foudfou 2b2812aee6 cleaning 2013-03-16 16:04:07 +01:00
foudfou 1765258679 cleaning 2013-03-11 17:02:07 +01:00
foudfou 1a90dbe179 add support for Zotero app 2013-03-11 16:03:49 +01:00
foudfou bd83ca9304 * display popup menu window items for all application, not only browsers
* cleaning
2013-03-10 22:21:02 +01:00
foudfou 6fb8a15f22 * more accurate startup event detection
* when start_hidden, hide window on first x11.MapNotify instead of hiding all
  windows short after the "startup event".

  This prevents having visibility falsely corrected for windows that are
  displayed after the "startup event", and thus having to click twice on the
  tray icon to actually restore windows.
2013-03-10 21:39:34 +01:00
foudfou 4b01f24e94 add '-debug' to build dirname when applicable 2013-03-10 20:51:26 +01:00
foudfou a7c753e5b3 keep long living references to timers 2013-03-10 17:29:32 +01:00
foudfou b8b3b838cb add git rev to build dirname 2013-03-10 16:31:42 +01:00
foudfou 18c35bdf81 added locale sk-SK. thx Slavko slavino.sk 2013-02-22 23:58:11 +01:00
foudfou 2bbab71230 fix options' filepickers (#82)
Not sure as why the filepicker callback passed to |open()| is working in all
Mozilla's code without having an explicite |done| method...
2013-02-10 21:52:53 +01:00
foudfou 730a67939c slpash page when version change is now release-notes 2013-01-28 10:49:08 +01:00
foudfou 245ba3c66c bump to v0.4.5 2013-01-28 10:31:50 +01:00
foudfou d77724d46b yet another attempt to fix restore maximized window. This is tricky because it
can break restore minimized (hides_on_minimize off)
2013-01-16 23:48:25 +01:00
foudfou 601554a63f oops, forgot FiretrayHandler.jsm in nsISupportsArray replaced by nsIArray 2012-12-30 22:47:43 +01:00
foudfou 6441cef235 nsISupportsArray replaced by nsIArray (Bug 820377) 2012-12-30 22:43:42 +01:00
foudfou 2215aa43d1 address v0.4.4 reviewer comments about namespace pollution 2012-12-20 13:38:38 +01:00
foudfou 6c4d21d4b3 attempt to fix restore maximized window 2012-12-20 13:36:24 +01:00
foudfou 7d0a22364c add -firetrayPresent command-line switch 2012-12-13 19:55:30 +01:00
foudfou 5dce03778d make firetray.Utils.timer() API more readable 2012-12-13 19:34:49 +01:00
foudfou 29de64e51f base the startup event on the first 'before-first-paint'
That lets the windows get well realized before we can hide them
(start_hidden). This is especially true for heavy configurations with numerous
addons (Lightning with multiple remote calendars for instance).
2012-12-13 19:11:58 +01:00
foudfou c622e61e9d fix start_hidden again.
The wisest seems to let the window get fully realized, before hiding it.
2012-12-10 23:02:05 +01:00
foudfou f039a3b427 bump version to v0.4.4 2012-11-26 21:38:48 +01:00
foudfou e312714c73 fix hidePrefPane() 2012-11-16 17:38:20 +01:00
foudfou d17bcf9721 use filePicker.open() instead of deprecated show() - see Bug 731307 2012-11-09 13:26:48 +01:00
foudfou 4ff8e81d90 rename content logger to avoid collisions 2012-11-09 13:07:18 +01:00
foudfou 630b36b05e Merge branch 'gtk-version' 2012-10-19 22:11:46 +02:00
foudfou b20db43bdd appropriate way of determining if a conversation is currently shown 2012-10-19 21:06:35 +02:00
foudfou cab57e62c5 fix finding if chat tab selected and conversation active 2012-10-15 23:13:20 +02:00
foudfou 18fb980d49 add gtk version check + revert to gdk_window_get_toplevel() 2012-10-15 13:25:28 +02:00
foudfou 1ec5ccf950 * fix double Messaging init when toggleNotifications() in pref UI
* fix multiple pref UI bugs due to obsolete ref to "pane1"
2012-09-11 23:53:07 +02:00
foudfou 926557eb7b hides_last_only defaults to false 2012-09-10 15:09:44 +02:00
foudfou 90ee9f834b option to hide only last window (#24) 2012-09-10 15:00:25 +02:00
foudfou 97e488e232 fix comment about gnome-shell/mutter 2012-09-10 14:15:28 +02:00
foudfou 5d9e0b4ef8 fix chat icon blink forever with gnome-shell 3.4.1 (#61) 2012-09-10 13:34:48 +02:00
foudfou a874d2852f use dash as make shell (continued) 2012-09-09 15:51:09 +02:00
foudfou 8516409607 * fix TB crash when mail.chat.enabled is false (#58)
* fix item menu titles for Seamonkey
* fix middle-click (activate) to show window when hidden
2012-09-09 01:29:51 +02:00
foudfou 8ac3c3a82f use dash as make shell *if available* 2012-09-08 21:54:03 +02:00
foudfou 3dc3f6d54d use dash as make shell 2012-09-08 14:26:23 +02:00
foudfou 90cd161f3c fix correctMailNotificationType() 2012-09-07 17:20:38 +02:00
foudfou 73f1f41ca4 rename command line option 'firetray-showHide' to 'firetrayShowHide' 2012-09-07 17:08:32 +02:00
foudfou 39f3c20fa8 correct visibility state when hidden application called from command line 2012-09-07 16:47:47 +02:00
foudfou 22de1d3fcc * fix Makefile for including .svg into xpi
* minor fixes
2012-09-07 15:06:01 +02:00
foudfou 08e6140312 oops, add prefpane icons 2012-09-06 19:39:02 +02:00
foudfou 126842e5b7 bump version to v0.4.3 2012-09-06 19:21:22 +02:00
foudfou 194894afd4 * convert tabbox/tabpanels to prefpanes (preference UI) (thx Tango for icons!)
* change order of menu items for mail apps
* fix hide chat prefs when non-chat app
2012-09-06 19:07:22 +02:00
foudfou f91bc8b039 fix icon update when changing icon preferences (continued) 2012-09-06 16:25:24 +02:00
foudfou 23975110a5 * isolate Chat from Messaging
* fix icon update when changing icon preferences
* prevent double observer registration
* add keyboard shortcut for debugging preference window
2012-09-06 16:07:52 +02:00
foudfou aa6b8a9080 slight pref UI re-work (mail pane) 2012-09-05 15:16:19 +02:00
foudfou 78dc65c77e Merge branch 'ff17-missing-unmap' 2012-09-05 13:54:29 +02:00
foudfou c7562bdcdf cleaning 2012-09-05 13:48:27 +02:00
foudfou ee1eac01b3 fix wrong xid provision ("missing UnmapNotify") 2012-09-05 13:45:02 +02:00
foudfou d0e2259e96 restrict logging to our addon 2012-09-04 17:48:54 +02:00
foudfou ca39dec2de * add version check in Makefile
* fix openTab() onVersionChange
* cleaning
2012-09-04 14:33:43 +02:00
foudfou de2a756fc8 enable Chat only in Thunderbird (not Seamonkey!) 2012-09-04 10:50:17 +02:00
foudfou 97237aaffe update chat icon when (re-)initializing chat 2012-09-04 00:28:53 +02:00
foudfou ae0f41e1e4 Merge branch 'im'
Conflicts:
	src/defaults/preferences/prefs.js
	src/modules/FiretrayHandler.jsm
	src/modules/FiretrayMessaging.jsm
	src/modules/VersionChange.jsm
	src/modules/commons.js
	src/modules/linux/FiretrayStatusIcon.jsm
	src/modules/linux/FiretrayWindow.jsm
2012-09-04 00:25:29 +02:00
foudfou 1e4d51f64f Merge branch 'cybso-favorites'
Conflicts:
	src/chrome/content/options.js
	src/modules/FiretrayMessaging.jsm
2012-09-03 23:05:25 +02:00
foudfou c7b23ad718 Revert "attempt to asynchronously get addon version from AddonManager"
This reverts commit 747ab637d9.
2012-09-03 16:46:01 +02:00
foudfou 747ab637d9 attempt to asynchronously get addon version from AddonManager 2012-09-03 16:45:57 +02:00
foudfou 29dac883b9 ignore server type 'im' silently for message count 2012-09-03 08:23:37 +02:00
foudfou ebe8ee37ba address comments from last review by Kris Maglione, mainly:
* rename commande line flag '-showHide' to '-firetray-showHide'
* drop use of AddonLogging.jsm in variable F, and use log4moz instead
* do not remove String.prototype.trim

Regarding String.prototype.trim tough, it's unclear why its fallback definition
should be removed: MDN says it was introduced in JavaScript 1.8.1, but it seems
available in 1.7...
2012-09-03 01:51:32 +02:00
foudfou 2d734f2422 Makefile for firetray.so more portable (thx simonbcn) 2012-09-02 17:31:09 +02:00
foudfou 934a67f93c * refactor FiretrayMessaging
* add favorites to the "Included accounts" tree in preference UI
2012-08-29 19:20:43 +02:00
foudfou aaef6a1544 experimental handling of Exquilla accounts 2012-08-29 11:46:12 +02:00
foudfou 693611c994 * add chat_icon_enable pref
* fix globaluserStatus with all IM accounts disconnected
* cleaning
2012-08-25 21:45:00 +02:00
foudfou 06349f15f4 * rename all IM/Chat-related modules consistently with "Chat" keyword
* stopIconBlinkingMaybe() only when acknowledgeOnFocus.must
2012-08-25 19:18:33 +02:00
foudfou 5c12abb1ee * fix non-import of IM stuff in Firefox
* add minimal tooltip for Chat icon
* fix findActiveWindow() — gtk_window_is_active() not reliable
2012-08-25 19:02:14 +02:00
foudfou 9f46ef6343 IM icon blinking when private message or cited in channel 2012-08-21 22:10:56 +02:00
foudfou 9611f1443e cleaning 2012-08-21 15:44:47 +02:00
foudfou d81c0d51ac fix iconify-after-show trap 2012-08-21 15:40:40 +02:00
foudfou 525fdd96dd radical attempt to fix iconify-after-show trap 2012-08-20 16:07:46 +02:00
foudfou 83a11def65 (failed) attempt to fix iconify-after-show trap 2012-08-17 23:53:26 +02:00
foudfou 3da01428a9 fix some gtk function definitions 2012-08-17 23:51:00 +02:00
foudfou 866bbc1a2e IM icon changes according to IM global status 2012-08-13 12:07:57 +02:00
foudfou 82fae974d1 ctypes libs are tracked by firetray.Handler.
(sub)modules using ctypes libs just need to declare opened libs, which will be
ultimately closed by the Handler. Not only is this fancier, but also useful in
situations where we want to init()/shutdown() modules without closing libs used
by others (ex: IMStatusIcon)
2012-08-07 23:37:32 +02:00
foudfou ff7bcd4c91 destroy icons when shutting down IMStatusIcon 2012-08-07 22:34:02 +02:00
foudfou ceba669bcd display IM icon when IM enabled 2012-08-04 16:29:44 +02:00
foudfou 6f95421a2f fix shutdown so ctypes libs are close cleanly + cleaning 2012-08-04 15:22:10 +02:00
foudfou a9cc299259 extract from StatusIcon to GtkIcons code to share with IMStatusIcon 2012-08-04 14:58:58 +02:00
foudfou b3869630c2 * observe "account-added", "account-removed", at last ! (see 75636723 and 8d0917ab)
* auto-start InstantMessaging when needed
2012-08-04 14:02:42 +02:00
foudfou ee86eeed16 ignore 'im' server types for now, we'll be handling them later. 2012-08-03 23:52:38 +02:00
foudfou c608058971 add 'im' to mail server types and have VersionChange hooks applied synchronously
This forces us to hard code the addon version :(
2012-08-03 15:53:36 +02:00
foudfou d8448f421b refactor VersionChange handling 2012-08-03 13:53:40 +02:00
foudfou 5df98adf6a Makefile: target 'all' becomes 'build' 2012-08-01 13:15:22 +02:00
foudfou 5aac8c2592 cleaning 2012-07-28 15:25:33 +02:00
foudfou 3c572aa5fc Merge branch 'native-handle' 2012-07-28 15:19:04 +02:00
foudfou 2fe1c2b687 cleaning (Moz Bug 760802, our patch accepted into mainline 9dcd7470dc0b) 2012-07-27 02:15:59 +02:00
foudfou 4fb215ce82 fix start_hidden which was based on 'resize' events.
"Too small window" bug with Lightning installed.

start_hidden is not so easy to achieve since:
- we can't rely on appStarted (window displayed in between)
- we can't rely on 'load' event (window not fully realized - position, size)
- we can't rely on 'resize' event (window displayed/shown/resized a variable
  number of times)
Besides, nsIBaseWindow.visibility remains the surest way to hide windows at
startup.
2012-07-24 02:00:44 +02:00
foudfou 3bb6d15fbc show how to find GtkWindow from GdkWindow 2012-06-29 17:34:20 +02:00