wok diff epdfview-cups/stuff/no-stock-icons.patch @ rev 25438

Update some web_site
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 01 11:12:31 2022 +0000 (2022-09-01)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epdfview-cups/stuff/no-stock-icons.patch	Thu Sep 01 11:12:31 2022 +0000
     1.3 @@ -0,0 +1,192 @@
     1.4 +--- a/src/gtk/FindView.cxx
     1.5 ++++ b/srv/gtk/FindView.cxx
     1.6 +@@ -50,7 +50,7 @@
     1.7 +     gtk_toolbar_set_style (GTK_TOOLBAR (m_FindBar), GTK_TOOLBAR_BOTH_HORIZ);
     1.8 + 
     1.9 +     // The "Close" button.
    1.10 +-    m_Close = gtk_tool_button_new_from_stock (GTK_STOCK_CLOSE);
    1.11 ++    m_Close = gtk_tool_button_new (gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Close"));
    1.12 +     gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_Close, -1);
    1.13 + 
    1.14 +     // The text to find entry.
    1.15 +@@ -65,13 +65,13 @@
    1.16 +     gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), textToFindItem, -1);
    1.17 + 
    1.18 +     // The "Find Next" button.
    1.19 +-    m_FindNext = gtk_tool_button_new_from_stock (EPDFVIEW_STOCK_FIND_NEXT);
    1.20 ++    m_FindNext = gtk_tool_button_new (gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Find _Next"));
    1.21 +     gtk_tool_item_set_is_important (m_FindNext, TRUE);
    1.22 +     gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_FindNext, -1);
    1.23 + 
    1.24 +     // The "Find Previous" button.
    1.25 +     m_FindPrevious = 
    1.26 +-        gtk_tool_button_new_from_stock (EPDFVIEW_STOCK_FIND_PREVIOUS);
    1.27 ++        gtk_tool_button_new (gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_SMALL_TOOLBAR), _("Find _Previous"));
    1.28 +     gtk_tool_item_set_is_important (m_FindPrevious, TRUE);
    1.29 +     gtk_toolbar_insert (GTK_TOOLBAR (m_FindBar), m_FindPrevious, -1);
    1.30 + 
    1.31 +--- a/src/gtk/MainView.cxx
    1.32 ++++ b/src/gtk/MainView.cxx
    1.33 +@@ -92,80 +92,80 @@
    1.34 +     { "GoMenu", NULL, N_("_Go"), NULL, NULL, NULL },
    1.35 +     { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL },
    1.36 + 
    1.37 +-    { "OpenFile", GTK_STOCK_OPEN, N_("_Open"), "<control>O",
    1.38 ++    { "OpenFile", "document-open", N_("_Open"), "<control>O",
    1.39 +       N_("Open a PDF document"),
    1.40 +       G_CALLBACK (main_window_open_file_cb) },
    1.41 + 
    1.42 +-    { "ReloadFile", GTK_STOCK_REFRESH, N_("_Reload"), "<control>R",
    1.43 ++    { "ReloadFile", "view-refresh", N_("_Reload"), "<control>R",
    1.44 +       N_("Reload the current document"),
    1.45 +       G_CALLBACK (main_window_reload_cb) },
    1.46 + 
    1.47 +-    { "SaveFile", GTK_STOCK_SAVE, N_("_Save a Copy..."), "<control>S",
    1.48 ++    { "SaveFile", "document-save", N_("_Save a Copy..."), "<control>S",
    1.49 +       N_("Save a copy of the current document"),
    1.50 +       G_CALLBACK (main_window_save_file_cb) },
    1.51 + 
    1.52 + #if defined (HAVE_CUPS)
    1.53 +-    { "Print", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
    1.54 ++    { "Print", "document-print", N_("_Print..."), "<control>P",
    1.55 +       N_("Print the current document"),
    1.56 +       G_CALLBACK (main_window_print_cb) },
    1.57 + #endif // HAVE_CUPS
    1.58 + 
    1.59 +-    { "Quit", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
    1.60 ++    { "Quit", "window-close", N_("_Close"), "<control>W",
    1.61 +       N_("Close this window"),
    1.62 +       G_CALLBACK (main_window_quit_cb) },
    1.63 + 
    1.64 +-    { "Find", GTK_STOCK_FIND, N_("_Find"), "<control>F",
    1.65 ++    { "Find", "edit-find", N_("_Find"), "<control>F",
    1.66 +       N_("Find a word in the document"),
    1.67 +       G_CALLBACK (main_window_find_cb) },
    1.68 + 
    1.69 +-    { "Preferences", GTK_STOCK_PREFERENCES, N_("_Preferences..."), NULL,
    1.70 ++    { "Preferences", "preferences-system", N_("_Preferences..."), NULL,
    1.71 +       N_("Change the application's preferences"),
    1.72 +       G_CALLBACK (main_window_preferences_cb) },
    1.73 + 
    1.74 +-    { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "<control>plus",
    1.75 ++    { "ZoomIn", "zoom-in", N_("Zoom _In"), "<control>plus",
    1.76 +       N_("Enlarge the document"),
    1.77 +       G_CALLBACK (main_window_zoom_in_cb) },
    1.78 + 
    1.79 +-    { "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus",
    1.80 ++    { "ZoomOut", "zoom-out", N_("Zoom _Out"), "<control>minus",
    1.81 +       N_("Shrink the document"),
    1.82 +       G_CALLBACK (main_window_zoom_out_cb) },
    1.83 + 
    1.84 +-    { "RotateRight", EPDFVIEW_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), "<control>bracketright",
    1.85 ++    { "RotateRight", "object-rotate-right", N_("Rotate _Right"), "<control>bracketright",
    1.86 +       N_("Rotate the document 90 degrees clockwise"),
    1.87 +       G_CALLBACK (main_window_rotate_right_cb) },
    1.88 + 
    1.89 +-    { "RotateLeft", EPDFVIEW_STOCK_ROTATE_LEFT, N_("Rotate _Left"), "<control>bracketleft",
    1.90 ++    { "RotateLeft", "object-rotate-left", N_("Rotate _Left"), "<control>bracketleft",
    1.91 +       N_("Rotate the document 90 degrees counter-clockwise"),
    1.92 +       G_CALLBACK (main_window_rotate_left_cb) },
    1.93 + 
    1.94 +-    { "GoToFirstPage", GTK_STOCK_GOTO_FIRST, N_("_First Page"), "<control>Home",
    1.95 ++    { "GoToFirstPage", "go-first", N_("_First Page"), "<control>Home",
    1.96 +       N_("Go to the first page"),
    1.97 +       G_CALLBACK (main_window_go_to_first_page_cb) },
    1.98 + 
    1.99 +-    { "GoToNextPage", GTK_STOCK_GO_FORWARD, N_("_Next Page"), "<Shift>Page_Down",
   1.100 ++    { "GoToNextPage", "go-next", N_("_Next Page"), "<Shift>Page_Down",
   1.101 +       N_("Go to the next page"),
   1.102 +       G_CALLBACK (main_window_go_to_next_page_cb) },
   1.103 + 
   1.104 +-    { "GoToPreviousPage", GTK_STOCK_GO_BACK, N_("_Previous Page"), "<Shift>Page_Up",
   1.105 ++    { "GoToPreviousPage", "go-previous", N_("_Previous Page"), "<Shift>Page_Up",
   1.106 +       N_("Go to the previous page"),
   1.107 +       G_CALLBACK (main_window_go_to_previous_page_cb) },
   1.108 + 
   1.109 +-    { "GoToLastPage", GTK_STOCK_GOTO_LAST, N_("_Last Page"), "<control>End",
   1.110 ++    { "GoToLastPage", "go-last", N_("_Last Page"), "<control>End",
   1.111 +       N_("Go to the last page"),
   1.112 +       G_CALLBACK (main_window_go_to_last_page_cb) },
   1.113 + 
   1.114 +-    { "About", GTK_STOCK_ABOUT, N_("_About"), NULL,
   1.115 ++    { "About", "help-about", N_("_About"), NULL,
   1.116 +       N_("Display application's credits"),
   1.117 +       G_CALLBACK (main_window_about_box_cb) },
   1.118 + 
   1.119 +     // Accelerator keys.
   1.120 +-    { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL,
   1.121 ++    { "Slash", "edit-find", NULL, "slash", NULL,
   1.122 +       G_CALLBACK (main_window_find_cb) },
   1.123 + 
   1.124 +-    { "KPAdd", GTK_STOCK_ZOOM_IN, NULL, "<control>KP_Add", NULL,
   1.125 ++    { "KPAdd", "zoom-in", NULL, "<control>KP_Add", NULL,
   1.126 +       G_CALLBACK (main_window_zoom_in_cb) },
   1.127 + 
   1.128 +-    { "KPSubtract", GTK_STOCK_ZOOM_OUT, NULL, "<control>KP_Subtract",
   1.129 ++    { "KPSubtract", "zoom-out", NULL, "<control>KP_Subtract",
   1.130 +       NULL,
   1.131 +       G_CALLBACK (main_window_zoom_out_cb) }
   1.132 + };
   1.133 +@@ -188,21 +188,21 @@
   1.134 +       N_("Show or hide the document's outline"),
   1.135 +       G_CALLBACK (main_window_show_index_cb), FALSE },
   1.136 + 
   1.137 +-    { "ZoomFit", GTK_STOCK_ZOOM_FIT, N_("Zoom to _Fit"), NULL,
   1.138 ++    { "ZoomFit", "zoom-fit-best", N_("Zoom to _Fit"), NULL,
   1.139 +       N_("Make the current document fill the window"),
   1.140 +       G_CALLBACK (main_window_zoom_fit_cb), FALSE },
   1.141 + 
   1.142 +-    { "ZoomWidth", EPDFVIEW_STOCK_ZOOM_WIDTH, N_("Zoom to _Width"), NULL,
   1.143 ++    { "ZoomWidth", "format-justify-fill", N_("Zoom to _Width"), NULL,
   1.144 +       N_("Make the current document fill the window width"),
   1.145 +       G_CALLBACK (main_window_zoom_width_cb), FALSE },
   1.146 + };
   1.147 + 
   1.148 + static GtkRadioActionEntry g_PageScrollEntries[] =
   1.149 + {   
   1.150 +-    { "PageModeScroll", GTK_STOCK_FULLSCREEN, N_("Scroll"), NULL,
   1.151 ++    { "PageModeScroll", "view-fullscreen", N_("Scroll"), NULL,
   1.152 +       N_("Mouse scroll page"), (int)PagePterModeScroll },
   1.153 + 
   1.154 +-    { "PageModeText", GTK_STOCK_SELECT_ALL, N_("Select Text"), NULL,
   1.155 ++    { "PageModeText", "edit-select-all", N_("Select Text"), NULL,
   1.156 +       N_(" Mouse select text"), (int)PagePterModeSelectText },
   1.157 + };
   1.158 + 
   1.159 +@@ -1031,35 +1031,7 @@
   1.160 + void
   1.161 + MainView::setMainWindowIcon ()
   1.162 + {
   1.163 +-    const gchar *iconFiles[] =
   1.164 +-    {
   1.165 +-        "icon_epdfview-48.png",
   1.166 +-        "icon_epdfview-32.png",
   1.167 +-        "icon_epdfview-24.png",
   1.168 +-    };
   1.169 +-
   1.170 +-    GList *iconList = NULL;
   1.171 +-    int iconFilesNum = G_N_ELEMENTS (iconFiles);
   1.172 +-    for ( int iconIndex = 0 ; iconIndex < iconFilesNum ; iconIndex++ )
   1.173 +-    {
   1.174 +-        gchar *filename = g_strconcat (DATADIR, "/pixmaps/", 
   1.175 +-                                       iconFiles[iconIndex], NULL);
   1.176 +-        GError *error = NULL;
   1.177 +-        GdkPixbuf *iconPixbuf = gdk_pixbuf_new_from_file (filename, &error);
   1.178 +-        if ( NULL != iconPixbuf )
   1.179 +-        {
   1.180 +-            iconList = g_list_prepend (iconList, iconPixbuf);
   1.181 +-        }
   1.182 +-        else
   1.183 +-        {
   1.184 +-            g_warning ("Error loading icon: %s\n", error->message);
   1.185 +-            g_error_free (error);
   1.186 +-        }
   1.187 +-        g_free (filename);
   1.188 +-    }
   1.189 +-    gtk_window_set_default_icon_list (iconList);
   1.190 +-    g_list_foreach (iconList, (GFunc)g_object_unref, NULL);
   1.191 +-    g_list_free (iconList);
   1.192 ++    gtk_window_set_default_icon_name ("epdfview");
   1.193 + }
   1.194 + 
   1.195 + ///