Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Merge branch 'minimize-detect'
Browse files Browse the repository at this point in the history
Conflicts:
	src/modules/linux/FiretrayWindow.jsm
foudfou committed Apr 30, 2012
2 parents a1f0980 + f86a3ac commit 4174095
Showing 4 changed files with 12 additions and 16 deletions.
8 changes: 3 additions & 5 deletions src/modules/FiretrayMessaging.jsm
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ firetray.Messaging = {
/* removes removed accounts from excludedAccounts pref. NOTE: Can't be called
at shutdown because MailServices.accounts no longer available */
cleanExcludedAccounts: function() {
try {
F.LOG("* cleaning *");
let mailAccounts = firetray.Utils.getObjPref('mail_accounts');
let excludedAccounts = mailAccounts["excludedAccounts"];
@@ -71,12 +70,12 @@ firetray.Messaging = {
let accountServerKeys = [];
for (let i=0, len=accounts.Count(); i<len; ++i) {
let account = accounts.QueryElementAt(i, Ci.nsIMsgAccount);
let accountServer = account.incomingServer;
accountServerKeys[i] = accountServer;
accountServerKeys[i] = account.incomingServer.key;
}

let newExcludedAccounts = [], cleaningNeeded = 0;
for (let excludedAccount in excludedAccounts) {
for (let i=0, len=excludedAccounts.length; i<len; ++i) {
let excludedAccount = excludedAccounts[i];
if (accountServerKeys.indexOf(excludedAccount) >= 0)
newExcludedAccounts.push(excludedAccount);
else
@@ -88,7 +87,6 @@ firetray.Messaging = {
let prefObj = {"serverTypes":mailAccounts["serverTypes"], "excludedAccounts":newExcludedAccounts};
firetray.Utils.setObjPref('mail_accounts', prefObj);
}
} catch(x) { F.ERROR(x); }
},

/* http://mxr.mozilla.org/comm-central/source/mailnews/base/public/nsIFolderListener.idl */
2 changes: 1 addition & 1 deletion src/modules/ctypes/linux/gtk.jsm
Original file line number Diff line number Diff line change
@@ -93,7 +93,6 @@ function gtk_defines(lib) {
lib.lazy_bind("gtk_image_menu_item_set_image", ctypes.void_t, this.GtkImageMenuItem.ptr, this.GtkWidget.ptr);
lib.lazy_bind("gtk_menu_shell_append", ctypes.void_t, this.GtkMenuShell.ptr, this.GtkWidget.ptr);
lib.lazy_bind("gtk_menu_shell_prepend", ctypes.void_t, this.GtkMenuShell.ptr, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_show_all", ctypes.void_t, this.GtkWidget.ptr);
lib.lazy_bind("gtk_menu_popup", ctypes.void_t, this.GtkMenu.ptr, this.GtkWidget.ptr, this.GtkWidget.ptr, this.GtkMenuPositionFunc_t, gobject.gpointer, gobject.guint, gobject.guint);
lib.lazy_bind("gtk_status_icon_position_menu", ctypes.void_t, this.GtkMenu.ptr, gobject.gint.ptr, gobject.gint.ptr, gobject.gboolean.ptr, gobject.gpointer);
lib.lazy_bind("gtk_separator_menu_item_new", this.GtkWidget.ptr);
@@ -113,6 +112,7 @@ function gtk_defines(lib) {
lib.lazy_bind("gtk_widget_hide_on_delete", gobject.gboolean, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_hide", ctypes.void_t, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_show", ctypes.void_t, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_show_all", ctypes.void_t, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_get_events", gobject.gint, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_get_events", gobject.gint, this.GtkWidget.ptr);
lib.lazy_bind("gtk_widget_add_events", ctypes.void_t, this.GtkWidget.ptr, gobject.gint);
2 changes: 1 addition & 1 deletion src/modules/linux/FiretrayPopupMenu.jsm
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ firetray.PopupMenu = {

showAllWindowItemsOnlyVisibleWindows: function() {
for (let xid in firetray.Handler.windows)
if (!firetray.Handler.windows[xid].visibility)
if (!firetray.Handler.windows[xid].visible)
this.showSingleWindowItem(xid);
},

16 changes: 7 additions & 9 deletions src/modules/linux/FiretrayWindow.jsm
Original file line number Diff line number Diff line change
@@ -322,7 +322,13 @@ firetray.Window = {
},

setVisibility: function(xid, visibility) {
firetray.Handler.windows[xid].baseWin.visibility = visibility;
F.WARN("setVisibility="+visibility);
let gtkWidget = ctypes.cast(firetray.Handler.gtkWindows.get(xid), gtk.GtkWidget.ptr);
if (visibility)
gtk.gtk_widget_show_all(gtkWidget);
else
gtk.gtk_widget_hide(gtkWidget);

firetray.Handler.windows[xid].visible = visibility;
firetray.Handler.visibleWindowsCount = visibility ?
firetray.Handler.visibleWindowsCount + 1 :
@@ -490,14 +496,6 @@ firetray.Window = {
let winStates, isHidden;
switch (xany.contents.type) {

case x11.UnmapNotify:
F.LOG("UnmapNotify");
if (firetray.Handler.windows[xwin].visible) {
winStates = firetray.Window.getXWindowStates(xwin);
isHidden = winStates & FIRETRAY_XWINDOW_HIDDEN;
}
break;

case x11.PropertyNotify:
let xprop = ctypes.cast(xev, x11.XPropertyEvent.ptr);
if (firetray.Handler.windows[xwin].visible &&

0 comments on commit 4174095

Please # to comment.