gtk-demo: Group small images

Instead of showing 30 tabs, put all the cursor images
into one page.  Do the same for the small images in
the css animated background demo.
This commit is contained in:
Matthias Clasen 2020-08-12 20:04:35 -04:00
parent afa9d9aa8c
commit 7226878916
3 changed files with 183 additions and 121 deletions

View File

@ -4,7 +4,7 @@
<property name="name">default</property>
</object>
<object class="GdkCursor" id="default_cursor_image">
<property name="texture">resource:///cursors/default_cursor.png</property>
<property name="texture">resource:///cursors/images/default_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">5</property>
</object>
@ -13,7 +13,7 @@
<property name="fallback">default_cursor_image</property>
</object>
<object class="GdkCursor" id="default_cursor_image_fallback">
<property name="texture">resource:///cursors/default_cursor.png</property>
<property name="texture">resource:///cursors/images/default_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">5</property>
<property name="fallback">default_cursor</property>
@ -22,21 +22,21 @@
<property name="name">none</property>
</object>
<object class="GdkCursor" id="none_cursor_image">
<property name="texture">resource:///cursors/none_cursor.png</property>
<property name="texture">resource:///cursors/images/none_cursor.png</property>
</object>
<object class="GdkCursor" id="none_cursor_fallback">
<property name="name">none</property>
<property name="fallback">none_cursor_image</property>
</object>
<object class="GdkCursor" id="none_cursor_image_fallback">
<property name="texture">resource:///cursors/none_cursor.png</property>
<property name="texture">resource:///cursors/images/none_cursor.png</property>
<property name="fallback">none_cursor</property>
</object>
<object class="GdkCursor" id="gtk-logo_cursor">
<property name="name">gtk-logo</property>
</object>
<object class="GdkCursor" id="gtk-logo_cursor_image">
<property name="texture">resource:///cursors/gtk_logo_cursor.png</property>
<property name="texture">resource:///cursors/images/gtk_logo_cursor.png</property>
<property name="hotspot-x">18</property>
<property name="hotspot-y">2</property>
</object>
@ -45,7 +45,7 @@
<property name="fallback">gtk-logo_cursor_image</property>
</object>
<object class="GdkCursor" id="gtk-logo_cursor_image_fallback">
<property name="texture">resource:///cursors/gtk_logo_cursor.png</property>
<property name="texture">resource:///cursors/images/gtk_logo_cursor.png</property>
<property name="hotspot-x">18</property>
<property name="hotspot-y">2</property>
<property name="fallback">gtk-logo_cursor</property>
@ -54,7 +54,7 @@
<property name="name">context-menu</property>
</object>
<object class="GdkCursor" id="context-menu_cursor_image">
<property name="texture">resource:///cursors/context_menu_cursor.png</property>
<property name="texture">resource:///cursors/images/context_menu_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">5</property>
</object>
@ -63,7 +63,7 @@
<property name="fallback">context-menu_cursor_image</property>
</object>
<object class="GdkCursor" id="context-menu_cursor_image_fallback">
<property name="texture">resource:///cursors/context_menu_cursor.png</property>
<property name="texture">resource:///cursors/images/context_menu_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">5</property>
<property name="fallback">context-menu_cursor</property>
@ -72,7 +72,7 @@
<property name="name">help</property>
</object>
<object class="GdkCursor" id="help_cursor_image">
<property name="texture">resource:///cursors/help_cursor.png</property>
<property name="texture">resource:///cursors/images/help_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">27</property>
</object>
@ -81,7 +81,7 @@
<property name="fallback">help_cursor_image</property>
</object>
<object class="GdkCursor" id="help_cursor_image_fallback">
<property name="texture">resource:///cursors/help_cursor.png</property>
<property name="texture">resource:///cursors/images/help_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">27</property>
<property name="fallback">help_cursor</property>
@ -90,7 +90,7 @@
<property name="name">pointer</property>
</object>
<object class="GdkCursor" id="pointer_cursor_image">
<property name="texture">resource:///cursors/pointer_cursor.png</property>
<property name="texture">resource:///cursors/images/pointer_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">9</property>
</object>
@ -99,7 +99,7 @@
<property name="fallback">pointer_cursor_image</property>
</object>
<object class="GdkCursor" id="pointer_cursor_image_fallback">
<property name="texture">resource:///cursors/pointer_cursor.png</property>
<property name="texture">resource:///cursors/images/pointer_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">9</property>
<property name="fallback">pointer_cursor</property>
@ -108,7 +108,7 @@
<property name="name">progress</property>
</object>
<object class="GdkCursor" id="progress_cursor_image">
<property name="texture">resource:///cursors/progress_cursor.png</property>
<property name="texture">resource:///cursors/images/progress_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">4</property>
</object>
@ -117,7 +117,7 @@
<property name="fallback">progress_cursor_image</property>
</object>
<object class="GdkCursor" id="progress_cursor_image_fallback">
<property name="texture">resource:///cursors/progress_cursor.png</property>
<property name="texture">resource:///cursors/images/progress_cursor.png</property>
<property name="hotspot-x">5</property>
<property name="hotspot-y">4</property>
<property name="fallback">progress_cursor</property>
@ -126,7 +126,7 @@
<property name="name">wait</property>
</object>
<object class="GdkCursor" id="wait_cursor_image">
<property name="texture">resource:///cursors/wait_cursor.png</property>
<property name="texture">resource:///cursors/images/wait_cursor.png</property>
<property name="hotspot-x">11</property>
<property name="hotspot-y">11</property>
</object>
@ -135,7 +135,7 @@
<property name="fallback">wait_cursor_image</property>
</object>
<object class="GdkCursor" id="wait_cursor_image_fallback">
<property name="texture">resource:///cursors/wait_cursor.png</property>
<property name="texture">resource:///cursors/images/wait_cursor.png</property>
<property name="hotspot-x">11</property>
<property name="hotspot-y">11</property>
<property name="fallback">wait_cursor</property>
@ -144,7 +144,7 @@
<property name="name">cell</property>
</object>
<object class="GdkCursor" id="cell_cursor_image">
<property name="texture">resource:///cursors/cell_cursor.png</property>
<property name="texture">resource:///cursors/images/cell_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
</object>
@ -153,7 +153,7 @@
<property name="fallback">cell_cursor_image</property>
</object>
<object class="GdkCursor" id="cell_cursor_image_fallback">
<property name="texture">resource:///cursors/cell_cursor.png</property>
<property name="texture">resource:///cursors/images/cell_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
<property name="fallback">cell_cursor</property>
@ -162,7 +162,7 @@
<property name="name">crosshair</property>
</object>
<object class="GdkCursor" id="crosshair_cursor_image">
<property name="texture">resource:///cursors/crosshair_cursor.png</property>
<property name="texture">resource:///cursors/images/crosshair_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
</object>
@ -171,7 +171,7 @@
<property name="fallback">crosshair_cursor_image</property>
</object>
<object class="GdkCursor" id="crosshair_cursor_image_fallback">
<property name="texture">resource:///cursors/crosshair_cursor.png</property>
<property name="texture">resource:///cursors/images/crosshair_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
<property name="fallback">crosshair_cursor</property>
@ -180,7 +180,7 @@
<property name="name">text</property>
</object>
<object class="GdkCursor" id="text_cursor_image">
<property name="texture">resource:///cursors/text_cursor.png</property>
<property name="texture">resource:///cursors/images/text_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">15</property>
</object>
@ -189,7 +189,7 @@
<property name="fallback">text_cursor_image</property>
</object>
<object class="GdkCursor" id="text_cursor_image_fallback">
<property name="texture">resource:///cursors/text_cursor.png</property>
<property name="texture">resource:///cursors/images/text_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">15</property>
<property name="fallback">text_cursor</property>
@ -198,7 +198,7 @@
<property name="name">vertical-text</property>
</object>
<object class="GdkCursor" id="vertical-text_cursor_image">
<property name="texture">resource:///cursors/vertical_text_cursor.png</property>
<property name="texture">resource:///cursors/images/vertical_text_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
</object>
@ -207,7 +207,7 @@
<property name="fallback">vertical-text_cursor_image</property>
</object>
<object class="GdkCursor" id="vertical-text_cursor_image_fallback">
<property name="texture">resource:///cursors/vertical_text_cursor.png</property>
<property name="texture">resource:///cursors/images/vertical_text_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
<property name="fallback">vertical-text_cursor</property>
@ -216,7 +216,7 @@
<property name="name">alias</property>
</object>
<object class="GdkCursor" id="alias_cursor_image">
<property name="texture">resource:///cursors/alias_cursor.png</property>
<property name="texture">resource:///cursors/images/alias_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
</object>
@ -225,7 +225,7 @@
<property name="fallback">alias_cursor_image</property>
</object>
<object class="GdkCursor" id="alias_cursor_image_fallback">
<property name="texture">resource:///cursors/alias_cursor.png</property>
<property name="texture">resource:///cursors/images/alias_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
<property name="fallback">alias_cursor</property>
@ -234,7 +234,7 @@
<property name="name">copy</property>
</object>
<object class="GdkCursor" id="copy_cursor_image">
<property name="texture">resource:///cursors/copy_cursor.png</property>
<property name="texture">resource:///cursors/images/copy_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
</object>
@ -243,7 +243,7 @@
<property name="fallback">copy_cursor_image</property>
</object>
<object class="GdkCursor" id="copy_cursor_image_fallback">
<property name="texture">resource:///cursors/copy_cursor.png</property>
<property name="texture">resource:///cursors/images/copy_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
<property name="fallback">copy_cursor</property>
@ -252,7 +252,7 @@
<property name="name">move</property>
</object>
<object class="GdkCursor" id="move_cursor_image">
<property name="texture">resource:///cursors/move_cursor.png</property>
<property name="texture">resource:///cursors/images/move_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
</object>
@ -261,7 +261,7 @@
<property name="fallback">move_cursor_image</property>
</object>
<object class="GdkCursor" id="move_cursor_image_fallback">
<property name="texture">resource:///cursors/move_cursor.png</property>
<property name="texture">resource:///cursors/images/move_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
<property name="fallback">move_cursor</property>
@ -270,7 +270,7 @@
<property name="name">no-drop</property>
</object>
<object class="GdkCursor" id="no-drop_cursor_image">
<property name="texture">resource:///cursors/no_drop_cursor.png</property>
<property name="texture">resource:///cursors/images/no_drop_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
</object>
@ -279,7 +279,7 @@
<property name="fallback">no-drop_cursor_image</property>
</object>
<object class="GdkCursor" id="no-drop_cursor_image_fallback">
<property name="texture">resource:///cursors/no_drop_cursor.png</property>
<property name="texture">resource:///cursors/images/no_drop_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
<property name="fallback">no-drop_cursor</property>
@ -288,7 +288,7 @@
<property name="name">not-allowed</property>
</object>
<object class="GdkCursor" id="not-allowed_cursor_image">
<property name="texture">resource:///cursors/not_allowed_cursor.png</property>
<property name="texture">resource:///cursors/images/not_allowed_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
</object>
@ -297,7 +297,7 @@
<property name="fallback">not-allowed_cursor_image</property>
</object>
<object class="GdkCursor" id="not-allowed_cursor_image_fallback">
<property name="texture">resource:///cursors/not_allowed_cursor.png</property>
<property name="texture">resource:///cursors/images/not_allowed_cursor.png</property>
<property name="hotspot-x">12</property>
<property name="hotspot-y">11</property>
<property name="fallback">not-allowed_cursor</property>
@ -306,7 +306,7 @@
<property name="name">grab</property>
</object>
<object class="GdkCursor" id="grab_cursor_image">
<property name="texture">resource:///cursors/grab_cursor.png</property>
<property name="texture">resource:///cursors/images/grab_cursor.png</property>
<property name="hotspot-x">10</property>
<property name="hotspot-y">6</property>
</object>
@ -315,7 +315,7 @@
<property name="fallback">grab_cursor_image</property>
</object>
<object class="GdkCursor" id="grab_cursor_image_fallback">
<property name="texture">resource:///cursors/grab_cursor.png</property>
<property name="texture">resource:///cursors/images/grab_cursor.png</property>
<property name="hotspot-x">10</property>
<property name="hotspot-y">6</property>
<property name="fallback">grab_cursor</property>
@ -324,7 +324,7 @@
<property name="name">grabbing</property>
</object>
<object class="GdkCursor" id="grabbing_cursor_image">
<property name="texture">resource:///cursors/grabbing_cursor.png</property>
<property name="texture">resource:///cursors/images/grabbing_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">14</property>
</object>
@ -333,7 +333,7 @@
<property name="fallback">grabbing_cursor_image</property>
</object>
<object class="GdkCursor" id="grabbing_cursor_image_fallback">
<property name="texture">resource:///cursors/grabbing_cursor.png</property>
<property name="texture">resource:///cursors/images/grabbing_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">14</property>
<property name="fallback">grabbing_cursor</property>
@ -342,7 +342,7 @@
<property name="name">all-scroll</property>
</object>
<object class="GdkCursor" id="all-scroll_cursor_image">
<property name="texture">resource:///cursors/all_scroll_cursor.png</property>
<property name="texture">resource:///cursors/images/all_scroll_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
</object>
@ -351,7 +351,7 @@
<property name="fallback">all-scroll_cursor_image</property>
</object>
<object class="GdkCursor" id="all-scroll_cursor_image_fallback">
<property name="texture">resource:///cursors/all_scroll_cursor.png</property>
<property name="texture">resource:///cursors/images/all_scroll_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">15</property>
<property name="fallback">all-scroll_cursor</property>
@ -360,7 +360,7 @@
<property name="name">col-resize</property>
</object>
<object class="GdkCursor" id="col-resize_cursor_image">
<property name="texture">resource:///cursors/col_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/col_resize_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
</object>
@ -369,7 +369,7 @@
<property name="fallback">col-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="col-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/col_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/col_resize_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
<property name="fallback">col-resize_cursor</property>
@ -378,7 +378,7 @@
<property name="name">row-resize</property>
</object>
<object class="GdkCursor" id="row-resize_cursor_image">
<property name="texture">resource:///cursors/row_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/row_resize_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">17</property>
</object>
@ -387,7 +387,7 @@
<property name="fallback">row-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="row-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/row_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/row_resize_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">17</property>
<property name="fallback">row-resize_cursor</property>
@ -396,7 +396,7 @@
<property name="name">n-resize</property>
</object>
<object class="GdkCursor" id="n-resize_cursor_image">
<property name="texture">resource:///cursors/n_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/n_resize_cursor.png</property>
<property name="hotspot-x">17</property>
<property name="hotspot-y">7</property>
</object>
@ -405,7 +405,7 @@
<property name="fallback">n-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="n-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/n_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/n_resize_cursor.png</property>
<property name="hotspot-x">17</property>
<property name="hotspot-y">7</property>
<property name="fallback">n-resize_cursor</property>
@ -414,7 +414,7 @@
<property name="name">e-resize</property>
</object>
<object class="GdkCursor" id="e-resize_cursor_image">
<property name="texture">resource:///cursors/e_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/e_resize_cursor.png</property>
<property name="hotspot-x">25</property>
<property name="hotspot-y">17</property>
</object>
@ -423,7 +423,7 @@
<property name="fallback">e-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="e-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/e_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/e_resize_cursor.png</property>
<property name="hotspot-x">25</property>
<property name="hotspot-y">17</property>
<property name="fallback">e-resize_cursor</property>
@ -432,7 +432,7 @@
<property name="name">s-resize</property>
</object>
<object class="GdkCursor" id="s-resize_cursor_image">
<property name="texture">resource:///cursors/s_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/s_resize_cursor.png</property>
<property name="hotspot-x">17</property>
<property name="hotspot-y">23</property>
</object>
@ -441,7 +441,7 @@
<property name="fallback">s-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="s-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/s_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/s_resize_cursor.png</property>
<property name="hotspot-x">17</property>
<property name="hotspot-y">23</property>
<property name="fallback">s-resize_cursor</property>
@ -450,7 +450,7 @@
<property name="name">w-resize</property>
</object>
<object class="GdkCursor" id="w-resize_cursor_image">
<property name="texture">resource:///cursors/w_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/w_resize_cursor.png</property>
<property name="hotspot-x">8</property>
<property name="hotspot-y">17</property>
</object>
@ -459,7 +459,7 @@
<property name="fallback">w-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="w-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/w_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/w_resize_cursor.png</property>
<property name="hotspot-x">8</property>
<property name="hotspot-y">17</property>
<property name="fallback">w-resize_cursor</property>
@ -468,7 +468,7 @@
<property name="name">ne-resize</property>
</object>
<object class="GdkCursor" id="ne-resize_cursor_image">
<property name="texture">resource:///cursors/ne_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ne_resize_cursor.png</property>
<property name="hotspot-x">20</property>
<property name="hotspot-y">13</property>
</object>
@ -477,7 +477,7 @@
<property name="fallback">ne-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="ne-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/ne_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ne_resize_cursor.png</property>
<property name="hotspot-x">20</property>
<property name="hotspot-y">13</property>
<property name="fallback">ne-resize_cursor</property>
@ -486,7 +486,7 @@
<property name="name">nw-resize</property>
</object>
<object class="GdkCursor" id="nw-resize_cursor_image">
<property name="texture">resource:///cursors/nw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nw_resize_cursor.png</property>
<property name="hotspot-x">13</property>
<property name="hotspot-y">13</property>
</object>
@ -495,7 +495,7 @@
<property name="fallback">nw-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="nw-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/nw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nw_resize_cursor.png</property>
<property name="hotspot-x">13</property>
<property name="hotspot-y">13</property>
<property name="fallback">nw-resize_cursor</property>
@ -504,7 +504,7 @@
<property name="name">se-resize</property>
</object>
<object class="GdkCursor" id="se-resize_cursor_image">
<property name="texture">resource:///cursors/se_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/se_resize_cursor.png</property>
<property name="hotspot-x">19</property>
<property name="hotspot-y">19</property>
</object>
@ -513,7 +513,7 @@
<property name="fallback">se-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="se-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/se_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/se_resize_cursor.png</property>
<property name="hotspot-x">19</property>
<property name="hotspot-y">19</property>
<property name="fallback">se-resize_cursor</property>
@ -522,7 +522,7 @@
<property name="name">sw-resize</property>
</object>
<object class="GdkCursor" id="sw-resize_cursor_image">
<property name="texture">resource:///cursors/sw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/sw_resize_cursor.png</property>
<property name="hotspot-x">13</property>
<property name="hotspot-y">19</property>
</object>
@ -531,7 +531,7 @@
<property name="fallback">sw-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="sw-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/sw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/sw_resize_cursor.png</property>
<property name="hotspot-x">13</property>
<property name="hotspot-y">19</property>
<property name="fallback">sw-resize_cursor</property>
@ -540,7 +540,7 @@
<property name="name">ew-resize</property>
</object>
<object class="GdkCursor" id="ew-resize_cursor_image">
<property name="texture">resource:///cursors/ew_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ew_resize_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
</object>
@ -549,7 +549,7 @@
<property name="fallback">ew-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="ew-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/ew_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ew_resize_cursor.png</property>
<property name="hotspot-x">16</property>
<property name="hotspot-y">15</property>
<property name="fallback">ew-resize_cursor</property>
@ -558,7 +558,7 @@
<property name="name">ns-resize</property>
</object>
<object class="GdkCursor" id="ns-resize_cursor_image">
<property name="texture">resource:///cursors/ns_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ns_resize_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">17</property>
</object>
@ -567,7 +567,7 @@
<property name="fallback">ns-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="ns-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/ns_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/ns_resize_cursor.png</property>
<property name="hotspot-x">15</property>
<property name="hotspot-y">17</property>
<property name="fallback">ns-resize_cursor</property>
@ -576,7 +576,7 @@
<property name="name">nesw-resize</property>
</object>
<object class="GdkCursor" id="nesw-resize_cursor_image">
<property name="texture">resource:///cursors/nesw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nesw_resize_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">14</property>
</object>
@ -585,7 +585,7 @@
<property name="fallback">nesw-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="nesw-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/nesw_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nesw_resize_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">14</property>
<property name="fallback">nesw-resize_cursor</property>
@ -594,7 +594,7 @@
<property name="name">nwse-resize</property>
</object>
<object class="GdkCursor" id="nwse-resize_cursor_image">
<property name="texture">resource:///cursors/nwse_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nwse_resize_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">14</property>
</object>
@ -603,7 +603,7 @@
<property name="fallback">nwse-resize_cursor_image</property>
</object>
<object class="GdkCursor" id="nwse-resize_cursor_image_fallback">
<property name="texture">resource:///cursors/nwse_resize_cursor.png</property>
<property name="texture">resource:///cursors/images/nwse_resize_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">14</property>
<property name="fallback">nwse-resize_cursor</property>
@ -612,7 +612,7 @@
<property name="name">zoom-in</property>
</object>
<object class="GdkCursor" id="zoom-in_cursor_image">
<property name="texture">resource:///cursors/zoom_in_cursor.png</property>
<property name="texture">resource:///cursors/images/zoom_in_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">13</property>
</object>
@ -621,7 +621,7 @@
<property name="fallback">zoom-in_cursor_image</property>
</object>
<object class="GdkCursor" id="zoom-in_cursor_image_fallback">
<property name="texture">resource:///cursors/zoom_in_cursor.png</property>
<property name="texture">resource:///cursors/images/zoom_in_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">13</property>
<property name="fallback">zoom-in_cursor</property>
@ -630,7 +630,7 @@
<property name="name">zoom-out</property>
</object>
<object class="GdkCursor" id="zoom-out_cursor_image">
<property name="texture">resource:///cursors/zoom_out_cursor.png</property>
<property name="texture">resource:///cursors/images/zoom_out_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">13</property>
</object>
@ -639,7 +639,7 @@
<property name="fallback">zoom-out_cursor_image</property>
</object>
<object class="GdkCursor" id="zoom-out_cursor_image_fallback">
<property name="texture">resource:///cursors/zoom_out_cursor.png</property>
<property name="texture">resource:///cursors/images/zoom_out_cursor.png</property>
<property name="hotspot-x">14</property>
<property name="hotspot-y">13</property>
<property name="fallback">zoom-out_cursor</property>
@ -682,7 +682,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/default_cursor.png</property>
<property name="paintable">resource:///cursors/images/default_cursor.png</property>
</object>
</child>
<child>
@ -742,7 +742,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/none_cursor.png</property>
<property name="paintable">resource:///cursors/images/none_cursor.png</property>
</object>
</child>
<child>
@ -802,7 +802,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/gtk_logo_cursor.png</property>
<property name="paintable">resource:///cursors/images/gtk_logo_cursor.png</property>
</object>
</child>
<child>
@ -875,7 +875,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/context_menu_cursor.png</property>
<property name="paintable">resource:///cursors/images/context_menu_cursor.png</property>
</object>
</child>
<child>
@ -935,7 +935,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/help_cursor.png</property>
<property name="paintable">resource:///cursors/images/help_cursor.png</property>
</object>
</child>
<child>
@ -995,7 +995,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/pointer_cursor.png</property>
<property name="paintable">resource:///cursors/images/pointer_cursor.png</property>
</object>
</child>
<child>
@ -1055,7 +1055,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/progress_cursor.png</property>
<property name="paintable">resource:///cursors/images/progress_cursor.png</property>
</object>
</child>
<child>
@ -1115,7 +1115,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/wait_cursor.png</property>
<property name="paintable">resource:///cursors/images/wait_cursor.png</property>
</object>
</child>
<child>
@ -1188,7 +1188,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/cell_cursor.png</property>
<property name="paintable">resource:///cursors/images/cell_cursor.png</property>
</object>
</child>
<child>
@ -1248,7 +1248,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/crosshair_cursor.png</property>
<property name="paintable">resource:///cursors/images/crosshair_cursor.png</property>
</object>
</child>
<child>
@ -1308,7 +1308,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/text_cursor.png</property>
<property name="paintable">resource:///cursors/images/text_cursor.png</property>
</object>
</child>
<child>
@ -1368,7 +1368,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/vertical_text_cursor.png</property>
<property name="paintable">resource:///cursors/images/vertical_text_cursor.png</property>
</object>
</child>
<child>
@ -1441,7 +1441,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/alias_cursor.png</property>
<property name="paintable">resource:///cursors/images/alias_cursor.png</property>
</object>
</child>
<child>
@ -1501,7 +1501,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/copy_cursor.png</property>
<property name="paintable">resource:///cursors/images/copy_cursor.png</property>
</object>
</child>
<child>
@ -1561,7 +1561,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/move_cursor.png</property>
<property name="paintable">resource:///cursors/images/move_cursor.png</property>
</object>
</child>
<child>
@ -1621,7 +1621,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/no_drop_cursor.png</property>
<property name="paintable">resource:///cursors/images/no_drop_cursor.png</property>
</object>
</child>
<child>
@ -1681,7 +1681,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/not_allowed_cursor.png</property>
<property name="paintable">resource:///cursors/images/not_allowed_cursor.png</property>
</object>
</child>
<child>
@ -1741,7 +1741,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/grab_cursor.png</property>
<property name="paintable">resource:///cursors/images/grab_cursor.png</property>
</object>
</child>
<child>
@ -1801,7 +1801,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/grabbing_cursor.png</property>
<property name="paintable">resource:///cursors/images/grabbing_cursor.png</property>
</object>
</child>
<child>
@ -1874,7 +1874,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/all_scroll_cursor.png</property>
<property name="paintable">resource:///cursors/images/all_scroll_cursor.png</property>
</object>
</child>
<child>
@ -1934,7 +1934,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/col_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/col_resize_cursor.png</property>
</object>
</child>
<child>
@ -1994,7 +1994,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/row_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/row_resize_cursor.png</property>
</object>
</child>
<child>
@ -2054,7 +2054,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/n_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/n_resize_cursor.png</property>
</object>
</child>
<child>
@ -2114,7 +2114,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/e_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/e_resize_cursor.png</property>
</object>
</child>
<child>
@ -2174,7 +2174,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/s_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/s_resize_cursor.png</property>
</object>
</child>
<child>
@ -2234,7 +2234,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/w_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/w_resize_cursor.png</property>
</object>
</child>
<child>
@ -2294,7 +2294,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/ne_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/ne_resize_cursor.png</property>
</object>
</child>
<child>
@ -2354,7 +2354,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/nw_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/nw_resize_cursor.png</property>
</object>
</child>
<child>
@ -2414,7 +2414,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/sw_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/sw_resize_cursor.png</property>
</object>
</child>
<child>
@ -2474,7 +2474,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/se_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/se_resize_cursor.png</property>
</object>
</child>
<child>
@ -2534,7 +2534,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/ew_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/ew_resize_cursor.png</property>
</object>
</child>
<child>
@ -2594,7 +2594,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/ns_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/ns_resize_cursor.png</property>
</object>
</child>
<child>
@ -2654,7 +2654,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/nesw_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/nesw_resize_cursor.png</property>
</object>
</child>
<child>
@ -2714,7 +2714,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/nwse_resize_cursor.png</property>
<property name="paintable">resource:///cursors/images/nwse_resize_cursor.png</property>
</object>
</child>
<child>
@ -2787,7 +2787,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/zoom_in_cursor.png</property>
<property name="paintable">resource:///cursors/images/zoom_in_cursor.png</property>
</object>
</child>
<child>
@ -2847,7 +2847,7 @@
<property name="spacing">10</property>
<child>
<object class="GtkImage">
<property name="paintable">resource:///cursors/zoom_out_cursor.png</property>
<property name="paintable">resource:///cursors/images/zoom_out_cursor.png</property>
</object>
</child>
<child>

View File

@ -51,6 +51,8 @@
<file>cssview.css</file>
<file>reset.css</file>
<file>background.jpg</file>
</gresource>
<gresource prefix="/css_pixbufs/images">
<file>apple-red.png</file>
<file>gnome-applets.png</file>
<file>gnome-calendar.png</file>
@ -67,6 +69,8 @@
</gresource>
<gresource prefix="/cursors">
<file>cursors.ui</file>
</gresource>
<gresource prefix="/cursors/images">
<file>alias_cursor.png</file>
<file>all_scroll_cursor.png</file>
<file>cell_cursor.png</file>

View File

@ -362,8 +362,9 @@ fontify (const char *format,
}
static GtkWidget *
display_image (const char *format,
const char *resource)
display_image (const char *format,
const char *resource,
char **label)
{
GtkWidget *sw, *image;
@ -377,8 +378,56 @@ display_image (const char *format,
}
static GtkWidget *
display_text (const char *format,
const char *resource)
display_images (const char *format,
const char *resource_dir,
char **label)
{
char **resources;
GtkWidget *grid;
GtkWidget *sw;
GtkWidget *widget;
guint i;
resources = g_resources_enumerate_children (resource_dir, 0, NULL);
if (resources == NULL)
return NULL;
sw = gtk_scrolled_window_new ();
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
grid = gtk_flow_box_new ();
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (grid), GTK_SELECTION_NONE);
gtk_widget_set_valign (grid, GTK_ALIGN_START);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), grid);
for (i = 0; resources[i]; i++)
{
char *resource_name;
GtkWidget *box;
resource_name = g_strconcat (resource_dir, "/", resources[i], NULL);
widget = display_image (NULL, resource_name, NULL);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_append (GTK_BOX (box), widget);
gtk_box_append (GTK_BOX (box), gtk_label_new (resources[i]));
gtk_flow_box_insert (GTK_FLOW_BOX (grid), box, -1);
g_free (resource_name);
}
g_strfreev (resources);
*label = g_strdup ("Images");
return sw;
}
static GtkWidget *
display_text (const char *format,
const char *resource,
char **label)
{
GtkTextBuffer *buffer;
GtkWidget *textview, *sw;
@ -424,8 +473,9 @@ display_text (const char *format,
}
static GtkWidget *
display_video (const char *format,
const char *resource)
display_video (const char *format,
const char *resource,
char **label)
{
GtkWidget *video;
@ -453,8 +503,9 @@ display_nothing (const char *resource)
static struct {
const char *extension;
const char *format;
GtkWidget * (* display_func) (const char *format,
const char *resource);
GtkWidget * (* display_func) (const char *format,
const char *resource,
char **label);
} display_funcs[] = {
{ ".gif", NULL, display_image },
{ ".jpg", NULL, display_image },
@ -465,7 +516,8 @@ static struct {
{ ".h", "c", display_text },
{ ".txt", NULL, display_text },
{ ".ui", "xml", display_text },
{ ".webm", NULL, display_video }
{ ".webm", NULL, display_video },
{ "images/", NULL, display_images }
};
static void
@ -475,6 +527,7 @@ add_data_tab (const char *demoname)
char **resources;
GtkWidget *widget, *label;
guint i, j;
char *label_string;
resource_dir = g_strconcat ("/", demoname, NULL);
resources = g_resources_enumerate_children (resource_dir, 0, NULL);
@ -488,18 +541,22 @@ add_data_tab (const char *demoname)
{
resource_name = g_strconcat (resource_dir, "/", resources[i], NULL);
for (j = 0; j < G_N_ELEMENTS(display_funcs); j++)
for (j = 0; j < G_N_ELEMENTS (display_funcs); j++)
{
if (g_str_has_suffix (resource_name, display_funcs[j].extension))
break;
}
if (j < G_N_ELEMENTS(display_funcs))
widget = display_funcs[j].display_func (display_funcs[j].format, resource_name);
label_string = NULL;
if (j < G_N_ELEMENTS (display_funcs))
widget = display_funcs[j].display_func (display_funcs[j].format,
resource_name,
&label_string);
else
widget = display_nothing (resource_name);
label = gtk_label_new (resources[i]);
label = gtk_label_new (label_string ? label_string : resources[i]);
gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook), widget),
@ -507,6 +564,7 @@ add_data_tab (const char *demoname)
NULL);
g_free (resource_name);
g_free (label_string);
}
g_strfreev (resources);