added support for throbbers with a different number of frames by adding a

* src/nautilus-throbber.c: (bump_throbber_frame),
	(nautilus_throbber_load_images):
	added support for throbbers with a different number of frames
	by adding a frame count fetched from the theme data

	* configure.in:
	* icons/eazel/Makefile.am:
	* icons/eazel/throbber/.cvsignore:
	* icons/eazel/throbber/Makefile.am:
	* icons/eazel/throbber/*.png:
	added a eazel logo throbber to the eazel theme

	* icons/eazel/eazel.xml:
	* icons/default.xml:
	* icons/gnome/gnome.xml:
	added the appropriate frame count to the relevant themes.
This commit is contained in:
Andy Hertzfeld 2000-10-14 02:54:55 +00:00
parent dd8cce3eb5
commit 2588ed12aa
25 changed files with 68 additions and 14 deletions

View file

@ -1,3 +1,22 @@
2000-10-13 Andy Hertzfeld <andy@eazel.com>
* src/nautilus-throbber.c: (bump_throbber_frame),
(nautilus_throbber_load_images):
added support for throbbers with a different number of frames
by adding a frame count fetched from the theme data
* configure.in:
* icons/eazel/Makefile.am:
* icons/eazel/throbber/.cvsignore:
* icons/eazel/throbber/Makefile.am:
* icons/eazel/throbber/*.png:
added a eazel logo throbber to the eazel theme
* icons/eazel/eazel.xml:
* icons/default.xml:
* icons/gnome/gnome.xml:
added the appropriate frame count to the relevant themes.
2000-10-13 Robey Pointer <robey@eazel.com>
* components/services/install/lib/eazel-install-object.c:

View file

@ -607,6 +607,7 @@ icons/arlo/Makefile
icons/arlo/sidebar_tab_pieces/Makefile
icons/arlo/backgrounds/Makefile
icons/eazel/Makefile
icons/eazel/throbber/Makefile
icons/gnome/Makefile
icons/throbber/Makefile
icons/vector/Makefile

View file

@ -7,5 +7,5 @@
<description TEXT="This simple theme uses the standard GNOME icons."/>
<toolbar FRAME_TYPE="in"/>
<thumbnails FRAME_OFFSETS="3,3,6,6"/>
<throbber URL="http://www.eazel.com"/>
<throbber FRAME_COUNT="28" URL="http://www.eazel.com"/>
</theme>

View file

@ -2,6 +2,8 @@ NULL=
eazeldir = $(datadir)/pixmaps/nautilus/eazel
SUBDIRS = throbber
eazel_DATA = \
Back.png \
Forward.png \

View file

@ -5,4 +5,5 @@
<desktop BACKGROUND_TILE_IMAGE="backgrounds/fleur_de_lis.png" BACKGROUND_COLOR="rgb:FFFF/FFFF/FFFF"/>
<toolbar ICON_THEME="eazel" FRAME_TYPE="none"/>
<zoom_control NUMBER_V_OFFSET="-6" DIGIT_WIDTH="6"/>
<throbber FRAME_COUNT="15" URL="http://www.eazel.com"/>
</theme>

View file

@ -0,0 +1,2 @@
Makefile
Makefile.in

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,24 @@
NULL=
throbberdir = $(datadir)/pixmaps/nautilus/eazel/throbber
throbber_DATA = \
001.png \
002.png \
003.png \
004.png \
005.png \
006.png \
007.png \
008.png \
009.png \
010.png \
011.png \
012.png \
013.png \
014.png \
015.png \
rest.png \
$(NULL)
EXTRA_DIST = $(throbber_DATA)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -6,5 +6,5 @@
<icon HIGHLIGHT_BACKGROUND_COLOR="rgb:0000/0000/0000" HIGHLIGHT_TEXT_COLOR="rgb:FFFF/FFFF/FFFF" TEXT_FILL_COLOR="rgb:FFFF/FFFF/FFFF"/>
<description TEXT="This theme uses the classic GNOME icons."/>
<thumbnails FRAME_OFFSETS="3,3,6,6"/>
<throbber URL="http://www.gnome.org"/>
<throbber FRAME_COUNT="28" URL="http://www.gnome.org"/>
</theme>

View file

@ -287,7 +287,7 @@ static int
bump_throbber_frame (NautilusThrobber *throbber)
{
throbber->details->current_frame += 1;
if (throbber->details->current_frame > throbber->details->max_frame) {
if (throbber->details->current_frame > throbber->details->max_frame - 1) {
throbber->details->current_frame = 0;
}
@ -389,30 +389,35 @@ static void
nautilus_throbber_load_images (NautilusThrobber *throbber)
{
int index;
char *throbber_frame_name;
char *throbber_frame_name, *frames;
GdkPixbuf *pixbuf;
nautilus_throbber_unload_images (throbber);
throbber->details->quiescent_pixbuf = load_themed_image ("throbber/rest.png", throbber->details->small_mode);
/* images are of the form throbber/001.png, 002.png, etc, so load them into a list
* until we get an error.
*/
throbber->details->max_frame = -1;
/* images are of the form throbber/001.png, 002.png, etc, so load them into a list */
frames = nautilus_theme_get_theme_data ("throbber", "FRAME_COUNT");
if (frames != NULL) {
throbber->details->max_frame = atoi (frames);
g_free (frames);
} else {
throbber->details->max_frame = 16;
}
index = 1;
while (TRUE) {
while (index <= throbber->details->max_frame) {
throbber_frame_name = make_throbber_frame_name (index);
pixbuf = load_themed_image (throbber_frame_name, throbber->details->small_mode);
g_free (throbber_frame_name);
if (pixbuf == NULL)
if (pixbuf == NULL) {
throbber->details->max_frame = index - 1;
break;
}
throbber->details->image_list = g_list_append (throbber->details->image_list, pixbuf);
index += 1;
throbber->details->max_frame += 1;
}
}
}
/* handle button presses by emitting the location changed signal */