ABS warning has been removed.
authorgadomska_anna <gadomska.anna@gmail.com>
Mon, 12 Feb 2007 11:56:56 +0000 (11:56 +0000)
committergadomska_anna <gadomska.anna@gmail.com>
Mon, 12 Feb 2007 11:56:56 +0000 (11:56 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@75 5bde0345-f819-0410-ac75-e5045f9217cc

src/gui/include/ws_gui.h
src/gui/src/ws_gui_callbacks.c

index be63b84..bfe84d0 100644 (file)
@@ -68,7 +68,7 @@ extern "C" {
 #include <locale.h>
 
 #define _(String) gettext (String)
-#define ABS(x) ((x)<0.0)?((-1)*(x)):(x)
+#define WS_GUI_ABS(x) (((x)<0.0)?((-1)*(x)):(x))
 
 void html_engine_unselect_all(HTMLEngine   *e);
 void html_engine_block_selection (HTMLEngine   *e);
index 701f64b..fc90055 100644 (file)
@@ -1130,7 +1130,7 @@ void ws_gui_html_zoom_in(GtkMenuItem *menuitem, gpointer user_data)
                gtk_html_set_magnification(GTK_HTML(ws_gui_app->ws_gui_html), 
                                                ws_gui_app->zoom);
 
-               if ((ABS(ws_gui_app->zoom - ZOOM_DEFAULT)) < 0.000001)
+               if ((WS_GUI_ABS(ws_gui_app->zoom - ZOOM_DEFAULT)) < 0.000001)
                {
                        gtk_infoprint(GTK_WINDOW(
                                        ws_gui_app->ws_gui_hildon_window),
@@ -1167,7 +1167,7 @@ void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data)
                gtk_html_set_magnification(GTK_HTML(ws_gui_app->ws_gui_html), 
                                                ws_gui_app->zoom);
                
-               if ((ABS(ws_gui_app->zoom - ZOOM_DEFAULT)) < 0.000001)
+               if ((WS_GUI_ABS(ws_gui_app->zoom - ZOOM_DEFAULT)) < 0.000001)
                {
                        gtk_infoprint(GTK_WINDOW(
                                        ws_gui_app->ws_gui_hildon_window),
@@ -1180,9 +1180,6 @@ void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data)
                                        _("ws_ib_zoom_out"));
                }
        }
-
-       g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "\n\n[][][]GUI[][][]\nhtml flag: %d",
-               ws_gui_app->html_flag);
 }
 
 /** start searching, send typed word to DBUS and query for words
@@ -1194,7 +1191,6 @@ void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data)
 void ws_gui_search(GtkWidget * widget, gpointer user_data) 
 {
         WSGuiApp* ws_gui_app = (WSGuiApp*)user_data;
-        
 
         if (ws_gui_app->ws_gui_banner_flag == FALSE) 
        {
@@ -1656,7 +1652,7 @@ void ws_gui_dictionary_open_bookmark(GtkMenuItem *menuitem, gpointer user_data)
                                       NULL);
        ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_BOOKMARK_MODE_ON);
        
-       if(ws_gui_app->ws_gui_history->len > 0)
+       if(ws_gui_app->ws_gui_history->len >= 0)
        {
        ws_gui_app->ws_gui_history = g_array_remove_range(
                                        ws_gui_app->ws_gui_history, 
@@ -1702,7 +1698,7 @@ void ws_gui_dictionary_close_bookmark(GtkMenuItem *menuitem, gpointer user_data)
        ws_gui_set_bookmarks_sensitivity(ws_gui_app);   
        ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_BOOKMARK_MODE_OFF);
 
-       if(ws_gui_app->ws_gui_history->len > 0)
+       if(ws_gui_app->ws_gui_history->len >= 0)
        {
        ws_gui_app->ws_gui_history = g_array_remove_range(
        ws_gui_app->ws_gui_history, 0, ws_gui_app->ws_gui_history->len);