Modified: trunk/Tools/EWebLauncher/main.c (148661 => 148662)
--- trunk/Tools/EWebLauncher/main.c 2013-04-18 09:24:44 UTC (rev 148661)
+++ trunk/Tools/EWebLauncher/main.c 2013-04-18 09:47:36 UTC (rev 148662)
@@ -56,7 +56,7 @@
#define info(format, args...) \
do { \
if (verbose) \
- printf(format, ##args); \
+ printf(format"\n", ##args); \
} while (0)
#define MIN_ZOOM_LEVEL 0
@@ -323,16 +323,16 @@
const Ewk_Frame_Load_Error *err = (const Ewk_Frame_Load_Error *)event_info;
if (!err)
- info("Succeeded loading page.\n");
+ info("Succeeded loading page.");
else if (err->is_cancellation)
- info("Load was cancelled.\n");
+ info("Load was cancelled.");
else
- info("Failed loading page: %d %s \"%s\", url=""
+ info("Failed loading page: %d %s \"%s\", url=""
err->code, err->domain, err->description, err->failing_url);
currentZoom = ewk_view_zoom_get(webview);
currentZoomLevel = nearest_zoom_level_get(currentZoom);
- info("WebCore Zoom=%f, currentZoomLevel=%d\n", currentZoom, currentZoomLevel);
+ info("WebCore Zoom=%f, currentZoomLevel=%d", currentZoom, currentZoomLevel);
}
static void
@@ -429,13 +429,13 @@
on_tooltip_text_set(void* user_data, Evas_Object* webview, void* event_info)
{
const char *text = (const char *)event_info;
- info("Tooltip is set: %s\n", text);
+ info("Tooltip is set: %s", text);
}
static void
on_tooltip_text_unset(void* user_data, Evas_Object* webview, void* event_info)
{
- info("Tooltip is unset\n");
+ info("Tooltip is unset");
}
static void
@@ -443,13 +443,13 @@
{
Eina_Bool active = (Eina_Bool)(long)event_info;
unsigned int imh;
- info("Keyboard changed: %d\n", active);
+ info("Keyboard changed: %d", active);
if (!active)
return;
imh = ewk_view_imh_get(webview);
- info(" Keyboard flags: %#.2x\n", imh);
+ info(" Keyboard flags: %#.2x", imh);
}
@@ -474,13 +474,13 @@
static void
on_focus_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- info("the webview lost keyboard focus\n");
+ info("the webview lost keyboard focus");
}
static void
on_focus_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- info("the webview gained keyboard focus\n");
+ info("the webview gained keyboard focus");
}
static void
@@ -499,7 +499,7 @@
if (!strcmp(ev->key, "Escape")) {
closeWindow(app->ee);
} else if (!strcmp(ev->key, "F1")) {
- info("Back (F1) was pressed\n");
+ info("Back (F1) was pressed");
if (ewk_view_back_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_back_list_get(history);
@@ -507,9 +507,9 @@
ewk_history_item_list_free(list);
ewk_view_back(obj);
} else
- info("Back ignored: No back history\n");
+ info("Back ignored: No back history");
} else if (!strcmp(ev->key, "F2")) {
- info("Forward (F2) was pressed\n");
+ info("Forward (F2) was pressed");
if (ewk_view_forward_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_forward_list_get(history);
@@ -517,7 +517,7 @@
ewk_history_item_list_free(list);
ewk_view_forward(obj);
} else
- info("Forward ignored: No forward history\n");
+ info("Forward ignored: No forward history");
} else if (!strcmp(ev->key, "F3")) {
currentEncoding++;
currentEncoding %= (sizeof(encodings) / sizeof(encodings[0]));
@@ -570,29 +570,29 @@
}
} else if (!strcmp(ev->key, "F5")) {
- info("Reload (F5) was pressed, reloading.\n");
+ info("Reload (F5) was pressed, reloading.");
ewk_view_reload(obj);
} else if (!strcmp(ev->key, "F6")) {
- info("Stop (F6) was pressed, stop loading.\n");
+ info("Stop (F6) was pressed, stop loading.");
ewk_view_stop(obj);
} else if (!strcmp(ev->key, "F12")) {
Eina_Bool status = ewk_view_setting_spatial_navigation_get(obj);
ewk_view_setting_spatial_navigation_set(obj, !status);
- info("Command::keyboard navigation toggle\n");
+ info("Command::keyboard navigation toggle");
} else if ((!strcmp(ev->key, "minus") || !strcmp(ev->key, "KP_Subtract")) && ctrlPressed) {
if (currentZoomLevel > MIN_ZOOM_LEVEL && zoom_level_set(obj, currentZoomLevel - 1))
currentZoomLevel--;
- info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if ((!strcmp(ev->key, "equal") || !strcmp(ev->key, "KP_Add")) && ctrlPressed) {
if (currentZoomLevel < MAX_ZOOM_LEVEL && zoom_level_set(obj, currentZoomLevel + 1))
currentZoomLevel++;
- info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if (!strcmp(ev->key, "0") && ctrlPressed) {
if (zoom_level_set(obj, DEFAULT_ZOOM_LEVEL))
currentZoomLevel = DEFAULT_ZOOM_LEVEL;
- info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if (!strcmp(ev->key, "n") && ctrlPressed) {
- info("Create new window (Ctrl+n) was pressed.\n");
+ info("Create new window (Ctrl+n) was pressed.");
browserCreate("http://www.google.com", app->userArgs);
} else if (!strcmp(ev->key, "g") && ctrlPressed ) {
Evas_Coord x, y, w, h;
@@ -604,7 +604,7 @@
y -= h;
w *= 4;
h *= 4;
- info("Pre-render %d,%d + %dx%d\n", x, y, w, h);
+ info("Pre-render %d,%d + %dx%d", x, y, w, h);
ewk_view_pre_render_region(obj, x, y, w, h, zoom);
} else if (!strcmp(ev->key, "r") && ctrlPressed) {
info("Pre-render 1 extra column/row with current zoom");
@@ -652,10 +652,10 @@
} else if (!strcmp(ev->key, "i") && ctrlPressed) {
Evas_Object *inspector_view = ewk_view_inspector_view_get(obj);
if (inspector_view) {
- info("Web Inspector close\n");
+ info("Web Inspector close");
ewk_view_inspector_close(obj);
} else {
- info("Web Inspector show\n");
+ info("Web Inspector show");
ewk_view_inspector_show(obj);
}
}
@@ -846,10 +846,10 @@
if (userArgs->backingStore && !strcasecmp(userArgs->backingStore, "tiled")) {
app->browser = ewk_view_tiled_add(app->evas);
- info("backing store: tiled\n");
+ info("backing store: tiled");
} else {
app->browser = ewk_view_single_add(app->evas);
- info("backing store: single\n");
+ info("backing store: single");
ewk_view_setting_tiled_backing_store_enabled_set(app->browser, userArgs->enableTiledBackingStore);
}
Modified: trunk/Tools/MiniBrowser/efl/main.c (148661 => 148662)
--- trunk/Tools/MiniBrowser/efl/main.c 2013-04-18 09:24:44 UTC (rev 148661)
+++ trunk/Tools/MiniBrowser/efl/main.c 2013-04-18 09:47:36 UTC (rev 148662)
@@ -39,7 +39,7 @@
#define info(format, args...) \
do { \
if (verbose) \
- printf(format, ##args); \
+ printf(format"\n", ##args); \
} while (0)
static int verbose = 1;
@@ -326,47 +326,47 @@
Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
if (!strcmp(ev->key, "F1")) {
- info("Back (F1) was pressed\n");
+ info("Back (F1) was pressed");
if (!ewk_view_back(ewk_view))
- info("Back ignored: No back history\n");
+ info("Back ignored: No back history");
} else if (!strcmp(ev->key, "F2")) {
- info("Forward (F2) was pressed\n");
+ info("Forward (F2) was pressed");
if (!ewk_view_forward(ewk_view))
- info("Forward ignored: No forward history\n");
+ info("Forward ignored: No forward history");
} else if (!strcmp(ev->key, "F3")) {
currentEncoding = (currentEncoding + 1) % (sizeof(encodings) / sizeof(encodings[0]));
info("Set encoding (F3) pressed. New encoding to %s", encodings[currentEncoding]);
ewk_view_custom_encoding_set(ewk_view, encodings[currentEncoding]);
} else if (!strcmp(ev->key, "F5")) {
- info("Reload (F5) was pressed, reloading.\n");
+ info("Reload (F5) was pressed, reloading.");
ewk_view_reload(ewk_view);
} else if (!strcmp(ev->key, "F6")) {
- info("Stop (F6) was pressed, stop loading.\n");
+ info("Stop (F6) was pressed, stop loading.");
ewk_view_stop(ewk_view);
} else if (!strcmp(ev->key, "F7")) {
Ewk_Pagination_Mode mode = ewk_view_pagination_mode_get(ewk_view);
mode = (++mode) % (EWK_PAGINATION_MODE_BOTTOM_TO_TOP + 1);
if (ewk_view_pagination_mode_set(ewk_view, mode))
- info("Change Pagination Mode (F7) was pressed, changed to: %d\n", mode);
+ info("Change Pagination Mode (F7) was pressed, changed to: %d", mode);
else
info("Change Pagination Mode (F7) was pressed, but NOT changed!");
} else if (!strcmp(ev->key, "F8")) {
- info("Create souce code window (F8) was pressed.\n");
+ info("Create souce code window (F8) was pressed.");
Browser_Window *window = window_create(ewk_view, ewk_view_url_get(ewk_view), 0, 0, EINA_TRUE);
windows = eina_list_append(windows, window);
} else if (!strcmp(ev->key, "F11")) {
- info("Fullscreen (F11) was pressed, toggling window/fullscreen.\n");
+ info("Fullscreen (F11) was pressed, toggling window/fullscreen.");
elm_win_fullscreen_set(window->elm_window, !elm_win_fullscreen_get(window->elm_window));
} else if (!strcmp(ev->key, "n") && ctrlPressed) {
- info("Create new window (Ctrl+n) was pressed.\n");
+ info("Create new window (Ctrl+n) was pressed.");
Browser_Window *window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE);
// 0 equals default width and height.
windows = eina_list_append(windows, window);
} else if (!strcmp(ev->key, "i") && ctrlPressed) {
- info("Show Inspector (Ctrl+i) was pressed.\n");
+ info("Show Inspector (Ctrl+i) was pressed.");
ewk_view_inspector_show(ewk_view);
} else if (!strcmp(ev->key, "f") && ctrlPressed) {
- info("Show Search Box (Ctrl+f) was pressed.\n");
+ info("Show Search Box (Ctrl+f) was pressed.");
search_box_show(window);
} else if (!strcmp(ev->key, "Escape")) {
if (evas_object_visible_get(window->search.search_bar))
@@ -376,15 +376,15 @@
} else if (ctrlPressed && (!strcmp(ev->key, "minus") || !strcmp(ev->key, "KP_Subtract"))) {
if (zoom_level_set(ewk_view, window->current_zoom_level - 1))
window->current_zoom_level--;
- info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f\n", zoomLevels[window->current_zoom_level]);
+ info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
} else if (ctrlPressed && (!strcmp(ev->key, "equal") || !strcmp(ev->key, "KP_Add"))) {
if (zoom_level_set(ewk_view, window->current_zoom_level + 1))
window->current_zoom_level++;
- info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f\n", zoomLevels[window->current_zoom_level]);
+ info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
} else if (ctrlPressed && !strcmp(ev->key, "0")) {
if (zoom_level_set(ewk_view, DEFAULT_ZOOM_LEVEL))
window->current_zoom_level = DEFAULT_ZOOM_LEVEL;
- info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f\n", zoomLevels[window->current_zoom_level]);
+ info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
}
}
@@ -510,7 +510,7 @@
}
ewk_download_job_destination_set(download, eina_strbuf_string_get(destination_path));
- info("Downloading: %s\n", eina_strbuf_string_get(destination_path));
+ info("Downloading: %s", eina_strbuf_string_get(destination_path));
eina_strbuf_free(destination_path);
}
@@ -585,13 +585,13 @@
on_download_finished(void *user_data, Evas_Object *ewk_view, void *event_info)
{
Ewk_Download_Job *download = (Ewk_Download_Job *)event_info;
- info("Download finished: %s\n", ewk_download_job_destination_get(download));
+ info("Download finished: %s", ewk_download_job_destination_get(download));
}
static void
on_download_failed(void *user_data, Evas_Object *ewk_view, void *event_info)
{
- info("Download failed!\n");
+ info("Download failed!");
}
static void
@@ -753,10 +753,10 @@
Evas *evas = evas_object_evas_get(refresh_button);
Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control");
if (ctrlPressed) {
- info("Reloading and bypassing cache...\n");
+ info("Reloading and bypassing cache...");
ewk_view_reload_bypass_cache(window->ewk_view);
} else {
- info("Reloading...\n");
+ info("Reloading...");
ewk_view_reload(window->ewk_view);
}
}
@@ -896,7 +896,7 @@
on_popup_menu_discarded(void *user_data, Evas_Object *obj, void *event_info)
{
// The user clicked outside the menu to discard it.
- info("Popup menu was discarded.\n");
+ info("Popup menu was discarded.");
Browser_Window *window = (Browser_Window *)user_data;
ewk_popup_menu_close(window->popup.ewk_menu);
}
@@ -907,7 +907,7 @@
Browser_Window *window = (Browser_Window *)user_data;
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- info("Selected popup menu index: %u\n", elm_menu_item_index_get(item));
+ info("Selected popup menu index: %u", elm_menu_item_index_get(item));
ewk_popup_menu_selected_index_set(window->popup.ewk_menu, elm_menu_item_index_get(item));
// Close popup menu.
@@ -941,7 +941,7 @@
}
break;
default:
- info("Unrecognized popup menu item type!\n");
+ info("Unrecognized popup menu item type!");
break;
}
}
@@ -961,7 +961,7 @@
popup_menu_populate(window->popup.elm_menu, ewk_menu, window);
- info("Showing popup menu at (%d, %d)\n", rect.x, rect.y);
+ info("Showing popup menu at (%d, %d)", rect.x, rect.y);
elm_menu_move(window->popup.elm_menu, rect.x, rect.y);
evas_object_show(window->popup.elm_menu);
@@ -1092,7 +1092,7 @@
windows = eina_list_append(windows, window);
- info("minibrowser: location(%d,%d) size=(%d,%d) url="" x, y, width, height, url);
+ info("minibrowser: location(%d,%d) size=(%d,%d) url="" x, y, width, height, url);
return new_view;
}
@@ -1111,12 +1111,12 @@
context_popup_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
{
if (!data) {
- info("ERROR: context popup callback data is NULL.\n");
+ info("ERROR: context popup callback data is NULL.");
return;
}
Ewk_Context_Menu_Item *ewk_item = (Ewk_Context_Menu_Item *)data;
- info("Selected context popup item: %s.\n", ewk_context_menu_item_title_get(ewk_item));
+ info("Selected context popup item: %s.", ewk_context_menu_item_title_get(ewk_item));
ewk_context_menu_item_select(ewk_context_menu_item_parent_menu_get(ewk_item), ewk_item);
ewk_context_menu_hide(ewk_context_menu_item_parent_menu_get(ewk_item));
}
@@ -1157,20 +1157,20 @@
Browser_Window *window = window_find_with_ewk_view(sd->self);
if (!window || !menu) {
- info("ERROR: necessary objects are NULL.\n");
+ info("ERROR: necessary objects are NULL.");
return EINA_FALSE;
}
window->context_popup = elm_ctxpopup_add(window->elm_window);
if (!window->context_popup) {
- info("ERROR: could not create context popup widget.\n");
+ info("ERROR: could not create context popup widget.");
return EINA_FALSE;
}
context_popup_populate(window, menu);
- info("Showing context popup at (%d, %d).\n", x, y);
+ info("Showing context popup at (%d, %d).", x, y);
evas_object_move(window->context_popup, x, y);
evas_object_show(window->context_popup);
@@ -1183,7 +1183,7 @@
Browser_Window *window = window_find_with_ewk_view(sd->self);
if (!window || !window->context_popup) {
- info("ERROR: necessary objects are NULL.\n");
+ info("ERROR: necessary objects are NULL.");
return EINA_FALSE;
}
@@ -1376,7 +1376,7 @@
{
Browser_Window *window = calloc(1, sizeof(Browser_Window));
if (!window) {
- info("ERROR: could not create browser window.\n");
+ info("ERROR: could not create browser window.");
return NULL;
}
@@ -1540,7 +1540,7 @@
ewk_settings_encoding_detector_enabled_set(settings, encoding_detector_enabled);
ewk_settings_frame_flattening_enabled_set(settings, frame_flattening_enabled);
ewk_settings_local_storage_enabled_set(settings, local_storage_enabled);
- info("HTML5 local storage is %s for this view.\n", local_storage_enabled ? "enabled" : "disabled");
+ info("HTML5 local storage is %s for this view.", local_storage_enabled ? "enabled" : "disabled");
elm_win_fullscreen_set(window->elm_window, fullscreen_enabled);
ewk_settings_developer_extras_enabled_set(settings, EINA_TRUE);
ewk_settings_preferred_minimum_contents_width_set(settings, 0);