Commit 5edb1b76 authored by eric@webkit.org's avatar eric@webkit.org

2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>

        Reviewed by Kenneth Rohde Christiansen.

        [EFL] Remove compiler warnings about uninitialized variable.
        https://bugs.webkit.org/show_bug.cgi?id=39871

        No new tests, just cosmetic changes.

        * platform/efl/WidgetEfl.cpp:
        (WebCore::Widget::applyCursor):
2010-05-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>

        Reviewed by Kenneth Rohde Christiansen.

        [EF] Remove compiler warnings and add test for switching page
        encoding.
        https://bugs.webkit.org/show_bug.cgi?id=39871

        * efl/EWebLauncher/main.c:
        (print_history):
        (on_key_down):
        (main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ed8b5209
2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[EFL] Remove compiler warnings about uninitialized variable.
https://bugs.webkit.org/show_bug.cgi?id=39871
No new tests, just cosmetic changes.
* platform/efl/WidgetEfl.cpp:
(WebCore::Widget::applyCursor):
2010-05-28 Vangelis Kokkevis <vangelis@chromium.org>
Reviewed by Dimitri Glazkov.
......
......@@ -228,7 +228,7 @@ void Widget::applyFallbackCursor()
void Widget::applyCursor()
{
const char *file;
const char *file = 0;
Evas_Coord x, y;
String theme = edjeThemeRecursive();
......@@ -236,7 +236,7 @@ void Widget::applyCursor()
file = edjeThemeRecursive().utf8().data();
m_data->m_cursorObject = edje_object_add(evas());
if (!edje_object_file_set(m_data->m_cursorObject, file, m_data->m_cursorGroup.utf8().data())) {
if (file && !edje_object_file_set(m_data->m_cursorObject, file, m_data->m_cursorGroup.utf8().data())) {
evas_object_del(m_data->m_cursorObject);
m_data->m_cursorObject = 0;
ecore_evas_object_cursor_set(ecoreEvas(), 0, 0, 0, 0);
......
2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[EF] Remove compiler warnings and add test for switching page
encoding.
https://bugs.webkit.org/show_bug.cgi?id=39871
* efl/EWebLauncher/main.c:
(print_history):
(on_key_down):
(main):
2010-05-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -153,8 +153,8 @@ print_history(Eina_List *list)
Ewk_History_Item *item = (Ewk_History_Item*)d;
cairo_surface_t *cs = ewk_history_item_icon_surface_get(item);
char buf[PATH_MAX];
ssize_t s = snprintf(buf, sizeof(buf), "/tmp/favicon-%s.png", ewk_history_item_uri_original_get(item));
for (s--; s >= sizeof("/tmp/favicon-"); s--) {
int s = snprintf(buf, sizeof(buf), "/tmp/favicon-%s.png", ewk_history_item_uri_original_get(item));
for (s--; s >= (int)sizeof("/tmp/favicon-"); s--) {
if (!isalnum(buf[s]) && buf[s] != '.')
buf[s] = '_';
}
......@@ -378,6 +378,12 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
ELauncher *app = data;
static const char *encodings[] = {
"ISO-8859-1",
"UTF-8",
NULL
};
static int currentEncoding = -1;
if (!strcmp(ev->key, "Escape")) {
closeWindow(app->ee);
......@@ -401,6 +407,11 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
ewk_view_forward(obj);
} else
info("Forward ignored: No forward history\n");
} else if (!strcmp(ev->key, "F3")) {
currentEncoding++;
currentEncoding %= (sizeof(encodings) / sizeof(encodings[0]));
info("Set encoding (F3) pressed. New encoding to %s", encodings[currentEncoding]);
ewk_view_setting_encoding_custom_set(obj, encodings[currentEncoding]);
} else if (!strcmp(ev->key, "F4")) {
Evas_Object *frame = ewk_view_frame_main_get(obj);
Evas_Coord x, y;
......@@ -672,7 +683,7 @@ main(int argc, char *argv[])
Eina_Rectangle geometry = {0, 0, 0, 0};
char *url = NULL;
char *userAgent = NULL;
char *tmp;
const char *tmp;
char path[PATH_MAX];
char *engine = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment