msgstr ""
"Project-Id-Version: evince 0.3\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-06-09 10:05+0400\n"
+"POT-Creation-Date: 2006-07-30 05:22+0400\n"
"PO-Revision-Date: 2006-03-08 19:20+0300\n"
"Last-Translator: Nickolay V. Shmyrev <nshmyrev@yandex.ru>\n"
"Language-Team: Russian <gnome-cyr@gnome.org>\n"
msgid "Couldn't open attachment “%s”"
msgstr "Не удалось открыть вложение «%s»"
-#: ../backend/ev-document-factory.c:258
+#: ../backend/ev-document-factory.c:265
msgid "Unknown MIME Type"
msgstr "Неизвестный тип документа"
-#: ../backend/ev-document-factory.c:269
+#: ../backend/ev-document-factory.c:276
#, c-format
msgid "Unhandled MIME type: “%s”"
msgstr "Неизвестный тип документа: «%s»"
-#: ../backend/ev-document-factory.c:335
+#: ../backend/ev-document-factory.c:342
msgid "All Documents"
msgstr "Все документы"
-#: ../backend/ev-document-factory.c:343
+#: ../backend/ev-document-factory.c:350
msgid "PostScript Documents"
msgstr "Документы формата PostScript"
-#: ../backend/ev-document-factory.c:352
+#: ../backend/ev-document-factory.c:359
msgid "PDF Documents"
msgstr "Документы формата PDF"
-#: ../backend/ev-document-factory.c:361
+#: ../backend/ev-document-factory.c:368
msgid "Images"
msgstr "Изображения"
-#: ../backend/ev-document-factory.c:371
+#: ../backend/ev-document-factory.c:378
msgid "DVI Documents"
msgstr "Документы формата DVI"
-#: ../backend/ev-document-factory.c:381
+#: ../backend/ev-document-factory.c:388
msgid "Djvu Documents"
msgstr "Документы формата Djvu"
-#: ../backend/ev-document-factory.c:391
+#: ../backend/ev-document-factory.c:398
msgid "Comic Books"
msgstr "Книги комиксов"
-#: ../backend/ev-document-factory.c:399
+#: ../backend/ev-document-factory.c:408
+msgid "Impress Slides"
+msgstr "Слайды Impress"
+
+#: ../backend/ev-document-factory.c:416
msgid "All Files"
msgstr "Все файлы"
msgstr "Разделитель"
#. translators: this is the label for toolbar button
-#: ../cut-n-paste/zoom-control/ephy-zoom.h:48 ../shell/ev-window.c:3051
+#: ../cut-n-paste/zoom-control/ephy-zoom.h:48 ../shell/ev-window.c:3431
msgid "Best Fit"
msgstr "Уместить в окне"
msgid "PostScript"
msgstr "PostScript"
-#: ../shell/eggfindbar.c:158
+#: ../shell/eggfindbar.c:157
msgid "Search string"
msgstr "Искать строку"
-#: ../shell/eggfindbar.c:159
+#: ../shell/eggfindbar.c:158
msgid "The name of the string to be found"
msgstr "Строка для поиска"
-#: ../shell/eggfindbar.c:172
+#: ../shell/eggfindbar.c:171
msgid "Case sensitive"
msgstr "С учётом регистра"
-#: ../shell/eggfindbar.c:173
+#: ../shell/eggfindbar.c:172
msgid "TRUE for a case sensitive search"
msgstr "TRUE для поиска с учётом регистра"
-#: ../shell/eggfindbar.c:180
+#: ../shell/eggfindbar.c:179
msgid "Highlight color"
msgstr "Цвет выделения"
-#: ../shell/eggfindbar.c:181
+#: ../shell/eggfindbar.c:180
msgid "Color of highlight for all matches"
msgstr "Цвет для выделения всех совпадений"
-#: ../shell/eggfindbar.c:187
+#: ../shell/eggfindbar.c:186
msgid "Current color"
msgstr "Текущий цвет"
-#: ../shell/eggfindbar.c:188
+#: ../shell/eggfindbar.c:187
msgid "Color of highlight for the current match"
msgstr "Цвет для выделения текущего совпадения"
-#: ../shell/eggfindbar.c:319
-msgid "F_ind:"
-msgstr "_Найти:"
-
-#: ../shell/eggfindbar.c:325
-msgid "_Previous"
-msgstr "_Предыдущее"
+#: ../shell/eggfindbar.c:320
+msgid "Find:"
+msgstr "Найти:"
#: ../shell/eggfindbar.c:329
-msgid "_Next"
-msgstr "_Следующее"
+msgid "Find Previous"
+msgstr "Предыдущее"
+
+#: ../shell/eggfindbar.c:332
+msgid "Find previous occurrence of the search string"
+msgstr "Найти предыдущее вхождение строки"
+
+#: ../shell/eggfindbar.c:337
+msgid "Find Next"
+msgstr "Следующее"
-#: ../shell/eggfindbar.c:343
+#: ../shell/eggfindbar.c:340
+msgid "Find next occurrence of the search string"
+msgstr "Найти следующее вхождение слова"
+
+#: ../shell/eggfindbar.c:348
msgid "C_ase Sensitive"
msgstr "Учитывать _регистр"
+#: ../shell/eggfindbar.c:351
+msgid "Toggle case sensitive help"
+msgstr "Переключить чувствительность поиска к регистру"
+
#: ../shell/ev-page-action.c:168
#, c-format
msgid "(%d of %d)"
msgid "%3d%% remaining to search"
msgstr "%3d%% остаётся для поиска"
-#: ../shell/ev-window.c:953
+#: ../shell/ev-window.c:982
msgid "Unable to open document"
msgstr "Невозможно открыть документ"
-#: ../shell/ev-window.c:1036
+#: ../shell/ev-window.c:1071
msgid "Open Document"
msgstr "Открыть документ"
-#: ../shell/ev-window.c:1124
+#: ../shell/ev-window.c:1159
#, c-format
msgid "The file could not be saved as “%s”."
msgstr "Документ не может быть сохранён в файле «%s»."
-#: ../shell/ev-window.c:1143 ../shell/ev-window.c:3402
+#: ../shell/ev-window.c:1178 ../shell/ev-window.c:3785
msgid "Save a Copy"
msgstr "Сохранить копию"
-#: ../shell/ev-window.c:1206
-msgid "Generating PDF is not supported"
-msgstr "Ð\9fеÑ\87аÑ\82Ñ\8c в Ñ\84айл Ñ\84оÑ\80маÑ\82а PDF не поддеÑ\80живаеÑ\82Ñ\81Ñ\8f."
+#: ../shell/ev-window.c:1231
+msgid "Failed to print document"
+msgstr "Ð\9dе Ñ\83далоÑ\81Ñ\8c напеÑ\87аÑ\82аÑ\82Ñ\8c докÑ\83менÑ\82"
-#: ../shell/ev-window.c:1215
+#: ../shell/ev-window.c:1345 ../shell/ev-window.c:1520
msgid "Printing is not supported on this printer."
msgstr "Печать на этом принтере не поддерживается."
-#: ../shell/ev-window.c:1217
+#: ../shell/ev-window.c:1455 ../shell/ev-window.c:1571
+msgid "Print"
+msgstr "Напечатать"
+
+#: ../shell/ev-window.c:1510
+msgid "Generating PDF is not supported"
+msgstr "Печать в файл формата PDF не поддерживается."
+
+#: ../shell/ev-window.c:1522
#, c-format
msgid ""
"You were trying to print to a printer using the “%s” driver. This program "
"Вы попытались напечатать документ используя драйвер «%s». Эта программа "
"требует драйвер совместимый с принтерами PostScript."
-#: ../shell/ev-window.c:1262
-msgid "Print"
-msgstr "Напечатать"
-
-#: ../shell/ev-window.c:1268
+#: ../shell/ev-window.c:1580
msgid "Pages"
msgstr "Страницы"
#. Toolbar-only
-#: ../shell/ev-window.c:1613 ../shell/ev-window.c:2852
+#: ../shell/ev-window.c:1940 ../shell/ev-window.c:3232
msgid "Leave Fullscreen"
msgstr "Выйти из полноэкранного режима"
-#: ../shell/ev-window.c:1947
+#: ../shell/ev-window.c:2303
msgid "Toolbar Editor"
msgstr "Правка панели инструментов"
-#: ../shell/ev-window.c:2314
+#: ../shell/ev-window.c:2670
#, c-format
msgid ""
"PostScript and PDF File Viewer.\n"
"Просмотр документов формата PostScript и PDF\n"
"Использует poppler версии %s (%s)"
-#: ../shell/ev-window.c:2338
+#: ../shell/ev-window.c:2694
msgid ""
"Evince is free software; you can redistribute it and/or modify it under the "
"terms of the GNU General Public License as published by the Free Software "
"опубликованной Free Software Foundation; либо версии 2 лицензии, либо (на "
"ваше усмотрение) любой более поздней версии.\n"
-#: ../shell/ev-window.c:2342
+#: ../shell/ev-window.c:2698
msgid ""
"Evince is distributed in the hope that it will be useful, but WITHOUT ANY "
"WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS "
"ЛИБО ТРЕБОВАНИЯМ. Для получения дополнительной информации ознакомьтесь с GNU "
"General Public License.\n"
-#: ../shell/ev-window.c:2346
+#: ../shell/ev-window.c:2702
msgid ""
"You should have received a copy of the GNU General Public License along with "
"Evince; if not, write to the Free Software Foundation, Inc., 59 Temple "
"этого не произошло, напишите to the Free Software Foundation, Inc., 59 "
"Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
-#: ../shell/ev-window.c:2370 ../shell/main.c:240
+#: ../shell/ev-window.c:2726 ../shell/main.c:308
msgid "Evince"
msgstr "Evince"
-#: ../shell/ev-window.c:2373
+#: ../shell/ev-window.c:2729
msgid "© 1996-2005 The Evince authors"
msgstr "© 1996-2005 авторы Evince"
-#: ../shell/ev-window.c:2379
+#: ../shell/ev-window.c:2735
msgid "translator-credits"
msgstr "Николай В. Шмырёв <nshmyrev@yandex.ru>"
-#: ../shell/ev-window.c:2779
+#: ../shell/ev-window.c:3159
msgid "_File"
msgstr "_Файл"
-#: ../shell/ev-window.c:2780
+#: ../shell/ev-window.c:3160
msgid "_Edit"
msgstr "_Правка"
-#: ../shell/ev-window.c:2781
+#: ../shell/ev-window.c:3161
msgid "_View"
msgstr "_Вид"
-#: ../shell/ev-window.c:2782
+#: ../shell/ev-window.c:3162
msgid "_Go"
msgstr "П_ереход"
-#: ../shell/ev-window.c:2783
+#: ../shell/ev-window.c:3163
msgid "_Help"
msgstr "_Справка"
#. File menu
-#: ../shell/ev-window.c:2786 ../shell/ev-window.c:2943
+#: ../shell/ev-window.c:3166 ../shell/ev-window.c:3323
msgid "_Open..."
msgstr "_Открыть..."
-#: ../shell/ev-window.c:2787
+#: ../shell/ev-window.c:3167
msgid "Open an existing document"
msgstr "Открыть документ"
-#: ../shell/ev-window.c:2789 ../shell/ev-window.c:2945
+#: ../shell/ev-window.c:3169 ../shell/ev-window.c:3325
msgid "_Save a Copy..."
msgstr "Сохранить _копию..."
-#: ../shell/ev-window.c:2790
+#: ../shell/ev-window.c:3170
msgid "Save a copy of the current document"
msgstr "Сохранить копию текущего документа"
-#: ../shell/ev-window.c:2792
+#: ../shell/ev-window.c:3172
msgid "_Print..."
msgstr "_Печать..."
-#: ../shell/ev-window.c:2793
+#: ../shell/ev-window.c:3173
msgid "Print this document"
msgstr "Напечатать документ"
-#: ../shell/ev-window.c:2795
+#: ../shell/ev-window.c:3175
msgid "P_roperties"
msgstr "_Свойства"
-#: ../shell/ev-window.c:2803
+#: ../shell/ev-window.c:3183
msgid "Select _All"
msgstr "Выделить _всё"
-#: ../shell/ev-window.c:2805
+#: ../shell/ev-window.c:3185
msgid "_Find..."
msgstr "_Найти..."
-#: ../shell/ev-window.c:2806
+#: ../shell/ev-window.c:3186
msgid "Find a word or phrase in the document"
msgstr "Найти слово или фразу в документе"
-#: ../shell/ev-window.c:2808
+#: ../shell/ev-window.c:3188
msgid "Find Ne_xt"
msgstr "Найти _следующее"
-#: ../shell/ev-window.c:2810
+#: ../shell/ev-window.c:3190
msgid "Find Pre_vious"
msgstr "Найти пр_едыдущее"
-#: ../shell/ev-window.c:2812
+#: ../shell/ev-window.c:3192
msgid "T_oolbar"
msgstr "Панель _инструментов"
-#: ../shell/ev-window.c:2814
+#: ../shell/ev-window.c:3194
msgid "Rotate _Left"
msgstr "Повернуть в_лево"
-#: ../shell/ev-window.c:2816
+#: ../shell/ev-window.c:3196
msgid "Rotate _Right"
msgstr "Повернуть в_право"
-#: ../shell/ev-window.c:2821
+#: ../shell/ev-window.c:3201
msgid "Enlarge the document"
msgstr "Увеличить размер страницы"
-#: ../shell/ev-window.c:2824
+#: ../shell/ev-window.c:3204
msgid "Shrink the document"
msgstr "Уменьшить размер страницы"
-#: ../shell/ev-window.c:2826
+#: ../shell/ev-window.c:3206
msgid "_Reload"
msgstr "_Обновить"
-#: ../shell/ev-window.c:2827
+#: ../shell/ev-window.c:3207
msgid "Reload the document"
msgstr "Обновить документ"
#. Go menu
-#: ../shell/ev-window.c:2831
+#: ../shell/ev-window.c:3211
msgid "_Previous Page"
msgstr "_Назад"
-#: ../shell/ev-window.c:2832
+#: ../shell/ev-window.c:3212
msgid "Go to the previous page"
msgstr "Перейти к предыдущей странице"
-#: ../shell/ev-window.c:2834
+#: ../shell/ev-window.c:3214
msgid "_Next Page"
msgstr "_Вперёд"
-#: ../shell/ev-window.c:2835
+#: ../shell/ev-window.c:3215
msgid "Go to the next page"
msgstr "Перейти к следующей странице"
-#: ../shell/ev-window.c:2837
+#: ../shell/ev-window.c:3217
msgid "_First Page"
msgstr "_Начало"
-#: ../shell/ev-window.c:2838
+#: ../shell/ev-window.c:3218
msgid "Go to the first page"
msgstr "Перейти к первой странице"
-#: ../shell/ev-window.c:2840
+#: ../shell/ev-window.c:3220
msgid "_Last Page"
msgstr "_Конец"
-#: ../shell/ev-window.c:2841
+#: ../shell/ev-window.c:3221
msgid "Go to the last page"
msgstr "Перейти к последней странице"
#. Help menu
-#: ../shell/ev-window.c:2845
+#: ../shell/ev-window.c:3225
msgid "_Contents"
msgstr "_Содержание"
-#: ../shell/ev-window.c:2848
+#: ../shell/ev-window.c:3228
msgid "_About"
msgstr "_О программе"
-#: ../shell/ev-window.c:2853
+#: ../shell/ev-window.c:3233
msgid "Leave fullscreen mode"
msgstr "Выйти из полноэкранного режима"
#. View Menu
-#: ../shell/ev-window.c:2904
+#: ../shell/ev-window.c:3284
msgid "_Toolbar"
msgstr "Панель _инструментов"
-#: ../shell/ev-window.c:2905
+#: ../shell/ev-window.c:3285
msgid "Show or hide the toolbar"
msgstr "Показать или спрятать панель инструментов"
-#: ../shell/ev-window.c:2907
+#: ../shell/ev-window.c:3287
msgid "Side _Pane"
msgstr "_Боковая панель"
-#: ../shell/ev-window.c:2908
+#: ../shell/ev-window.c:3288
msgid "Show or hide the side pane"
msgstr "Показать или спрятать боковую панель"
-#: ../shell/ev-window.c:2910
+#: ../shell/ev-window.c:3290
msgid "_Continuous"
msgstr "_Непрерывно"
-#: ../shell/ev-window.c:2911
+#: ../shell/ev-window.c:3291
msgid "Show the entire document"
msgstr "Показывать документ целиком"
-#: ../shell/ev-window.c:2913
+#: ../shell/ev-window.c:3293
msgid "_Dual"
msgstr "_Две страницы"
-#: ../shell/ev-window.c:2914
+#: ../shell/ev-window.c:3294
msgid "Show two pages at once"
msgstr "Показать по две страницы"
-#: ../shell/ev-window.c:2916
+#: ../shell/ev-window.c:3296
msgid "_Fullscreen"
msgstr "Полноэкранный _режим"
-#: ../shell/ev-window.c:2917
+#: ../shell/ev-window.c:3297
msgid "Expand the window to fill the screen"
msgstr "Показывать окно на весь экран"
-#: ../shell/ev-window.c:2919
+#: ../shell/ev-window.c:3299
msgid "_Presentation"
msgstr "_Презентация"
-#: ../shell/ev-window.c:2920
+#: ../shell/ev-window.c:3300
msgid "Run document as a presentation"
msgstr "Отображать документ как презентацию"
-#: ../shell/ev-window.c:2922
+#: ../shell/ev-window.c:3302
msgid "_Best Fit"
msgstr "_Уместить в окне"
-#: ../shell/ev-window.c:2923
+#: ../shell/ev-window.c:3303
msgid "Make the current document fill the window"
msgstr "Масштабировать документ для соответствия окну"
-#: ../shell/ev-window.c:2925
+#: ../shell/ev-window.c:3305
msgid "Fit Page _Width"
msgstr "По _ширине страницы"
-#: ../shell/ev-window.c:2926
+#: ../shell/ev-window.c:3306
msgid "Make the current document fill the window width"
msgstr "Масштабировать документ для соответствия ширине окна"
#. Links
-#: ../shell/ev-window.c:2933
+#: ../shell/ev-window.c:3313
msgid "_Open Link"
msgstr "_Открыть ссылку"
-#: ../shell/ev-window.c:2935
+#: ../shell/ev-window.c:3315
msgid "_Go To"
msgstr "_Перейти"
-#: ../shell/ev-window.c:2937
+#: ../shell/ev-window.c:3317
msgid "_Copy Link Address"
msgstr "_Скопировать адрес ссылки"
-#: ../shell/ev-window.c:3000
+#: ../shell/ev-window.c:3380
msgid "Page"
msgstr "Страница"
-#: ../shell/ev-window.c:3001
+#: ../shell/ev-window.c:3381
msgid "Select Page"
msgstr "Выделить страницу"
-#: ../shell/ev-window.c:3013
+#: ../shell/ev-window.c:3393
msgid "Zoom"
msgstr "Масштаб"
-#: ../shell/ev-window.c:3015
+#: ../shell/ev-window.c:3395
msgid "Adjust the zoom level"
msgstr "Изменить масштаб"
#. translators: this is the label for toolbar button
-#: ../shell/ev-window.c:3031
+#: ../shell/ev-window.c:3411
msgid "Previous"
-msgstr "Ð\9fÑ\80едÑ\8bдÑ\83Ñ\89аÑ\8f"
+msgstr "Ð\9fÑ\80едÑ\8bдÑ\83Ñ\89ее"
#. translators: this is the label for toolbar button
-#: ../shell/ev-window.c:3037
+#: ../shell/ev-window.c:3417
msgid "Next"
-msgstr "СледÑ\83Ñ\8eÑ\89аÑ\8f"
+msgstr "СледÑ\83Ñ\8eÑ\89ее"
#. translators: this is the label for toolbar button
-#: ../shell/ev-window.c:3041
+#: ../shell/ev-window.c:3421
msgid "Zoom In"
msgstr "Увеличить"
#. translators: this is the label for toolbar button
-#: ../shell/ev-window.c:3046
+#: ../shell/ev-window.c:3426
msgid "Zoom Out"
msgstr "Уменьшить"
#. translators: this is the label for toolbar button
-#: ../shell/ev-window.c:3056
+#: ../shell/ev-window.c:3436
msgid "Fit Width"
msgstr "По ширине страницы"
-#: ../shell/ev-window.c:3331
+#: ../shell/ev-window.c:3714
msgid "Unable to open attachment"
msgstr "Не удалось открыть вложение"
-#: ../shell/ev-window.c:3378
+#: ../shell/ev-window.c:3761
msgid "The attachment could not be saved."
msgstr "Не удалось сохранить вложение."
msgid "%s - Password Required"
msgstr "%s ― требуется пароль"
-#: ../shell/main.c:51
+#: ../shell/main.c:54
msgid "The page of the document to display."
msgstr "Перейти к странице документа"
-#: ../shell/main.c:51
+#: ../shell/main.c:54
msgid "PAGE"
msgstr "Страница"
-#: ../shell/main.c:52
+#: ../shell/main.c:55
+msgid "Run evince in fullscreen mode"
+msgstr "Запустить Evince в полноэкранном режиме"
+
+#: ../shell/main.c:56
+msgid "Run evince in presentation mode"
+msgstr "Запустить Evince в режиме презентации"
+
+#: ../shell/main.c:57
+msgid "Run evince as a previewer"
+msgstr "Запустить Evince в режиме предварительного просмотра"
+
+#: ../shell/main.c:58
msgid "[FILE...]"
msgstr "[Файл...]"
-#: ../shell/main.c:225
+#: ../shell/main.c:293
msgid "GNOME Document Viewer"
msgstr "Просмотр документов"
-#: ../shell/main.c:262
+#: ../shell/main.c:334
msgid "Evince Document Viewer"
msgstr "Evince ― просмотр документов"
"Команда и аргументы для запуска программы создания изображения документа "
"PDF. Для получений дополнительной информации смотрите документацию по "
"Nautilus."
+
+#~ msgid "occurence|Previous"
+#~ msgstr "Предыдущее"
+
+#~ msgid "occurence|Next"
+#~ msgstr "Следущее"
#include <gtk/gtklabel.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>
struct _EggFindBarPrivate
{
gchar *search_string;
- GtkWidget *hbox;
+
+ GtkToolItem *next_button;
+ GtkToolItem *previous_button;
+ GtkToolItem *status_separator;
+ GtkToolItem *status_item;
+ GtkToolItem *case_button;
+
GtkWidget *find_entry;
- GtkWidget *next_button;
- GtkWidget *previous_button;
- GtkWidget *case_button;
- GtkWidget *status_separator;
GtkWidget *status_label;
+
gulong set_focus_handler;
guint case_sensitive : 1;
};
#define EGG_FIND_BAR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EGG_TYPE_FIND_BAR, EggFindBarPrivate))
-
-enum
- {
+enum {
PROP_0,
PROP_SEARCH_STRING,
PROP_CASE_SENSITIVE
- };
+};
static void egg_find_bar_finalize (GObject *object);
static void egg_find_bar_get_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void egg_find_bar_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void egg_find_bar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
static void egg_find_bar_show (GtkWidget *widget);
static void egg_find_bar_hide (GtkWidget *widget);
static void egg_find_bar_grab_focus (GtkWidget *widget);
-G_DEFINE_TYPE (EggFindBar, egg_find_bar, GTK_TYPE_BIN);
+G_DEFINE_TYPE (EggFindBar, egg_find_bar, GTK_TYPE_TOOLBAR);
enum
{
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkBinClass *bin_class;
GtkBindingSet *binding_set;
egg_find_bar_parent_class = g_type_class_peek_parent (klass);
object_class = (GObjectClass *)klass;
widget_class = (GtkWidgetClass *)klass;
- bin_class = (GtkBinClass *)klass;
object_class->set_property = egg_find_bar_set_property;
object_class->get_property = egg_find_bar_get_property;
object_class->finalize = egg_find_bar_finalize;
- widget_class->size_request = egg_find_bar_size_request;
- widget_class->size_allocate = egg_find_bar_size_allocate;
widget_class->show = egg_find_bar_show;
widget_class->hide = egg_find_bar_hide;
+
widget_class->grab_focus = egg_find_bar_grab_focus;
find_bar_signals[NEXT] =
void *data)
{
EggFindBar *find_bar = EGG_FIND_BAR (data);
- EggFindBarPrivate *priv = (EggFindBarPrivate *)find_bar->priv;
- /* We activate the "next" button here so we'll get a nice
- animation */
if (find_bar->priv->search_string != NULL)
- gtk_widget_activate (priv->next_button);
+ egg_find_bar_emit_next (find_bar);
}
static void
{
EggFindBarPrivate *priv;
GtkWidget *label;
- GtkWidget *separator;
- GtkWidget *image_back;
- GtkWidget *image_forward;
+ GtkWidget *alignment;
+ GtkWidget *box;
+ GtkToolItem *item;
+ GtkWidget *arrow;
/* Data */
priv = EGG_FIND_BAR_GET_PRIVATE (find_bar);
- find_bar->priv = priv;
-
+
+ find_bar->priv = priv;
priv->search_string = NULL;
- /* Widgets */
- gtk_widget_push_composite_child ();
- priv->hbox = gtk_hbox_new (FALSE, 6);
- gtk_container_set_border_width (GTK_CONTAINER (priv->hbox), 3);
+ gtk_toolbar_set_style (GTK_TOOLBAR (find_bar), GTK_TOOLBAR_BOTH_HORIZ);
- label = gtk_label_new_with_mnemonic (_("F_ind:"));
- separator = gtk_vseparator_new ();
+ /* Find: |_____| */
+ item = gtk_tool_item_new ();
+ box = gtk_hbox_new (FALSE, 12);
+
+ alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 2, 2);
+
+ label = gtk_label_new_with_mnemonic (_("Find:"));
priv->find_entry = gtk_entry_new ();
+ gtk_entry_set_width_chars (GTK_ENTRY (priv->find_entry), 32);
+ gtk_entry_set_max_length (GTK_ENTRY (priv->find_entry), 512);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv->find_entry);
- priv->previous_button = gtk_button_new_with_mnemonic (_("_Previous"));
- gtk_button_set_focus_on_click (GTK_BUTTON (priv->previous_button), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->previous_button), FALSE);
-
- priv->next_button = gtk_button_new_with_mnemonic (_("_Next"));
- gtk_button_set_focus_on_click (GTK_BUTTON (priv->next_button), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->next_button), FALSE);
-
- image_back = gtk_image_new_from_stock (GTK_STOCK_GO_BACK,
- GTK_ICON_SIZE_BUTTON);
- image_forward = gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD,
- GTK_ICON_SIZE_BUTTON);
-
- gtk_button_set_image (GTK_BUTTON (priv->previous_button),
- image_back);
- gtk_button_set_image (GTK_BUTTON (priv->next_button),
- image_forward);
-
- priv->case_button = gtk_check_button_new_with_mnemonic (_("C_ase Sensitive"));
-
- priv->status_separator = gtk_vseparator_new ();
-
+ /* Prev */
+ arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
+ priv->previous_button = gtk_tool_button_new (arrow, Q_("Find Previous"));
+ 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);
+
+ /* Next */
+ arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
+ priv->next_button = gtk_tool_button_new (arrow, Q_("Find Next"));
+ 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);
+
+ /* Separator*/
+ priv->status_separator = gtk_separator_tool_item_new();
+
+ /* Case button */
+ 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 help"),
+ NULL);
+ /* Status */
+ priv->status_item = gtk_tool_item_new();
+ gtk_tool_item_set_expand (priv->status_item, TRUE);
priv->status_label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (priv->status_label),
PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment (GTK_MISC (priv->status_label), 0.0, 0.5);
-
-#if 0
- {
- GtkWidget *button_label;
- /* This hack doesn't work because GtkCheckButton doesn't pass the
- * larger size allocation to the label, it always gives the label
- * its exact request. If you un-ifdef this, set the box back
- * on case_button to TRUE, TRUE below
- */
- button_label = gtk_bin_get_child (GTK_BIN (priv->case_button));
- gtk_label_set_ellipsize (GTK_LABEL (button_label),
- PANGO_ELLIPSIZE_END);
- }
-#endif
-
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->find_entry, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->previous_button, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->next_button, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- separator, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->case_button, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->status_separator, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->hbox),
- priv->status_label, TRUE, TRUE, 0);
-
- gtk_container_add (GTK_CONTAINER (find_bar), priv->hbox);
-
- gtk_widget_show (priv->hbox);
- gtk_widget_show (priv->find_entry);
- gtk_widget_show (priv->previous_button);
- gtk_widget_show (priv->next_button);
- gtk_widget_show (separator);
- gtk_widget_show (label);
- gtk_widget_show (image_back);
- gtk_widget_show (image_forward);
- /* don't show status separator/label until they are set */
- gtk_widget_pop_composite_child ();
g_signal_connect (priv->find_entry, "changed",
G_CALLBACK (entry_changed_callback),
g_signal_connect (priv->case_button, "toggled",
G_CALLBACK (case_sensitive_toggled_callback),
find_bar);
+
+ gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), priv->find_entry, TRUE, TRUE, 0);
+ gtk_container_add (GTK_CONTAINER (alignment), box);
+ gtk_container_add (GTK_CONTAINER (item), alignment);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), item, -1);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->previous_button, -1);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->next_button, -1);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->case_button, -1);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->status_separator, -1);
+ gtk_container_add (GTK_CONTAINER (priv->status_item), priv->status_label);
+ gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->status_item, -1);
+
+ /* don't show status separator/label until they are set */
+
+ gtk_widget_show_all (GTK_WIDGET (item));
+ gtk_widget_show_all (GTK_WIDGET (priv->next_button));
+ gtk_widget_show_all (GTK_WIDGET (priv->previous_button));
+ gtk_widget_show (priv->status_label);
}
static void
}
}
-static void
-egg_find_bar_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GtkBin *bin = GTK_BIN (widget);
- GtkRequisition child_requisition;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
- {
- gtk_widget_size_request (bin->child, &child_requisition);
-
- *requisition = child_requisition;
- }
- else
- {
- requisition->width = 0;
- requisition->height = 0;
- }
-}
-
-static void
-egg_find_bar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBin *bin = GTK_BIN (widget);
-
- widget->allocation = *allocation;
-
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
- gtk_widget_size_allocate (bin->child, allocation);
-}
-
static void
egg_find_bar_show (GtkWidget *widget)
{
priv = (EggFindBarPrivate *)find_bar->priv;
- if (text == NULL || *text == '\0')
- {
- gtk_widget_hide (priv->status_label);
- gtk_widget_hide (priv->status_separator);
- gtk_label_set_text (GTK_LABEL (priv->status_label), NULL);
- }
- else
- {
- gtk_label_set_text (GTK_LABEL (priv->status_label), text);
- gtk_widget_show (priv->status_label);
- gtk_widget_show (priv->status_separator);
- }
+ gtk_label_set_text (GTK_LABEL (priv->status_label), text);
+ g_object_set (priv->status_separator, "visible", text != NULL && *text != '\0', NULL);
+ g_object_set (priv->status_item, "visible", text != NULL && *text !='\0', NULL);
}