problem with magnification fixed;
authorgadomska_anna <gadomska.anna@gmail.com>
Mon, 12 Feb 2007 10:23:56 +0000 (10:23 +0000)
committergadomska_anna <gadomska.anna@gmail.com>
Mon, 12 Feb 2007 10:23:56 +0000 (10:23 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@71 5bde0345-f819-0410-ac75-e5045f9217cc

data/locale/es.po
src/gui/include/ws_gui.h
src/gui/src/ws_gui_callbacks.c

index 4e700e1..ad22928 100644 (file)
@@ -294,11 +294,11 @@ msgstr "Seleccione la palabra a eliminar"
 
 #: ../gui/src/ws_gui_callbacks.c:1128
 msgid "ws_ib_max_zoom"
-msgstr "Max zoom level reached"
+msgstr "Máximo nivel de zoom"
 
 #: ../gui/src/ws_gui_callbacks.c:1152
 msgid "ws_ib_min_zoom"
-msgstr "Min zoom level reached"
+msgstr "Mínimo nivel de zoom"
 
 #: ../gui/src/ws_gui_callbacks.c:1161
 msgid "ws_ib_zoom_in"
@@ -314,20 +314,20 @@ msgstr "Pantalla completa"
 
 #: ../gui/src/ws_gui_callbacks.c:1029
 msgid "ws_ib_fullscreen_off"
-msgstr "Fullscreen off"
+msgstr "Salir de pantalla completa"
 
 #: ../gui/src/ws_gui_callbacks.c:1124
 #: ../gui/src/ws_gui_callbacks.c:1157
 msgid "ws_ib_zoom_default"
-msgstr "Default Zoom"
+msgstr "Nivel de zoom por defecto"
 
 #: ../gui/src/ws_gui_callbacks.c:1069
 msgid "ws_ib_copied"
-msgstr "Copied."
+msgstr "Copiado."
 
 #: ../gui/src/ws_gui_callbacks.c:1096
 msgid "ws_ib_pasted"
-msgstr "Pasted."
+msgstr "Pegado."
 
 #: ../gui/src/ws_gui_callbacks.c:268
 msgid "ws_ni_bookmarks_unavailable"
index 5baa6a3..20234fb 100644 (file)
@@ -52,10 +52,10 @@ extern "C" {
 #include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
-#define ZOOM_MIN 1
-#define ZOOM_MAX 4
-#define ZOOM_STEP 0.1
-#define ZOOM_DEFAULT 1.3
+#define ZOOM_MIN 1.000000
+#define ZOOM_MAX 2.000000
+#define ZOOM_STEP 0.100000
+#define ZOOM_DEFAULT 1.300000
 #define PRESS_TIME 1.0
 #define HISTORY_LEN 5
 #define SCROLL_STEP_H 50
@@ -63,10 +63,12 @@ extern "C" {
 #define GCONF_PATH "/apps/maemo/WhiteStork/Dictionaries"
 #define GCONF_CONF "/apps/maemo/WhiteStork/configuration"
 
+
 #include <libintl.h>
 #include <locale.h>
 
 #define _(String) gettext (String)
+#define ABS(x) ((x)<0.0)?((-1)*(x)):(x)
 
 void html_engine_unselect_all(HTMLEngine   *e);
 void html_engine_block_selection (HTMLEngine   *e);
index 8306214..83511aa 100644 (file)
@@ -344,6 +344,7 @@ void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data)
 
         ws_gui_app->ws_gui_w_list->ws_gui_model = 
                                         create_and_fill_model(tmp, ws_gui_app);
+       
        if (ws_gui_app->history_flag == TRUE)
        {
        gtk_tree_model_get_iter_from_string
@@ -968,7 +969,7 @@ void ws_gui_tree_selection_changed(GtkTreeSelection *selection,
                                    &string,
                                    -1);
 
-               ws_dbus_client_find_translation(ws_gui_app->dbus_data, string);
+               ws_dbus_client_find_translation(ws_gui_app->dbus_data, string);
                
                g_free(ws_gui_app->last_word);
                ws_gui_app->last_word = NULL;
@@ -1123,16 +1124,21 @@ void ws_gui_html_zoom_in(GtkMenuItem *menuitem, gpointer user_data)
        }
        else
        {
-       gtk_html_set_magnification(GTK_HTML(ws_gui_app->ws_gui_html), 
-                                           ws_gui_app->zoom);
-       gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                                 _("ws_ib_zoom_in"));
-       }
-       
-       if (ws_gui_app->zoom == ZOOM_DEFAULT)
-       {
-               gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                                 _("ws_ib_zoom_default"));
+               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)
+               {
+                       gtk_infoprint(GTK_WINDOW(
+                                       ws_gui_app->ws_gui_hildon_window),
+                                       _("ws_ib_zoom_default"));
+               }
+               else
+               {
+                       gtk_infoprint(GTK_WINDOW(
+                                       ws_gui_app->ws_gui_hildon_window),
+                                       _("ws_ib_zoom_in"));
+               }
        }
 }
 
@@ -1155,16 +1161,21 @@ void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data)
        }
        else
        {
-       gtk_html_set_magnification(GTK_HTML(ws_gui_app->ws_gui_html), 
-                                           ws_gui_app->zoom);
-       gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                                 _("ws_ib_zoom_out"));
-       }
-
-       if (ws_gui_app->zoom == ZOOM_DEFAULT)
-       {
-               gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window),
-                                 _("ws_ib_zoom_default"));
+               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)
+               {
+                       gtk_infoprint(GTK_WINDOW(
+                                       ws_gui_app->ws_gui_hildon_window),
+                                       _("ws_ib_zoom_default"));
+               }
+               else
+               {
+                       gtk_infoprint(GTK_WINDOW(
+                                       ws_gui_app->ws_gui_hildon_window),
+                                       _("ws_ib_zoom_out"));
+               }
        }
 }