diff options
author | Crispin Flowerday <gnome@flowerday.cx> | 2005-01-06 04:09:09 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-01-06 04:09:09 +0800 |
commit | a5d0e720fade615d0009a42d38b195a2db57b959 (patch) | |
tree | 680971bcad3fb63c103cdb282eba881d82aad6ba /embed/mozilla | |
parent | 41e8ca8d5152c7acf6e39070b49c8f3715110e8d (diff) | |
download | gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar.gz gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar.bz2 gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar.lz gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar.xz gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.tar.zst gsoc2013-epiphany-a5d0e720fade615d0009a42d38b195a2db57b959.zip |
Consistently start enum names with EPHY_*.
2005-01-05 Crispin Flowerday <gnome@flowerday.cx>
* embed/ephy-embed-event.c: (ephy_embed_event_context_get_type):
* embed/ephy-embed-event.h:
* embed/ephy-embed-persist.c: (ephy_embed_persist_flags_get_type):
* embed/ephy-embed-persist.h:
* embed/ephy-embed.c: (ephy_embed_net_state_get_type),
(ephy_embed_ppv_navigation_get_type),
(ephy_embed_security_level_get_type),
(ephy_embed_document_type_get_type):
* embed/ephy-embed.h:
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_download):
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
* embed/mozilla/mozilla-embed.cpp:
* src/ephy-shell.c: (ephy_shell_new_tab):
* src/ephy-tab.c: (ephy_tab_address_expire_get_type),
(ephy_tab_navigation_flags_get_type), (ephy_tab_set_property),
(ephy_tab_class_init), (ephy_tab_get_document_type),
(ephy_tab_address_cb), (update_net_state_message),
(build_progress_from_requests), (ensure_page_info),
(ephy_tab_net_state_cb), (ephy_tab_dom_mouse_click_cb),
(ephy_tab_init), (ephy_tab_update_navigation_flags),
(ephy_tab_set_location), (ephy_tab_get_security_level):
* src/ephy-tab.h:
* src/ephy-window.c: (sync_tab_document_type),
(sync_tab_navigation), (sync_tab_security), (sync_tab_zoom),
(update_popups_tooltips), (show_embed_popup):
* src/popup-commands.c: (popup_cmd_copy_link_address),
(save_property_url), (popup_cmd_set_image_as_background),
(save_temp_source):
* src/ppview-toolbar.c: (toolbar_cmd_ppv_goto_first),
(toolbar_cmd_ppv_goto_last), (toolbar_cmd_ppv_go_back),
(toolbar_cmd_ppv_go_forward):
* src/toolbar.c: (sync_user_input_cb):
* src/window-commands.c: (window_cmd_file_save_as),
(save_temp_source):
Consistently start enum names with EPHY_*.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 8 | ||||
-rw-r--r-- | embed/mozilla/EphyHeaderSniffer.cpp | 2 | ||||
-rw-r--r-- | embed/mozilla/EventContext.cpp | 28 | ||||
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 14 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-persist.cpp | 8 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 36 |
6 files changed, 48 insertions, 48 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 1b31ac383..b2c623a6b 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -1136,7 +1136,7 @@ EphyBrowser::ShowCertificate () EphyEmbedDocumentType EphyBrowser::GetDocumentType () { - EphyEmbedDocumentType type = EMBED_DOCUMENT_OTHER; + EphyEmbedDocumentType type = EPHY_EMBED_DOCUMENT_OTHER; NS_ENSURE_TRUE (mDOMWindow, type); @@ -1151,15 +1151,15 @@ EphyBrowser::GetDocumentType () if (xmlDoc) { - type = EMBED_DOCUMENT_XML; + type = EPHY_EMBED_DOCUMENT_XML; } else if (imgDoc) { - type = EMBED_DOCUMENT_IMAGE; + type = EPHY_EMBED_DOCUMENT_IMAGE; } else if (htmlDoc) { - type = EMBED_DOCUMENT_HTML; + type = EPHY_EMBED_DOCUMENT_HTML; } return type; diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index 88700e850..d751a6941 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -243,7 +243,7 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI) mOriginalURI = inOriginalURI; flags = ephy_embed_persist_get_flags (EPHY_EMBED_PERSIST (mEmbedPersist)); - askDownloadDest = flags & EMBED_PERSIST_ASK_DESTINATION; + askDownloadDest = flags & EPHY_EMBED_PERSIST_ASK_DESTINATION; nsEmbedString defaultFileName; diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index 1ed3e1b29..cdcaf39aa 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -212,7 +212,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, mEmbedEvent = info; - info->context = EMBED_CONTEXT_DOCUMENT; + info->context = EPHY_EMBED_CONTEXT_DOCUMENT; nsCOMPtr<nsIDOMNode> node = do_QueryInterface(EventTarget, &rv); if (NS_FAILED(rv) || !node) return NS_ERROR_FAILURE; @@ -232,7 +232,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, nsCOMPtr<nsIDOMXULDocument> xul_document = do_QueryInterface(domDoc); if (xul_document) { - info->context = EMBED_CONTEXT_NONE; + info->context = EPHY_EMBED_CONTEXT_NONE; return NS_ERROR_FAILURE; } @@ -257,7 +257,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, if (g_ascii_strcasecmp (tag.get(), "img") == 0) { - info->context |= EMBED_CONTEXT_IMAGE; + info->context |= EPHY_EMBED_CONTEXT_IMAGE; nsEmbedString img; nsCOMPtr <nsIDOMHTMLImageElement> image = @@ -274,7 +274,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, } else if (g_ascii_strcasecmp (tag.get(), "textarea") == 0) { - info->context |= EMBED_CONTEXT_INPUT; + info->context |= EPHY_EMBED_CONTEXT_INPUT; } else if (g_ascii_strcasecmp (tag.get(), "object") == 0) { @@ -291,7 +291,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, // MIME types are always lower case if (g_str_has_prefix (cValue.get(), "image/")) { - info->context |= EMBED_CONTEXT_IMAGE; + info->context |= EPHY_EMBED_CONTEXT_IMAGE; nsEmbedString img; @@ -306,7 +306,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, } else { - info->context = EMBED_CONTEXT_NONE; + info->context = EPHY_EMBED_CONTEXT_NONE; return NS_OK; } } @@ -361,7 +361,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, if (g_ascii_strcasecmp (cValue.get(), "simple") == 0) { - info->context |= EMBED_CONTEXT_LINK; + info->context |= EPHY_EMBED_CONTEXT_LINK; dom_elem->GetAttributeNS (nsEmbedString(xlinknsLiteral), nsEmbedString(hrefLiteral), value); @@ -410,13 +410,13 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, if (NS_SUCCEEDED (rv) && unescapedHref.Length()) { SetStringProperty ("email", unescapedHref.get()); - info->context |= EMBED_CONTEXT_EMAIL_LINK; + info->context |= EPHY_EMBED_CONTEXT_EMAIL_LINK; } } if (anchor && tmp.Length()) { - info->context |= EMBED_CONTEXT_LINK; + info->context |= EPHY_EMBED_CONTEXT_LINK; SetStringProperty ("link", tmp); CheckLinkScheme (tmp); @@ -473,12 +473,12 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, } else if (g_ascii_strcasecmp (tag.get(), "option") == 0) { - info->context = EMBED_CONTEXT_NONE; + info->context = EPHY_EMBED_CONTEXT_NONE; return NS_OK; } else if (g_ascii_strcasecmp (tag.get(), "area") == 0) { - info->context |= EMBED_CONTEXT_LINK; + info->context |= EPHY_EMBED_CONTEXT_LINK; nsCOMPtr <nsIDOMHTMLAreaElement> area = do_QueryInterface(node, &rv); if (NS_SUCCEEDED(rv) && area) @@ -498,7 +498,7 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, } else if (g_ascii_strcasecmp (tag.get(), "textarea") == 0) { - info->context |= EMBED_CONTEXT_INPUT; + info->context |= EPHY_EMBED_CONTEXT_INPUT; } if (!has_background) @@ -763,7 +763,7 @@ nsresult EventContext::CheckInput (nsIDOMNode *aNode) if (g_ascii_strcasecmp (value.get(), "image") == 0) { - mEmbedEvent->context |= EMBED_CONTEXT_IMAGE; + mEmbedEvent->context |= EPHY_EMBED_CONTEXT_IMAGE; nsCOMPtr<nsIDOMHTMLInputElement> input; input = do_QueryInterface (aNode); if (!input) return NS_ERROR_FAILURE; @@ -785,7 +785,7 @@ nsresult EventContext::CheckInput (nsIDOMNode *aNode) g_ascii_strcasecmp (value.get(), "button") != 0 && g_ascii_strcasecmp (value.get(), "checkbox") != 0) { - mEmbedEvent->context |= EMBED_CONTEXT_INPUT; + mEmbedEvent->context |= EPHY_EMBED_CONTEXT_INPUT; } return NS_OK; diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index ced33dc71..23c48fcd7 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -104,7 +104,7 @@ MozDownload::Init(nsIURI *aSource, nsIURI *aTarget, const PRUnichar *aDisplayNam flags = ephy_embed_persist_get_flags (EPHY_EMBED_PERSIST (mEmbedPersist)); - addToView = !(flags & EMBED_PERSIST_NO_VIEW); + addToView = !(flags & EPHY_EMBED_PERSIST_NO_VIEW); } mSource = aSource; @@ -312,7 +312,7 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, if (NS_FAILED(aStatus) && NS_SUCCEEDED(mStatus)) mStatus = aStatus; - if (aStateFlags & STATE_START) + if (aStateFlags & EPHY_EMBED_STATE_START) { mDownloadState = EPHY_DOWNLOAD_DOWNLOADING; @@ -323,7 +323,7 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, } /* We will get this even in the event of a cancel */ - if (aStateFlags & STATE_STOP) + if (aStateFlags & EPHY_EMBED_STATE_STOP) { /* Keep us alive */ nsCOMPtr<nsIDownload> kungFuDeathGrip(this); @@ -554,18 +554,18 @@ nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceURI PRInt32 flags = nsIWebBrowserPersist::PERSIST_FLAGS_REPLACE_EXISTING_FILES; - if (!domDocument && !isHTML && !(ephy_flags & EMBED_PERSIST_COPY_PAGE) && - !(ephy_flags & EMBED_PERSIST_DO_CONVERSION)) + if (!domDocument && !isHTML && !(ephy_flags & EPHY_EMBED_PERSIST_COPY_PAGE) && + !(ephy_flags & EPHY_EMBED_PERSIST_DO_CONVERSION)) { flags |= nsIWebBrowserPersist::PERSIST_FLAGS_NO_CONVERSION; } - if (ephy_flags & EMBED_PERSIST_COPY_PAGE) + if (ephy_flags & EPHY_EMBED_PERSIST_COPY_PAGE) { flags |= nsIWebBrowserPersist::PERSIST_FLAGS_FROM_CACHE; } webPersist->SetPersistFlags(flags); - if (!domDocument || !isHTML || ephy_flags & EMBED_PERSIST_COPY_PAGE) + if (!domDocument || !isHTML || ephy_flags & EPHY_EMBED_PERSIST_COPY_PAGE) { rv = webPersist->SaveURI (sourceURI, aCacheKey, nsnull, postData, nsnull, inDestFile); diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp index 5d8f9dc6c..f042f4cb9 100644 --- a/embed/mozilla/mozilla-embed-persist.cpp +++ b/embed/mozilla/mozilla-embed-persist.cpp @@ -153,7 +153,7 @@ impl_save (EphyEmbedPersist *persist) "max_size", &max_size, NULL); - g_return_val_if_fail (!(flags & EMBED_PERSIST_COPY_PAGE) + g_return_val_if_fail (!(flags & EPHY_EMBED_PERSIST_COPY_PAGE) || embed != NULL, FALSE); EphyBrowser *browser = NULL; @@ -218,7 +218,7 @@ impl_save (EphyEmbedPersist *persist) nsCOMPtr<nsIDOMDocument> DOMDocument; if (!uri) { - if (flags & EMBED_PERSIST_MAINDOC) + if (flags & EPHY_EMBED_PERSIST_MAINDOC) { browser->GetDocument (getter_AddRefs(DOMDocument)); } @@ -241,7 +241,7 @@ impl_save (EphyEmbedPersist *persist) * the page, which will possibly give a different page than the original which we * need for view source */ - NS_ENSURE_TRUE (!(flags & EMBED_PERSIST_COPY_PAGE) || pageDescriptor, FALSE); + NS_ENSURE_TRUE (!(flags & EPHY_EMBED_PERSIST_COPY_PAGE) || pageDescriptor, FALSE); if (filename == NULL) { @@ -300,7 +300,7 @@ impl_to_string (EphyEmbedPersist *persist) browser = (EphyBrowser *) _mozilla_embed_get_ephy_browser (MOZILLA_EMBED(embed)); g_assert (browser != NULL); - if (flags & EMBED_PERSIST_MAINDOC) + if (flags & EPHY_EMBED_PERSIST_MAINDOC) { rv = browser->GetDocument (getter_AddRefs(DOMDocument)); } diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 15ef2311c..7d6681fb4 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -637,7 +637,7 @@ impl_get_security_level (EphyEmbed *embed, { MozillaEmbedPrivate *mpriv = MOZILLA_EMBED (embed)->priv; - if (level) *level = STATE_IS_UNKNOWN; + if (level) *level = EPHY_EMBED_STATE_IS_UNKNOWN; if (description) *description = NULL; nsresult rv; @@ -836,7 +836,7 @@ mozilla_embed_net_state_all_cb (GtkMozEmbed *embed, const char *aURI, gint state, guint status, MozillaEmbed *membed) { - EphyEmbedNetState estate = EMBED_STATE_UNKNOWN; + EphyEmbedNetState estate = EPHY_EMBED_STATE_UNKNOWN; int i; struct @@ -846,15 +846,15 @@ mozilla_embed_net_state_all_cb (GtkMozEmbed *embed, const char *aURI, } conversion_map [] = { - { GTK_MOZ_EMBED_FLAG_START, EMBED_STATE_START }, - { GTK_MOZ_EMBED_FLAG_STOP, EMBED_STATE_STOP }, - { GTK_MOZ_EMBED_FLAG_REDIRECTING, EMBED_STATE_REDIRECTING }, - { GTK_MOZ_EMBED_FLAG_TRANSFERRING, EMBED_STATE_TRANSFERRING }, - { GTK_MOZ_EMBED_FLAG_NEGOTIATING, EMBED_STATE_NEGOTIATING }, - { GTK_MOZ_EMBED_FLAG_IS_REQUEST, EMBED_STATE_IS_REQUEST }, - { GTK_MOZ_EMBED_FLAG_IS_DOCUMENT, EMBED_STATE_IS_DOCUMENT }, - { GTK_MOZ_EMBED_FLAG_IS_NETWORK, EMBED_STATE_IS_NETWORK }, - { 0, EMBED_STATE_UNKNOWN } + { GTK_MOZ_EMBED_FLAG_START, EPHY_EMBED_STATE_START }, + { GTK_MOZ_EMBED_FLAG_STOP, EPHY_EMBED_STATE_STOP }, + { GTK_MOZ_EMBED_FLAG_REDIRECTING, EPHY_EMBED_STATE_REDIRECTING }, + { GTK_MOZ_EMBED_FLAG_TRANSFERRING, EPHY_EMBED_STATE_TRANSFERRING }, + { GTK_MOZ_EMBED_FLAG_NEGOTIATING, EPHY_EMBED_STATE_NEGOTIATING }, + { GTK_MOZ_EMBED_FLAG_IS_REQUEST, EPHY_EMBED_STATE_IS_REQUEST }, + { GTK_MOZ_EMBED_FLAG_IS_DOCUMENT, EPHY_EMBED_STATE_IS_DOCUMENT }, + { GTK_MOZ_EMBED_FLAG_IS_NETWORK, EPHY_EMBED_STATE_IS_NETWORK }, + { 0, EPHY_EMBED_STATE_UNKNOWN } }; for (i = 0; conversion_map[i].state != 0; i++) @@ -915,7 +915,7 @@ mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event, if (info->modifier == GDK_CONTROL_MASK) { - info->context = EMBED_CONTEXT_DOCUMENT; + info->context = EPHY_EMBED_CONTEXT_DOCUMENT; } nsCOMPtr<nsIDOMDocument> doc; @@ -1105,25 +1105,25 @@ mozilla_embed_security_level (PRUint32 state) switch (state) { case nsIWebProgressListener::STATE_IS_INSECURE: - level = STATE_IS_INSECURE; + level = EPHY_EMBED_STATE_IS_INSECURE; break; case nsIWebProgressListener::STATE_IS_BROKEN: - level = STATE_IS_BROKEN; + level = EPHY_EMBED_STATE_IS_BROKEN; break; case nsIWebProgressListener::STATE_IS_SECURE| nsIWebProgressListener::STATE_SECURE_HIGH: - level = STATE_IS_SECURE_HIGH; + level = EPHY_EMBED_STATE_IS_SECURE_HIGH; break; case nsIWebProgressListener::STATE_IS_SECURE| nsIWebProgressListener::STATE_SECURE_MED: - level = STATE_IS_SECURE_MED; + level = EPHY_EMBED_STATE_IS_SECURE_MED; break; case nsIWebProgressListener::STATE_IS_SECURE| nsIWebProgressListener::STATE_SECURE_LOW: - level = STATE_IS_SECURE_LOW; + level = EPHY_EMBED_STATE_IS_SECURE_LOW; break; default: - level = STATE_IS_UNKNOWN; + level = EPHY_EMBED_STATE_IS_UNKNOWN; break; } return level; |