wok view epdfview-cups/stuff/no-stock-icons.patch @ rev 20769

updated ccid (1.4.8 -> 1.4.30)
author Hans-G?nter Theisgen
date Wed Feb 13 16:46:55 2019 +0100 (2019-02-13)
parents
children
line source
1 --- a/src/gtk/FindView.cxx
2 +++ b/srv/gtk/FindView.cxx
3 @@ -50,7 +50,7 @@
4 gtk_toolbar_set_style (GTK_TOOLBAR (m_FindBar), GTK_TOOLBAR_BOTH_HORIZ);
6 // The "Close" button.
7 - m_Close = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE);
8 + m_Close = gtk_tool_button_new (gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Close"));
9 gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_Close, -1);
11 // The text to find entry.
12 @@ -65,13 +65,13 @@
13 gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), textToFindItem, -1);
15 // The "Find Next" button.
16 - m_FindNext = gtk_tool_button_new_from_stock (EPDFVIEW_STOCK_FIND_NEXT);
17 + m_FindNext = gtk_tool_button_new (gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Find _Next"));
18 gtk_tool_item_set_is_important (m_FindNext, TRUE);
19 gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_FindNext, -1);
21 // The "Find Previous" button.
22 m_FindPrevious =
23 - gtk_tool_button_new_from_stock (EPDFVIEW_STOCK_FIND_PREVIOUS);
24 + gtk_tool_button_new (gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Find _Previous"));
25 gtk_tool_item_set_is_important (m_FindPrevious, TRUE);
26 gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_FindPrevious, -1);
28 --- a/src/gtk/MainView.cxx
29 +++ b/src/gtk/MainView.cxx
30 @@ -92,80 +92,80 @@
31 { "GoMenu", NULL, N_("_Go"), NULL, NULL, NULL },
32 { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL },
34 - { "OpenFile", GTK_STOCK_OPEN, N_("_Open"), "<control>O",
35 + { "OpenFile", "document-open", N_("_Open"), "<control>O",
36 N_("Open a PDF document"),
37 G_CALLBACK (main_window_open_file_cb) },
39 - { "ReloadFile", GTK_STOCK_REFRESH, N_("_Reload"), "<control>R",
40 + { "ReloadFile", "view-refresh", N_("_Reload"), "<control>R",
41 N_("Reload the current document"),
42 G_CALLBACK (main_window_reload_cb) },
44 - { "SaveFile", GTK_STOCK_SAVE, N_("_Save a Copy..."), "<control>S",
45 + { "SaveFile", "document-save", N_("_Save a Copy..."), "<control>S",
46 N_("Save a copy of the current document"),
47 G_CALLBACK (main_window_save_file_cb) },
49 #if defined (HAVE_CUPS)
50 - { "Print", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
51 + { "Print", "document-print", N_("_Print..."), "<control>P",
52 N_("Print the current document"),
53 G_CALLBACK (main_window_print_cb) },
54 #endif // HAVE_CUPS
56 - { "Quit", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
57 + { "Quit", "window-close", N_("_Close"), "<control>W",
58 N_("Close this window"),
59 G_CALLBACK (main_window_quit_cb) },
61 - { "Find", GTK_STOCK_FIND, N_("_Find"), "<control>F",
62 + { "Find", "edit-find", N_("_Find"), "<control>F",
63 N_("Find a word in the document"),
64 G_CALLBACK (main_window_find_cb) },
66 - { "Preferences", GTK_STOCK_PREFERENCES, N_("_Preferences..."), NULL,
67 + { "Preferences", "preferences-system", N_("_Preferences..."), NULL,
68 N_("Change the application's preferences"),
69 G_CALLBACK (main_window_preferences_cb) },
71 - { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "<control>plus",
72 + { "ZoomIn", "zoom-in", N_("Zoom _In"), "<control>plus",
73 N_("Enlarge the document"),
74 G_CALLBACK (main_window_zoom_in_cb) },
76 - { "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus",
77 + { "ZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
78 N_("Shrink the document"),
79 G_CALLBACK (main_window_zoom_out_cb) },
81 - { "RotateRight", EPDFVIEW_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), "<control>bracketright",
82 + { "RotateRight", "object-rotate-right", N_("Rotate _Right"), "<control>bracketright",
83 N_("Rotate the document 90 degrees clockwise"),
84 G_CALLBACK (main_window_rotate_right_cb) },
86 - { "RotateLeft", EPDFVIEW_STOCK_ROTATE_LEFT, N_("Rotate _Left"), "<control>bracketleft",
87 + { "RotateLeft", "object-rotate-left", N_("Rotate _Left"), "<control>bracketleft",
88 N_("Rotate the document 90 degrees counter-clockwise"),
89 G_CALLBACK (main_window_rotate_left_cb) },
91 - { "GoToFirstPage", GTK_STOCK_GOTO_FIRST, N_("_First Page"), "<control>Home",
92 + { "GoToFirstPage", "go-first", N_("_First Page"), "<control>Home",
93 N_("Go to the first page"),
94 G_CALLBACK (main_window_go_to_first_page_cb) },
96 - { "GoToNextPage", GTK_STOCK_GO_FORWARD, N_("_Next Page"), "<Shift>Page_Down",
97 + { "GoToNextPage", "go-next", N_("_Next Page"), "<Shift>Page_Down",
98 N_("Go to the next page"),
99 G_CALLBACK (main_window_go_to_next_page_cb) },
101 - { "GoToPreviousPage", GTK_STOCK_GO_BACK, N_("_Previous Page"), "<Shift>Page_Up",
102 + { "GoToPreviousPage", "go-previous", N_("_Previous Page"), "<Shift>Page_Up",
103 N_("Go to the previous page"),
104 G_CALLBACK (main_window_go_to_previous_page_cb) },
106 - { "GoToLastPage", GTK_STOCK_GOTO_LAST, N_("_Last Page"), "<control>End",
107 + { "GoToLastPage", "go-last", N_("_Last Page"), "<control>End",
108 N_("Go to the last page"),
109 G_CALLBACK (main_window_go_to_last_page_cb) },
111 - { "About", GTK_STOCK_ABOUT, N_("_About"), NULL,
112 + { "About", "help-about", N_("_About"), NULL,
113 N_("Display application's credits"),
114 G_CALLBACK (main_window_about_box_cb) },
116 // Accelerator keys.
117 - { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL,
118 + { "Slash", "edit-find", NULL, "slash", NULL,
119 G_CALLBACK (main_window_find_cb) },
121 - { "KPAdd", GTK_STOCK_ZOOM_IN, NULL, "<control>KP_Add", NULL,
122 + { "KPAdd", "zoom-in", NULL, "<control>KP_Add", NULL,
123 G_CALLBACK (main_window_zoom_in_cb) },
125 - { "KPSubtract", GTK_STOCK_ZOOM_OUT, NULL, "<control>KP_Subtract",
126 + { "KPSubtract", "zoom-out", NULL, "<control>KP_Subtract",
127 NULL,
128 G_CALLBACK (main_window_zoom_out_cb) }
129 };
130 @@ -188,21 +188,21 @@
131 N_("Show or hide the document's outline"),
132 G_CALLBACK (main_window_show_index_cb), FALSE },
134 - { "ZoomFit", GTK_STOCK_ZOOM_FIT, N_("Zoom to _Fit"), NULL,
135 + { "ZoomFit", "zoom-fit-best", N_("Zoom to _Fit"), NULL,
136 N_("Make the current document fill the window"),
137 G_CALLBACK (main_window_zoom_fit_cb), FALSE },
139 - { "ZoomWidth", EPDFVIEW_STOCK_ZOOM_WIDTH, N_("Zoom to _Width"), NULL,
140 + { "ZoomWidth", "format-justify-fill", N_("Zoom to _Width"), NULL,
141 N_("Make the current document fill the window width"),
142 G_CALLBACK (main_window_zoom_width_cb), FALSE },
143 };
145 static GtkRadioActionEntry g_PageScrollEntries[] =
146 {
147 - { "PageModeScroll", GTK_STOCK_FULLSCREEN, N_("Scroll"), NULL,
148 + { "PageModeScroll", "view-fullscreen", N_("Scroll"), NULL,
149 N_("Mouse scroll page"), (int)PagePterModeScroll },
151 - { "PageModeText", GTK_STOCK_SELECT_ALL, N_("Select Text"), NULL,
152 + { "PageModeText", "edit-select-all", N_("Select Text"), NULL,
153 N_(" Mouse select text"), (int)PagePterModeSelectText },
154 };
156 @@ -1031,35 +1031,7 @@
157 void
158 MainView::setMainWindowIcon ()
159 {
160 - const gchar *iconFiles[] =
161 - {
162 - "icon_epdfview-48.png",
163 - "icon_epdfview-32.png",
164 - "icon_epdfview-24.png",
165 - };
166 -
167 - GList *iconList = NULL;
168 - int iconFilesNum = G_N_ELEMENTS (iconFiles);
169 - for ( int iconIndex = 0 ; iconIndex < iconFilesNum ; iconIndex++ )
170 - {
171 - gchar *filename = g_strconcat (DATADIR, "/pixmaps/",
172 - iconFiles[iconIndex], NULL);
173 - GError *error = NULL;
174 - GdkPixbuf *iconPixbuf = gdk_pixbuf_new_from_file (filename, &error);
175 - if ( NULL != iconPixbuf )
176 - {
177 - iconList = g_list_prepend (iconList, iconPixbuf);
178 - }
179 - else
180 - {
181 - g_warning ("Error loading icon: %s\n", error->message);
182 - g_error_free (error);
183 - }
184 - g_free (filename);
185 - }
186 - gtk_window_set_default_icon_list (iconList);
187 - g_list_foreach (iconList, (GFunc)g_object_unref, NULL);
188 - g_list_free (iconList);
189 + gtk_window_set_default_icon_name ("epdfview");
190 }
192 ///