1 Origin: Jeffrey Ratcliffe <jjr@debian.org>
2 Bug-Debian: https://bugs.debian.org/789101
3 Last-Update: 2016-02-24
7 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \
10 -EXTRA_DIST = gtkimageview-marshal.list wscript_build
11 +# Generate the GResource source file for icon files:
12 +resource_file = gtkimageview.gresource.xml
13 +BUILT_SOURCES += gtkimageview-resources.c
14 +gtkimageview-resources.c: $(resource_file) $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(resource_file))
15 + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(resource_file)
17 +EXTRA_DIST = gtkimageview-marshal.list wscript_build $(resource_file)
19 CLEANFILES = $(BUILT_SOURCES)
20 --- a/src/gtkimageview.gresource.xml
21 +++ b/src/gtkimageview.gresource.xml
23 +<?xml version="1.0" encoding="UTF-8"?>
25 + <gresource prefix="/org/gnome/gtkimageview">
26 + <file>gtkimageview-nav_button.png</file>
27 + <file>gtkimageview-nav_button_hc.png</file>
33 # Check for glib utils
34 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
35 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
36 +AC_PATH_PROG(GLIB_COMPILE_RESOURCES,[glib-compile-resources],no)
37 +AC_MSG_CHECKING([glib-compile-resources])
38 +if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
39 + GLIB_COMPILE_RESOURCES=""
40 + AC_MSG_RESULT([cannot be found in PATH.])
42 + AC_MSG_RESULT([usable.])
45 # 1.8 introduced the --rebuild-sections and --rebuild-types options to
46 # 1.gtkdoc-scan that we need.
47 --- a/src/gtkimagescrollwin.c
48 +++ b/src/gtkimagescrollwin.c
50 /*************************************************************/
51 /***** PRIVATE DATA ******************************************/
52 /*************************************************************/
54 -static const guint8 nav_button[] __attribute__ ((__aligned__ (4))) =
56 -static const guint8 nav_button[] =
60 - /* Pixbuf magic (0x47646b50) */
62 - /* length: header (24) + pixel_data (784) */
64 - /* pixdata_type (0x1010002) */
66 - /* rowstride (56) */
73 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377"
74 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
75 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0"
76 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
77 - "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0"
78 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
79 - "\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
80 - "\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377"
81 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
82 - "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0"
83 - "\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377"
84 - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
85 - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
86 - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
87 - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\377\0\0\0\377"
88 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0"
89 - "\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\0\0\0\0"
90 - "\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0"
91 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377"
92 - "\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
93 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0"
94 - "\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
95 - "\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\0\0"
96 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
97 - "\0\0\0\0\0\0\0\0\377\0\0\0\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
102 -static const guint8 nav_button_hc[] __attribute__ ((__aligned__ (4))) =
104 -static const guint8 nav_button_hc[] =
108 - /* Pixbuf magic (0x47646b50) */
110 - /* length: header (24) + pixel_data (784) */
112 - /* pixdata_type (0x1010002) */
114 - /* rowstride (56) */
121 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377\0\0\0"
122 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
123 - "\0\0\0\0\0\0\0>>>\377>>>\377>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0"
124 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377>>>\377>"
125 - ">>\377>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
126 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0"
127 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377\0\0\0\0\0\0\0\0\0\0"
128 - "\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0>>>\377\0\0\0\0\0\0\0\0\0\0"
129 - "\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0"
130 - "\0\0\0\0\0\0>>>\377>>>\377\0\0\0\0>>>\377>>>\377>>>\377>>>\377>>>\377"
131 - ">>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377"
132 - ">>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377>>>\377"
133 - ">>>\377>>>\377>>>\377\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0>"
134 - ">>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0"
135 - "\0\0\0>>>\377\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0"
136 - "\0\0\0>>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
137 - "\0\0\0\0>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
138 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>\377>>>\377>>>\377>>>\377"
139 - ">>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
140 - "\0\0\0\0\0>>>\377>>>\377>>>\377>>>\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
141 - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0>>>\377>>>"
142 - "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
145 G_DEFINE_TYPE(GtkImageScrollWin, gtk_image_scroll_win, GTK_TYPE_TABLE);
149 // Setup the navigator button.
151 - gdk_pixbuf_new_from_inline (-1, nav_button, FALSE, NULL);
152 + gdk_pixbuf_new_from_resource ("gtkimageview-nav_button.png", NULL);
153 window->nav_button_hc =
154 - gdk_pixbuf_new_from_inline (-1, nav_button_hc, FALSE, NULL);
155 + gdk_pixbuf_new_from_resource ("gtkimageview-nav_button_hc.png", NULL);
156 window->nav_image = gtk_image_new_from_pixbuf (window->nav_button);
158 window->nav_box = gtk_event_box_new ();