~ubuntu-branches/ubuntu/raring/sflphone/raring

« back to all changes in this revision

Viewing changes to sflphone-client-gnome/src/icons/README

  • Committer: Package Import Robot
  • Author(s): Francois Marier
  • Date: 2011-11-25 13:24:12 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20111125132412-dc4qvhyosk74cd42
Tags: 1.0.1-4
Don't assume that arch:all packages will get built (closes: #649726)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
To add a svg icon as a stock icon:
2
 
 
3
 
1. Dump the raw data from the svg: 
4
 
gdk-pixbuf-csource --raw --name=gnome_stock_example example.svg
5
 
 
6
 
2. Copy the output in the file sflphone-client-gnome/src/icons/pixmaps_data.h
7
 
 
8
 
3. Create the alias in sflphone-client-gnome/src/icons/icon_factory.h :
9
 
   #define GTK_STOCK_EXAMPLE "gnome-stock-example"
10
 
 
11
 
4. Add the icon to the factory. In sflphone-client-gnome/src/icons/icon_factory.c, function register_sflphone_stock_icons, add the line:
12
 
  add_icon (factory, GTK_STOCK_EXAMPLE, gnome_stock_example, GTK_ICON_SIZE_SMALL_TOOLBAR)
13
 
 
14
 
  You may now use this icon in the code just like a GTK stock icon, the stock id being GTK_STOCK_EXAMPLE.