/** * @brief Implementation of get_name from AtkObject * * @param object EailWeb instance * @returns first name from the following list which is not null: * accessible name, uri, title, or NULL if all strings were NULL */ static const gchar* eail_web_get_name(AtkObject *object) { Evas_Object *web; const gchar *atk_name = NULL; g_return_val_if_fail(EAIL_IS_WEB(object), NULL); atk_name = ATK_OBJECT_CLASS(eail_web_parent_class)->get_name(object); if (atk_name) return atk_name; web = eail_widget_get_widget(EAIL_WIDGET(object)); if (!web) return NULL; atk_name = elm_web_uri_get(web); if (atk_name) return atk_name; atk_name = elm_web_title_get(web); if (atk_name) return atk_name; return atk_name; }
void ActivityWebView::buttonCallback(void *data, Evas_Object *edje_object, string emission, string source) { if (source == "button.back") elm_web_back(web); else if (source == "button.forward") elm_web_forward(web); else if (source == "button.reload") elm_web_reload_full(web); else if (source == "button.stop") elm_web_stop(web); else if (source == "button.forward") elm_web_forward(web); else if (source == "button.home") goToCallback(DEFAULT_BROWSER_URL); else if (source == "button.go") { ApplicationMain::Instance().ShowKeyboard("Entrez une URL ci-dessous", sigc::mem_fun(*this, &ActivityWebView::goToCallback), false, elm_web_uri_get(web)); } else if (source == "button.bookmark") { string url = elm_web_uri_get(web); string _url = DEFAULT_BROWSER_URL; _url += "Bookmark.php?new=" + url_encode(url); _url += "&title=" + url_encode(elm_web_title_get(web)); _url += "&thumb_file=/tmp/thumb.png"; setDragValue("progress.level", 0.0, 0.0); setPartText("progress.text", "Saving..."); EmitSignal("saving,bookmark", "calaos"); FileDownloader *fdownloader = new FileDownloader(_url, "/dev/null", true); fdownloader->Start(); } }
void ActivityWebView::_webTitleChanged() { const char *t = elm_web_title_get(web); if (t) setPartText("page.title", t); }