r7473 - mugshot-client/trunk/windows/HippoUI
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7473 - mugshot-client/trunk/windows/HippoUI
- Date: Fri, 9 May 2008 13:08:18 -0500 (CDT)
Author: otaylor
Date: 2008-05-09 13:08:17 -0500 (Fri, 09 May 2008)
New Revision: 7473
Modified:
mugshot-client/trunk/windows/HippoUI/HippoUI.cpp
mugshot-client/trunk/windows/HippoUI/HippoUI.h
mugshot-client/trunk/windows/HippoUI/HippoUIUtil.cpp
Log:
HippoUI.{cpp,h}: Update the tooltip on all state change, not just when we connect or disconnect
HippoUI.cpp: Move the Signout/Exit menu from Control-Left-Click to Right click
HippoUIUtil.cpp: Fix the active window determination to ignore invisible windows
Modified: mugshot-client/trunk/windows/HippoUI/HippoUI.cpp
===================================================================
--- mugshot-client/trunk/windows/HippoUI/HippoUI.cpp 2008-05-08 18:36:14 UTC (rev 7472)
+++ mugshot-client/trunk/windows/HippoUI/HippoUI.cpp 2008-05-09 18:08:17 UTC (rev 7473)
@@ -84,6 +84,7 @@
// Set up connections
connectedChanged_.connect(G_OBJECT(connection), "connected-changed", slot(this, &HippoUI::onConnectedChanged));
+ stateChanged_.connect(G_OBJECT(connection), "state-changed", slot(this, &HippoUI::onStateChanged));
hasAuthChanged_.connect(G_OBJECT(connection), "has-auth-changed", slot(this, &HippoUI::onHasAuthChanged));
authFailed_.connect(G_OBJECT(connection), "auth-failed", slot(this, &HippoUI::onAuthFailed));
authSucceeded_.connect(G_OBJECT(connection), "auth-succeeded", slot(this, &HippoUI::onAuthSucceeded));
@@ -326,6 +327,11 @@
info = hippo_data_cache_get_client_info(getDataCache());
upgrader_.setUpgradeInfo(info->minimum, info->current, info->download);
}
+}
+
+void
+HippoUI::onStateChanged()
+{
updateIcon();
}
@@ -723,18 +729,18 @@
{
POINT pt;
GetCursorPos(&pt);
+ HMENU menu = NULL;
if (GetAsyncKeyState(VK_CONTROL)) {
- HMENU menu;
+ menu = debugMenu_;
+ } else if (buttonFlag == TPM_RIGHTBUTTON) {
+ updateMenu();
+ menu = oldMenu_;
+ }
+
+ if (menu != NULL) {
HMENU popupMenu;
- if (buttonFlag == TPM_RIGHTBUTTON) {
- menu = debugMenu_;
- } else {
- updateMenu();
- menu = oldMenu_;
- }
-
// We:
// - Set the foreground window to our (non-shown) window so that clicking
// away elsewhere works
Modified: mugshot-client/trunk/windows/HippoUI/HippoUI.h
===================================================================
--- mugshot-client/trunk/windows/HippoUI/HippoUI.h 2008-05-08 18:36:14 UTC (rev 7472)
+++ mugshot-client/trunk/windows/HippoUI/HippoUI.h 2008-05-09 18:08:17 UTC (rev 7473)
@@ -176,6 +176,7 @@
//// Signal handlers
void onConnectedChanged(gboolean connected);
+ void onStateChanged();
void onHasAuthChanged();
void onAuthFailed();
void onAuthSucceeded();
@@ -212,6 +213,7 @@
HippoStackManager *stack_;
GConnection1<void,gboolean> connectedChanged_;
+ GConnection0<void> stateChanged_;
GConnection0<void> authFailed_;
GConnection0<void> authSucceeded_;
GConnection0<void> hasAuthChanged_;
Modified: mugshot-client/trunk/windows/HippoUI/HippoUIUtil.cpp
===================================================================
--- mugshot-client/trunk/windows/HippoUI/HippoUIUtil.cpp 2008-05-08 18:36:14 UTC (rev 7472)
+++ mugshot-client/trunk/windows/HippoUI/HippoUIUtil.cpp 2008-05-09 18:08:17 UTC (rev 7473)
@@ -253,7 +253,8 @@
// want to know for the Mugshot browser window is whether when the user clicks on
// the mugshot icon, we should raise the window or instead hide it. And when the
// user clicks on the mugshot icon, the panel is the active window. So, what
- // we check here is if our window is the top window that isn't WS_EX_TOPMOST.
+ // we check here is if our window is the top visible window that isn't
+ // WS_EX_TOPMOST.
//
// In other uses, we could just do a simple check with GetWindowInfo(), but
// we'll just always do the same thing for now.
@@ -270,7 +271,7 @@
if (!GetWindowInfo(top, &windowInfo))
return FALSE;
- if ((windowInfo.dwExStyle & WS_EX_TOPMOST) == 0)
+ if ((windowInfo.dwExStyle & WS_EX_TOPMOST) == 0 && (windowInfo.dwStyle & WS_VISIBLE) != 0)
return FALSE;
top = GetNextWindow(top, GW_HWNDNEXT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]