]> www.fi.muni.cz Git - evince.git/blobdiff - shell/eggfindbar.c
Updated Thai translation.
[evince.git] / shell / eggfindbar.c
index a9c66e7bbcf77832d8bfbcbffe0185fb7711ada2..5b196ec1299f56ecad2cf943a530301352c7ee31 100644 (file)
@@ -16,26 +16,15 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
 */
 
 Boston, MA 02111-1307, USA.
 */
 
-#include <config.h>
+#include "config.h"
 
 
-#include "eggfindbar.h"
+#include <string.h>
 
 #include <glib/gi18n.h>
 
 #include <glib/gi18n.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkvseparator.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtklabel.h>
+#include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <gdk/gdkkeysyms.h>
-#include <gtk/gtkbindings.h>
-#include <gtk/gtkalignment.h>
-#include <gtk/gtktoolbutton.h>
-#include <gtk/gtkseparatortoolitem.h>
-#include <gtk/gtkarrow.h>
-#include <gtk/gtktoggletoolbutton.h>
 
 
-#include <string.h>
+#include "eggfindbar.h"
 
 struct _EggFindBarPrivate
 {
 
 struct _EggFindBarPrivate
 {
@@ -154,8 +143,8 @@ egg_find_bar_class_init (EggFindBarClass *klass)
   g_object_class_install_property (object_class,
                                   PROP_SEARCH_STRING,
                                   g_param_spec_string ("search_string",
   g_object_class_install_property (object_class,
                                   PROP_SEARCH_STRING,
                                   g_param_spec_string ("search_string",
-                                                       _("Search string"),
-                                                       _("The name of the string to be found"),
+                                                       "Search string",
+                                                       "The name of the string to be found",
                                                        NULL,
                                                        G_PARAM_READWRITE));
 
                                                        NULL,
                                                        G_PARAM_READWRITE));
 
@@ -168,23 +157,23 @@ egg_find_bar_class_init (EggFindBarClass *klass)
   g_object_class_install_property (object_class,
                                   PROP_CASE_SENSITIVE,
                                   g_param_spec_boolean ("case_sensitive",
   g_object_class_install_property (object_class,
                                   PROP_CASE_SENSITIVE,
                                   g_param_spec_boolean ("case_sensitive",
-                                                         _("Case sensitive"),
-                                                         _("TRUE for a case sensitive search"),
+                                                         "Case sensitive",
+                                                         "TRUE for a case sensitive search",
                                                          FALSE,
                                                          G_PARAM_READWRITE));
 
   /* Style properties */
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("all_matches_color",
                                                          FALSE,
                                                          G_PARAM_READWRITE));
 
   /* Style properties */
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("all_matches_color",
-                                                               _("Highlight color"),
-                                                               _("Color of highlight for all matches"),
+                                                               "Highlight color",
+                                                               "Color of highlight for all matches",
                                                                GDK_TYPE_COLOR,
                                                                G_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("current_match_color",
                                                                GDK_TYPE_COLOR,
                                                                G_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("current_match_color",
-                                                               _("Current color"),
-                                                               _("Color of highlight for the current match"),
+                                                               "Current color",
+                                                               "Color of highlight for the current match",
                                                                GDK_TYPE_COLOR,
                                                                G_PARAM_READABLE));
 
                                                                GDK_TYPE_COLOR,
                                                                G_PARAM_READABLE));
 
@@ -198,10 +187,21 @@ egg_find_bar_class_init (EggFindBarClass *klass)
   gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
                                 "scroll", 1,
                                 GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_BACKWARD);
   gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
                                 "scroll", 1,
                                 GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_BACKWARD);
-
   gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
                                 "scroll", 1,
                                 GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_FORWARD);
   gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
                                 "scroll", 1,
                                 GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_FORWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
+                               "scroll", 1,
+                               GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
+                               "scroll", 1,
+                               GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
+                               "scroll", 1,
+                               GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
+                               "scroll", 1,
+                               GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
 }
 
 static void
 }
 
 static void
@@ -326,19 +326,19 @@ egg_find_bar_init (EggFindBar *find_bar)
 
   /* Prev */
   arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
 
   /* Prev */
   arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
-  priv->previous_button = gtk_tool_button_new (arrow, Q_("Find Previous"));
+  priv->previous_button = gtk_tool_button_new (arrow, Q_("Find Pre_vious"));
+  gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->previous_button), TRUE);
   gtk_tool_item_set_is_important (priv->previous_button, TRUE);
   gtk_tool_item_set_is_important (priv->previous_button, TRUE);
-  gtk_tool_item_set_tooltip (priv->previous_button, GTK_TOOLBAR (find_bar)->tooltips,
-                            _("Find previous occurrence of the search string"),
-                            NULL);
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->previous_button),
+                              _("Find previous occurrence of the search string"));
 
   /* Next */
   arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
 
   /* Next */
   arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
-  priv->next_button = gtk_tool_button_new (arrow, Q_("Find Next"));
+  priv->next_button = gtk_tool_button_new (arrow, Q_("Find Ne_xt"));
+  gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (priv->next_button), TRUE);
   gtk_tool_item_set_is_important (priv->next_button, TRUE);
   gtk_tool_item_set_is_important (priv->next_button, TRUE);
-  gtk_tool_item_set_tooltip (priv->next_button, GTK_TOOLBAR (find_bar)->tooltips,
-                            _("Find next occurrence of the search string"),
-                            NULL);
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->next_button),
+                              _("Find next occurrence of the search string"));
 
   /* Separator*/
   priv->status_separator = gtk_separator_tool_item_new();
 
   /* Separator*/
   priv->status_separator = gtk_separator_tool_item_new();
@@ -347,9 +347,9 @@ egg_find_bar_init (EggFindBar *find_bar)
   priv->case_button = gtk_toggle_tool_button_new ();
   g_object_set (G_OBJECT (priv->case_button), "label", _("C_ase Sensitive"), NULL);
   gtk_tool_item_set_is_important (priv->case_button, TRUE);
   priv->case_button = gtk_toggle_tool_button_new ();
   g_object_set (G_OBJECT (priv->case_button), "label", _("C_ase Sensitive"), NULL);
   gtk_tool_item_set_is_important (priv->case_button, TRUE);
-  gtk_tool_item_set_tooltip (priv->case_button, GTK_TOOLBAR (find_bar)->tooltips,
-                            _("Toggle case sensitive search"),
-                            NULL);
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->case_button),
+                              _("Toggle case sensitive search"));
+
   /* Status */
   priv->status_item = gtk_tool_item_new();
   gtk_tool_item_set_expand (priv->status_item, TRUE);
   /* Status */
   priv->status_item = gtk_tool_item_new();
   gtk_tool_item_set_expand (priv->status_item, TRUE);