aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-12-08 02:15:33 +0800
committerChristian Persch <chpe@src.gnome.org>2005-12-08 02:15:33 +0800
commit71b468b05580953e70aabce5b68586ed8967c71c (patch)
treee20cf2a7889bd3555d7466a6543565c3969d5e85 /embed
parentc92bf4456143bc5e230bd0153d4bc938b68fddfc (diff)
downloadgsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar.gz
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar.bz2
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar.lz
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar.xz
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.tar.zst
gsoc2013-epiphany-71b468b05580953e70aabce5b68586ed8967c71c.zip
Minor code cleanup.
2005-12-07 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyFind.cpp: Minor code cleanup. * src/ephy-find-toolbar.c: (entry_key_press_event_cb), (ephy_find_toolbar_close): Also check for GDK_ISO_Enter. * src/ephy-window.c: (sync_tab_address): Close the find toolbar when loading a new page.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyFind.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/embed/mozilla/EphyFind.cpp b/embed/mozilla/EphyFind.cpp
index 1eab78c34..c1625cc8c 100644
--- a/embed/mozilla/EphyFind.cpp
+++ b/embed/mozilla/EphyFind.cpp
@@ -160,7 +160,7 @@ void
EphyFind::SetSelectionAttention (PRBool aAttention)
{
#ifdef HAVE_TYPEAHEADFIND
- if (aAttention && mAttention) return;
+ if (aAttention == mAttention) return;
mAttention = aAttention;
@@ -187,12 +187,10 @@ EphyFind::SetSelectionAttention (PRBool aAttention)
PRBool hasMore = PR_FALSE;
while (NS_SUCCEEDED (enumerator->HasMoreElements (&hasMore)) && hasMore) {
nsCOMPtr<nsISupports> element;
- nsCOMPtr<nsISelectionDisplay> sd;
-
enumerator->GetNext (getter_AddRefs (element));
if (!element) continue;
- sd = do_GetInterface (element);
+ nsCOMPtr<nsISelectionDisplay> sd (do_GetInterface (element));
if (!sd) continue;
nsCOMPtr<nsISelectionController> controller (do_QueryInterface (sd));
@@ -270,7 +268,7 @@ EphyFind::ActivateLink (GdkModifierType aMask)
nsCOMPtr<nsIDOMElement> link;
#if defined(HAVE_TYPEAHEADFIND) && defined(HAVE_GECKO_1_8)
rv = mFinder->GetFoundLink (getter_AddRefs (link));
- NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && link, FALSE);
+ if (NS_FAILED (rv) || !link) return FALSE;
#else
nsCOMPtr<nsIWebBrowserFocus> focus (do_QueryInterface (mWebBrowser));
NS_ENSURE_TRUE (focus, FALSE);
@@ -279,6 +277,7 @@ EphyFind::ActivateLink (GdkModifierType aMask)
NS_ENSURE_TRUE (NS_SUCCEEDED (rv) && link, FALSE);
/* ensure this is really a link so we don't accidentally submit if we're on a button or so! */
+ /* FIXME: does that work with xlink links? */
nsCOMPtr<nsIDOMHTMLAnchorElement> anchor (do_QueryInterface (link));
if (!anchor) return FALSE;
#endif /* HAVE_TYPEAHEADFIND && HAVE_GECKO_1_8 */
@@ -311,6 +310,7 @@ EphyFind::ActivateLink (GdkModifierType aMask)
(aMask & GDK_CONTROL_MASK) != 0,
(aMask & GDK_MOD1_MASK) != 0 /* Alt */,
(aMask & GDK_SHIFT_MASK) != 0,
+ /* FIXME when we upgrade to gtk 2.10 */
PR_FALSE /* Meta */,
nsIDOMKeyEvent::DOM_VK_RETURN,
0);