summaryrefslogtreecommitdiffstats
path: root/WebKit/efl/EWebLauncher
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-06-03 14:33:32 +0100
committerLeon Clarke <leonclarke@google.com>2010-06-08 12:24:51 +0100
commit5af96e2c7b73ebc627c6894727826a7576d31758 (patch)
treef9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebKit/efl/EWebLauncher
parent8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff)
downloadexternal_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz
external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebKit/efl/EWebLauncher')
-rw-r--r--WebKit/efl/EWebLauncher/main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/WebKit/efl/EWebLauncher/main.c b/WebKit/efl/EWebLauncher/main.c
index b0c64bf..d36c807 100644
--- a/WebKit/efl/EWebLauncher/main.c
+++ b/WebKit/efl/EWebLauncher/main.c
@@ -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;
@@ -733,6 +744,7 @@ main(int argc, char *argv[])
snprintf(path, sizeof(path), "%s/.ewebkit-%u", tmp, getuid());
ecore_file_mkpath(path);
ewk_settings_icon_database_path_set(path);
+ ewk_settings_web_database_path_set(path);
browserCreate(url, theme, userAgent, geometry, engine, isFullscreen);
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, &windows);