Commit Graph

479 Commits

Author SHA1 Message Date
foudfou b3835a7c8b add popup menu to tray icon (work in progress) 2011-08-29 02:40:14 +02:00
foudfou f5b279298e * refactor handeling of 'close_hides': eventListeners("close") never removed
from windows. Pros: reads much simpler. Cons: unnecessary eventListeners (but
  not harmful either).
* experimental kb shortcut for hiding all windows (whatever the value of
  'close_hises')
* bumped to version 8.* (FF, TB)
2011-08-28 03:37:19 +02:00
foudfou 18e555d10d attempt to stabilize options' behaviour ('close_hides' for now)
Damn js refs ! Anyway, almost there... still have to get around the "about
closing multiple tabs"
2011-08-27 21:52:19 +02:00
foudfou c7a89df4f0 add new icons 2011-08-27 19:52:01 +02:00
foudfou 5021a9bd31 cleaning 2011-08-27 17:40:27 +02:00
foudfou e76f9bd4e6 correct libgtk-x11 name 2011-08-17 23:42:04 +02:00
foudfou 6e2ce65512 * remember and correct window positions when hiding/showing
* fix: prevent multiple handler/icon creations
* closing a window hides all windows
* add option for 'close_hides' (work in progress)
2011-08-15 22:39:25 +02:00
foudfou 46e0e2c5b6 * minimal platform check (work in progress)
* best practice try: remove event listeners
* minor refactoring
2011-08-14 15:38:20 +02:00
foudfou ef190af251 singleton tray icon handler (avoid creation of multiple icons when new windows
created)

https://developer.mozilla.org/en/Using_JavaScript_code_modules
http://stackoverflow.com/questions/2275882/setting-a-preference-at-startup-in-firefox/2276772#2276772
2011-08-08 04:32:52 +02:00
foudfou 98ee40353e use Services.jsm and renamed modules to .jsm 2011-08-08 03:41:18 +02:00
foudfou 8e4e14c8f6 Merge branch 'hide'
Conflicts:
	src/chrome/content/overlay.js
	src/modules/LibGtkStatusIcon.js
2011-08-03 15:56:06 +02:00
foudfou 890c4579c3 Revert "new version of LibGtkStatusIcon.js with XPCOMUtils.defineLazyGetter()"
This reverts commit d85edced00.

First, it'll be easier to merge with hide/show feature. Then we prefer to keep
2 examples of js-ctypes libs: we still aren't clear about when/how to call
lib.close()...
2011-08-03 15:48:56 +02:00
foudfou e9321f534b * enable show/hide from tray icon ! thx Neil !!
* fix Makefile
* use closures for GCallback_t

BUG: windows aren't restored at the same position, or with the same z-order
https://developer.mozilla.org/en/nsIWindowMediator#getZOrderXULWindowEnumerator%28%29

BUG: new window creates a new tray icon
2011-07-25 02:27:30 +02:00
foudfou 7a614a38a3 define GtkWidget struct with a 'parent' pointer pointer to itself - thx Benjamin Smedberg 2011-07-18 22:29:41 +02:00
foudfou f2245d1ca0 * add LibC for logging to stderr
* try different approaches for hiding windows:
  - gather toplevel windows from nsIWindowMediator, but then unable to get
    NativeParentWindow (GdkWindow) in order to apply gdk_window_hide - damn it !
  - gather toplevel GdkWindows, but don't know exactly how to find out which
    belong to the application...
  - gather toplevel GtkWindows, but seem to get too many windows from
    gtk_window_list_toplevels()...
* problems understanding js-ctypes:
  - arguments passed to callbacks (see FunctionType), for ex: implementation of
    GFunc
  - definition of recursive structures, for ex: GtkWidget
2011-07-18 00:58:03 +02:00
foudfou 1b68487af8 add debug() facility to print to terminal stderr 2011-07-13 01:23:58 +02:00
foudfou d85edced00 new version of LibGtkStatusIcon.js with XPCOMUtils.defineLazyGetter() 2011-07-11 18:59:12 +02:00
foudfou 7cac32441e use newer gtk_status_icon_set_tooltip_text() 2011-07-11 18:01:52 +02:00
foudfou 29bf5a42bd attempt to get signals from tray icon using LibGObject
needs refactoring !
2011-07-10 13:41:46 +02:00
foudfou cb26f7fd55 added minimal tooltip (gtk_status_icon_set_tooltip)
TODO: fix warning (?):
Gdk-CRITICAL **: IA__gdk_window_get_root_coords: assertion `GDK_IS_WINDOW (window)' failed
2011-07-10 12:53:00 +02:00
foudfou fded2c2a31 try supporting more applications (Firefox, Thunderbird for now)
export 'Cc' and 'Ci' in common.js module. This helps managing the different
behaviours in FF and TB: TB requires Ci and Cc to be defined explicitly in
overlay.js, and FF fails to load overlay.js silently when Ci and Cc are defined
explicitly (const defined twice ?)...
2011-07-06 02:43:16 +02:00
foudfou 0d25df1d17 * use 'mozt' namespace in .js files
* style: '_' prefix for private attributes (common.js)
2011-07-06 02:14:17 +02:00
foudfou ddf1763b9a cleaning 2011-07-06 01:41:28 +02:00
foudfou 56015e3744 refactor: rename "mozt" to "moztray" 2011-07-06 01:32:36 +02:00
foudfou f6f906efa7 "skipCertError" changed to "moztray" 2011-07-05 11:46:55 +02:00
foudfou e0e0cc81a5 first working version (firefox tray icon) 2011-07-04 14:31:56 +02:00
foudfou c842690051 proof of concept version 2011-07-04 00:00:07 +02:00
foudfou 1366a19410 modifired .gitignore 2011-07-03 20:06:15 +02:00
foudfou f5e6b887bc Initial commit (skeleton extension derived from SkipCertError) 2011-07-03 20:05:40 +02:00