(trunk gtk) #2616: "for the ratio mode button, use the yin/yang icon submitted by jimmac"

This commit is contained in:
Charles Kerr 2009-11-27 14:55:52 +00:00
parent 1f7db007cc
commit a8e11d9e3a
4 changed files with 274 additions and 3 deletions

View File

@ -11,15 +11,20 @@
*/
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libtransmission/transmission.h>
#include "actions.h"
#include "conf.h"
#include "tr-core.h"
#include "tr-prefs.h"
#include "lock.h"
#include "logo.h"
#include "ratio-icon.h"
#include "options-icon.h"
#include "turtles.h"
@ -141,7 +146,8 @@ static const BuiltinIconInfo my_fallback_icons[] =
{ tr_icon_lock, "transmission-lock" },
{ options_icon, "options" },
{ blue_turtle, "alt-speed-on" },
{ grey_turtle, "alt-speed-off" }
{ grey_turtle, "alt-speed-off" },
{ ratio_icon, "ratio" }
};
static void

72
gtk/ratio-icon.h Normal file
View File

@ -0,0 +1,72 @@
/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
#ifdef __SUNPRO_C
#pragma align 4 (ratio_icon)
#endif
#ifdef __GNUC__
static const guint8 ratio_icon[] __attribute__ ((__aligned__ (4))) =
#else
static const guint8 ratio_icon[] =
#endif
{ ""
/* Pixbuf magic (0x47646b50) */
"GdkP"
/* length: header (24) + pixel_data (915) */
"\0\0\3\253"
/* pixdata_type (0x2010002) */
"\2\1\0\2"
/* rowstride (64) */
"\0\0\0@"
/* width (16) */
"\0\0\0\20"
/* height (16) */
"\0\0\0\20"
/* pixel_data: */
"\204\0\0\0\0\3\267\274\267.\273\276\270\226\274\300\271\341\202\272\275"
"\265\371\3\274\300\271\341\272\277\267\224\271\271\264,\206\0\0\0\0\14"
"\252\252\252\6\264\270\261\235\267\271\262\367\310\311\306\376\314\316"
"\313\377\316\317\315\377\325\326\324\377\341\341\340\377\334\336\331"
"\375\271\273\264\366\265\267\261\234\252\252\252\6\203\0\0\0\0\6\277"
"\277\277\4\256\262\253\306\301\303\275\371\325\326\324\377\300\301\277"
"\377\256\256\254\377\202\246\246\244\377\6\255\256\253\377\344\344\342"
"\377\364\365\363\377\312\314\306\367\257\261\253\305\252\252\252\3\202"
"\0\0\0\0\26\250\254\245\220\275\276\273\371\325\325\324\377\251\252\250"
"\377\242\243\240\377\247\250\245\377\254\255\252\377\252\253\250\377"
"\245\246\243\377\260\261\256\377\355\356\354\377\365\365\364\377\307"
"\311\304\366\250\253\244\217\0\0\0\0\233\242\233!\244\250\243\362\327"
"\330\327\377\243\244\241\377\232\233\230\377\236\237\234\377\241\242"
"\237\377\202\243\244\241\377\202\240\241\236\377\14\353\354\351\377\351"
"\353\347\377\362\364\361\377\250\251\245\360\234\245\234\37\232\236\227"
"\223\303\303\300\376\272\273\271\377\220\221\216\377\223\224\221\377"
"\226\227\224\377\230\231\226\377\202\231\232\227\377\16\230\231\226\377"
"\250\250\245\377\351\353\350\377\345\347\343\377\355\356\353\377\323"
"\325\321\375\233\235\230\217\226\227\223\342\321\322\321\377\230\231"
"\226\377\210\211\206\377\213\214\211\377\214\215\212\377\216\217\214"
"\377\202\217\220\215\377\15\216\217\214\377\316\320\314\377\347\351\345"
"\377\343\346\341\377\344\347\341\377\352\354\351\377\225\227\222\340"
"\213\216\210\371\327\327\326\377\201\202\177\377\177\200}\377\201\202"
"\177\377\203\204\201\377\202\204\205\202\377\37\231\231\227\377\313\314"
"\310\377\347\351\346\377\344\347\342\377\341\343\336\377\336\341\333"
"\377\361\362\360\377\214\217\211\370\206\210\202\370\315\315\314\377"
"xyv\377vwt\377wxu\377yzw\377\242\243\237\377\330\332\326\377\347\351"
"\345\377\346\350\343\377\344\346\341\377\341\344\336\377\336\340\333"
"\377\333\336\330\377\356\360\355\377\206\210\202\370\202\206\177\341"
"\272\273\271\377}~|\377lmj\377mnk\377\223\225\221\377\341\344\337\377"
"\202\342\345\340\377\15\341\344\336\377\337\342\335\377\335\340\332\377"
"\332\335\327\377\334\340\331\377\340\342\336\377\202\204\200\340z|w\222"
"\243\244\241\376\217\220\215\377bc`\377deb\377\304\306\301\377\204\335"
"\340\332\377\15\333\336\330\377\331\334\326\377\327\332\323\377\340\343"
"\336\377\275\276\272\375{}w\217ssk\37yzu\361\237\240\235\377fgd\377Y"
"ZW\377\322\325\316\377\330\333\324\377\202\331\334\325\377\16\330\333"
"\324\377\327\332\323\377\325\331\321\377\327\332\323\377\342\345\340"
"\377|~z\357ooo\36\0\0\0\0qqn\220\206\207\204\371\213\214\212\377\\]Z"
"\377\271\274\266\377\323\327\317\377\202\324\330\320\377\202\323\327"
"\317\377\4\326\332\323\377\341\344\337\377\231\232\226\365prm\215\202"
"\0\0\0\0\6UUU\3jke\305}~z\371\177\200~\377\213\214\210\377\325\331\321"
"\377\202\324\330\320\377\6\326\332\322\377\333\336\330\377\332\335\330"
"\377\220\221\214\366jkf\303UUU\3\203\0\0\0\0\14UUU\6be_\234cc`\367|}"
"z\376\224\227\222\377\307\311\304\377\326\332\323\377\310\314\306\377"
"\244\247\242\374ffc\365be_\234fff\5\206\0\0\0\0\10UUU*Z\\W\223]^[\340"
"WXT\370XYU\370]]Z\340Y]W\222WWQ)\204\0\0\0\0"};

193
gtk/ratio.svg Normal file
View File

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg9434"
version="1.1"
inkscape:version="0.46+devel"
sodipodi:docname="New document 16">
<defs
id="defs9436">
<linearGradient
inkscape:collect="always"
id="linearGradient9999">
<stop
style="stop-color:#aeafac;stop-opacity:1"
offset="0"
id="stop10001" />
<stop
style="stop-color:#40413e;stop-opacity:1"
offset="1"
id="stop10003" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient9991">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop9993" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop9995" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient9968">
<stop
style="stop-color:#fcfcfc;stop-opacity:1"
offset="0"
id="stop9970" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop9972" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient9958">
<stop
style="stop-color:#babdb6;stop-opacity:1"
offset="0"
id="stop9960" />
<stop
style="stop-color:#545551;stop-opacity:1"
offset="1"
id="stop9962" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective9442" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient9958"
id="linearGradient9964"
x1="7.7075844"
y1="-0.099995844"
x2="7.7075844"
y2="16.240917"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient9968"
id="radialGradient9974"
cx="7.925817"
cy="3.8924"
fx="7.925817"
fy="3.8924"
r="8.5333334"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0793799,0,0,1.0793799,-0.62915033,-0.30897821)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient9991"
id="radialGradient9997"
cx="8.0132227"
cy="5.9987407"
fx="8.0132227"
fy="5.9987407"
r="8.5333334"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.5600338,0.02107361,-0.00901442,1.5228365,-20.627114,-3.3039688)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient9999"
id="radialGradient10005"
cx="7.8177705"
cy="5.1522107"
fx="7.8177705"
fy="5.1522107"
r="5"
gradientTransform="matrix(4.4249531,0.00559567,-0.00268791,2.1255406,-26.766919,-7.494981)"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-2.5637998"
inkscape:cy="6.7606103"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
showborder="false"
inkscape:window-width="987"
inkscape:window-height="743"
inkscape:window-x="1867"
inkscape:window-y="194"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid9444"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata9439">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
sodipodi:type="arc"
style="color:#000000;fill:url(#radialGradient9974);stroke:url(#linearGradient9964);stroke-width:1.06666671999999996;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;fill-opacity:1"
id="path9446"
sodipodi:cx="8"
sodipodi:cy="8"
sodipodi:rx="8"
sodipodi:ry="8"
d="M 16,8 A 8,8 0 1 1 0,8 8,8 0 1 1 16,8 z"
transform="matrix(0.9375,0,0,0.9375,0.5,1036.8622)" />
<path
style="color:#000000;fill:url(#radialGradient10005);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 7.5 1 C 7.4261073 1 7.354006 1.0267374 7.28125 1.03125 C 6.9461645 1.0520335 6.615496 1.1102231 6.3125 1.21875 C 6.2510359 1.2407652 6.1848192 1.2559486 6.125 1.28125 C 3.1693988 2.1008788 1 4.7834025 1 8 C 1 11.865993 4.1340068 15 8 15 C 8.1153415 15 8.2297754 15.0055 8.34375 15 C 6.4829455 14.918606 5 13.380864 5 11.5 C 5 9.7337601 6.2996271 8.207625 8 7.96875 C 9.6990013 7.7286589 11 6.2652648 11 4.5 C 11 2.7347352 9.6990013 1.2713411 8 1.03125 C 7.999374 1.0228493 8.0005937 1.0083125 8 1 C 7.8846585 1 7.7702246 0.9944845 7.65625 1 C 7.6046731 0.99774395 7.5521329 1 7.5 1 z "
transform="translate(0,1036.3622)"
id="path9982" />
<path
transform="matrix(0.8125,0,0,0.8125,1.5,1037.8622)"
d="M 16,8 A 8,8 0 1 1 0,8 8,8 0 1 1 16,8 z"
sodipodi:ry="8"
sodipodi:rx="8"
sodipodi:cy="8"
sodipodi:cx="8"
id="path9989"
style="color:#000000;fill:none;stroke:url(#radialGradient9997);stroke-width:1.23076928000000008;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -960,7 +960,7 @@ tr_window_new( GtkUIManager * ui_mgr, TrCore * core )
g_signal_connect( w, "clicked", G_CALLBACK(onOptionsClicked), p );
p->alt_speed_image[0] = gtk_image_new_from_stock( "alt-speed-off", -1 );
p->alt_speed_image[1] = gtk_image_new_from_stock( "alt-speed-on", -1 );
p->alt_speed_image[1] = gtk_image_new_from_stock( "alt-speed-on", -1 );
w = p->alt_speed_button = gtk_toggle_button_new( );
gtk_button_set_relief( GTK_BUTTON( w ), GTK_RELIEF_NONE );
g_object_ref( G_OBJECT( p->alt_speed_image[0] ) );
@ -997,7 +997,7 @@ tr_window_new( GtkUIManager * ui_mgr, TrCore * core )
gtk_widget_set_size_request( w, GUI_PAD, 0u );
gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );
w = gtk_button_new( );
gtk_container_add( GTK_CONTAINER( w ), gtk_image_new_from_stock( GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU ) );
gtk_container_add( GTK_CONTAINER( w ), gtk_image_new_from_stock( "ratio", GTK_ICON_SIZE_SMALL_TOOLBAR ) );
gtk_button_set_relief( GTK_BUTTON( w ), GTK_RELIEF_NONE );
g_signal_connect( w, "clicked", G_CALLBACK( onYinYangReleased ), p );
gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 );