Make pdf_viewer icons themeable
authorRicardo Mones <ricardo@mones.org>
Wed, 26 Oct 2016 21:39:23 +0000 (23:39 +0200)
committerRicardo Mones <ricardo@mones.org>
Wed, 26 Oct 2016 21:39:23 +0000 (23:39 +0200)
17 files changed:
src/Makefile.am
src/pixmaps/doc_index.xpm [moved from src/plugins/pdf_viewer/doc_index.xpm with 100% similarity]
src/pixmaps/doc_index_close.xpm [moved from src/plugins/pdf_viewer/doc_index_close.xpm with 100% similarity]
src/pixmaps/doc_info.xpm [moved from src/plugins/pdf_viewer/doc_info.xpm with 100% similarity]
src/pixmaps/first_arrow.xpm [moved from src/plugins/pdf_viewer/first_arrow.xpm with 100% similarity]
src/pixmaps/last_arrow.xpm [moved from src/plugins/pdf_viewer/last_arrow.xpm with 100% similarity]
src/pixmaps/left_arrow.xpm [moved from src/plugins/pdf_viewer/left_arrow.xpm with 100% similarity]
src/pixmaps/right_arrow.xpm [moved from src/plugins/pdf_viewer/right_arrow.xpm with 100% similarity]
src/pixmaps/rotate_left.xpm [moved from src/plugins/pdf_viewer/rotate_left.xpm with 100% similarity]
src/pixmaps/rotate_right.xpm [moved from src/plugins/pdf_viewer/rotate_right.xpm with 100% similarity]
src/pixmaps/zoom_fit.xpm [moved from src/plugins/pdf_viewer/zoom_fit.xpm with 100% similarity]
src/pixmaps/zoom_in.xpm [moved from src/plugins/pdf_viewer/zoom_in.xpm with 100% similarity]
src/pixmaps/zoom_out.xpm [moved from src/plugins/pdf_viewer/zoom_out.xpm with 100% similarity]
src/pixmaps/zoom_width.xpm [moved from src/plugins/pdf_viewer/zoom_width.xpm with 100% similarity]
src/plugins/pdf_viewer/poppler_viewer.c
src/stock_pixmap.c
src/stock_pixmap.h

index 8ccd8e3cf3446b6f998c206647fc4fb798dde4b3..3932e48b45d2af7f77a704d463901e2362bb8ba9 100644 (file)
@@ -544,6 +544,19 @@ EXTRA_DIST = \
        pixmaps/tray_unreadmarkedmail.xpm \
        pixmaps/empty.xpm \
        pixmaps/replied_and_forwarded.xpm \
+       pixmaps/doc_index.xpm \
+       pixmaps/doc_index_close.xpm \
+       pixmaps/doc_info.xpm \
+       pixmaps/first_arrow.xpm \
+       pixmaps/last_arrow.xpm \
+       pixmaps/left_arrow.xpm \
+       pixmaps/right_arrow.xpm \
+       pixmaps/rotate_left.xpm \
+       pixmaps/rotate_right.xpm \
+       pixmaps/zoom_fit.xpm \
+       pixmaps/zoom_in.xpm \
+       pixmaps/zoom_out.xpm \
+       pixmaps/zoom_width.xpm \
        claws-contacts.xml \
        $(abook_extra)
 
index 572cb2ca89b1f33afc636f8c3606c354474309c6..792952ec482a1bee8e9b085fa04a650994d69753 100644 (file)
@@ -1587,7 +1587,7 @@ static void pdf_viewer_scroll_one_line(MimeViewer *_viewer, gboolean up)
 #define BUTTON_H_PADDING 3
 #define ADD_BUTTON_TO_TABLE(widget, stock_image) \
        widget = gtk_button_new(); \
-       img = gtk_image_new_from_stock(stock_image, GTK_ICON_SIZE_MENU); \
+       img = stock_pixmap_widget(stock_image); \
        gtk_button_set_image(GTK_BUTTON(widget), img); \
        gtk_table_attach(GTK_TABLE(viewer->widgets_table), GTK_WIDGET(widget), \
                                col, col+1, 0, 1, 0, 0, BUTTON_H_PADDING, 0); \
@@ -1728,8 +1728,8 @@ static MimeViewer *pdf_viewer_create(void)
        gtk_frame_set_label(GTK_FRAME(viewer->frame_index), _("Document Index"));
 
        ADD_SEP_TO_TABLE
-       ADD_BUTTON_TO_TABLE(viewer->first_page, GTK_STOCK_GOTO_FIRST)
-       ADD_BUTTON_TO_TABLE(viewer->prev_page, GTK_STOCK_GO_BACK)
+       ADD_BUTTON_TO_TABLE(viewer->first_page, STOCK_PIXMAP_FIRST_ARROW)
+       ADD_BUTTON_TO_TABLE(viewer->prev_page, STOCK_PIXMAP_LEFT_ARROW)
        viewer->cur_page = gtk_spin_button_new_with_range(0.0, 0.0, 1.0);
        viewer->zoom_scroll = gtk_spin_button_new_with_range(0.20, 8.0, 0.20);
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(viewer->zoom_scroll), 1.0);
@@ -1749,24 +1749,24 @@ static MimeViewer *pdf_viewer_create(void)
                                        0);
        col++;
 
-       ADD_BUTTON_TO_TABLE(viewer->next_page, GTK_STOCK_GO_FORWARD)
-       ADD_BUTTON_TO_TABLE(viewer->last_page, GTK_STOCK_GOTO_LAST)
+       ADD_BUTTON_TO_TABLE(viewer->next_page, STOCK_PIXMAP_RIGHT_ARROW)
+       ADD_BUTTON_TO_TABLE(viewer->last_page, STOCK_PIXMAP_LAST_ARROW)
        ADD_SEP_TO_TABLE
-       ADD_BUTTON_TO_TABLE(viewer->zoom_fit, GTK_STOCK_ZOOM_FIT)
-       ADD_BUTTON_TO_TABLE(viewer->zoom_in, GTK_STOCK_ZOOM_IN)
+       ADD_BUTTON_TO_TABLE(viewer->zoom_fit, STOCK_PIXMAP_ZOOM_FIT)
+       ADD_BUTTON_TO_TABLE(viewer->zoom_in, STOCK_PIXMAP_ZOOM_IN)
        gtk_table_attach(GTK_TABLE(viewer->widgets_table), GTK_WIDGET(viewer->zoom_scroll),
                                        col, col+1, 
                                        0, 1, 0, 0, 
                                        BUTTON_H_PADDING, 
                                        0);
        col++;
-       ADD_BUTTON_TO_TABLE(viewer->zoom_out, GTK_STOCK_ZOOM_OUT)
-       ADD_BUTTON_TO_TABLE(viewer->zoom_width, GTK_STOCK_FULLSCREEN)
+       ADD_BUTTON_TO_TABLE(viewer->zoom_out, STOCK_PIXMAP_ZOOM_OUT)
+       ADD_BUTTON_TO_TABLE(viewer->zoom_width, STOCK_PIXMAP_ZOOM_WIDTH)
        ADD_SEP_TO_TABLE
-       ADD_BUTTON_TO_TABLE(viewer->rotate_left, GTK_STOCK_UNDO)
-       ADD_BUTTON_TO_TABLE(viewer->rotate_right, GTK_STOCK_REDO)
+       ADD_BUTTON_TO_TABLE(viewer->rotate_left, STOCK_PIXMAP_ROTATE_LEFT)
+       ADD_BUTTON_TO_TABLE(viewer->rotate_right, STOCK_PIXMAP_ROTATE_RIGHT)
        ADD_SEP_TO_TABLE
-       ADD_BUTTON_TO_TABLE(viewer->doc_info, GTK_STOCK_INFO)
+       ADD_BUTTON_TO_TABLE(viewer->doc_info, STOCK_PIXMAP_DOC_INFO)
 
        viewer->doc_index = GTK_WIDGET(gtk_toggle_tool_button_new_from_stock(GTK_STOCK_INDEX));
        gtk_widget_set_size_request(GTK_WIDGET(viewer->doc_index), 26, 26);
index c3a21de83176b98d606cf7dfa21a9e5492a997ac..c0e61970b66ca282a220fac8ce3b858b2267ef93 100644 (file)
 #include "pixmaps/tray_unreadmail.xpm"
 #include "pixmaps/tray_unreadmarkedmail_offline.xpm"
 #include "pixmaps/tray_unreadmarkedmail.xpm"
+#include "pixmaps/doc_index.xpm"
+#include "pixmaps/doc_index_close.xpm"
+#include "pixmaps/doc_info.xpm"
+#include "pixmaps/first_arrow.xpm"
+#include "pixmaps/last_arrow.xpm"
+#include "pixmaps/left_arrow.xpm"
+#include "pixmaps/right_arrow.xpm"
+#include "pixmaps/rotate_left.xpm"
+#include "pixmaps/rotate_right.xpm"
+#include "pixmaps/zoom_fit.xpm"
+#include "pixmaps/zoom_in.xpm"
+#include "pixmaps/zoom_out.xpm"
+#include "pixmaps/zoom_width.xpm"
 
 typedef struct _StockPixmapData        StockPixmapData;
 
@@ -410,6 +423,19 @@ static StockPixmapData pixmaps[] =
        {tray_unreadmail_xpm                    , NULL, NULL, "tray_unreadmail", NULL},
        {tray_unreadmarkedmail_offline_xpm      , NULL, NULL, "tray_unreadmarkedmail_offline", NULL},
        {tray_unreadmarkedmail_xpm              , NULL, NULL, "tray_unreadmarkedmail", NULL},
+       {doc_index_xpm                          , NULL, NULL, "doc_index", NULL},
+       {doc_index_close_xpm                    , NULL, NULL, "doc_index_close", NULL},
+       {doc_info_xpm                           , NULL, NULL, "doc_info", NULL},
+       {first_arrow_xpm                        , NULL, NULL, "first_arrow", NULL},
+       {last_arrow_xpm                         , NULL, NULL, "last_arrow", NULL},
+       {left_arrow_xpm                         , NULL, NULL, "left_arrow", NULL},
+       {right_arrow_xpm                        , NULL, NULL, "right_arrow", NULL},
+       {rotate_left_xpm                        , NULL, NULL, "rotate_left", NULL},
+       {rotate_right_xpm                       , NULL, NULL, "rotate_right", NULL},
+       {zoom_fit_xpm                           , NULL, NULL, "zoom_fit", NULL},
+       {zoom_in_xpm                            , NULL, NULL, "zoom_in", NULL},
+       {zoom_out_xpm                           , NULL, NULL, "zoom_out", NULL},
+       {zoom_width_xpm                         , NULL, NULL, "zoom_width", NULL},
         {empty_xpm                              , NULL, NULL, "empty" , NULL}
 };
 
index 5902f7975fbf0a2424352622688a9fd9a0b59ed6..1a1162308c4e4f814ae69b22c3772decc593f024 100644 (file)
@@ -191,6 +191,19 @@ typedef enum
        STOCK_PIXMAP_TRAY_UNREADMAIL,
        STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL_OFFLINE,
        STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL,
+       STOCK_PIXMAP_DOC_INDEX,
+       STOCK_PIXMAP_DOC_INDEX_CLOSE,
+       STOCK_PIXMAP_DOC_INFO,
+       STOCK_PIXMAP_FIRST_ARROW,
+       STOCK_PIXMAP_LAST_ARROW,
+       STOCK_PIXMAP_LEFT_ARROW,
+       STOCK_PIXMAP_RIGHT_ARROW,
+       STOCK_PIXMAP_ROTATE_LEFT,
+       STOCK_PIXMAP_ROTATE_RIGHT,
+       STOCK_PIXMAP_ZOOM_FIT,
+       STOCK_PIXMAP_ZOOM_IN,
+       STOCK_PIXMAP_ZOOM_OUT,
+       STOCK_PIXMAP_ZOOM_WIDTH,
        STOCK_PIXMAP_EMPTY,              /* last entry */
        N_STOCK_PIXMAPS
 } StockPixmap;