Commit cbada247 authored by Stefan Walter's avatar Stefan Walter

Add Tango style icons.

    * daemon/seahorse-daemon.c:
    * daemon/seahorse-daemon.h:
    * daemon/seahorse-sharing.c:
    * libseahorse/Makefile.am:
    * libseahorse/seahorse-gtkstock.c:
    * libseahorse/seahorse-gtkstock.h:
    * pixmaps/Makefile.am:
    * pixmaps/*.xcf (removed):
    * pixmaps/*.png (removed):
    * pixmaps/22x22/Makefile.am:
    * pixmaps/22x22/*.png (added):
    * pixmaps/22x22/*.svg (added):
    * pixmaps/48x48/Makefile.am:
    * pixmaps/48x48/*.png (added):
    * pixmaps/scaleable/Makefile.am:
    * pixmaps/scaleable/*.svg:
    * plugins/applet/seahorse-applet.c:
    * src/seahorse-ssh-upload.c:
    * configure.in: Add Tango style icons.
parent 9deedaba
2006-03-20 Nate Nielsen <nielsen@memberwebs.com>
* daemon/seahorse-daemon.c:
* daemon/seahorse-daemon.h:
* daemon/seahorse-sharing.c:
* libseahorse/Makefile.am:
* libseahorse/seahorse-gtkstock.c:
* libseahorse/seahorse-gtkstock.h:
* pixmaps/Makefile.am:
* pixmaps/*.xcf (removed):
* pixmaps/*.png (removed):
* pixmaps/22x22/Makefile.am:
* pixmaps/22x22/*.png (added):
* pixmaps/22x22/*.svg (added):
* pixmaps/48x48/Makefile.am:
* pixmaps/48x48/*.png (added):
* pixmaps/scaleable/Makefile.am:
* pixmaps/scaleable/*.svg:
* plugins/applet/seahorse-applet.c:
* src/seahorse-ssh-upload.c:
* configure.in: Add Tango style icons.
2006-03-20 Nate Nielsen <nielsen@memberwebs.com>
* src/seahorse-sign.c: Fix build warnings
2006-03-18 Nate Nielsen <nielsen@memberwebs.com>
* configure.in: Fix dependency problem for avahi-client
......
......@@ -626,6 +626,9 @@ help/Makefile
help/C/Makefile
data/Makefile
pixmaps/Makefile
pixmaps/22x22/Makefile
pixmaps/48x48/Makefile
pixmaps/scaleable/Makefile
src/Makefile
agent/Makefile
daemon/Makefile
......
......@@ -45,6 +45,12 @@
static gboolean g_daemonize = TRUE;
static gboolean g_quit = FALSE;
static const gchar *daemon_icons[] = {
SEAHORSE_ICON_SHARING,
NULL
};
static const struct poptOption options[] = {
{ "no-daemonize", 'd', POPT_ARG_NONE | POPT_ARG_VAL, &g_daemonize, FALSE,
N_("Do not daemonize seahorse-agent"), NULL },
......@@ -208,7 +214,7 @@ int main(int argc, char* argv[])
#endif
err (1, _("couldn't drop privileges properly"));
program = gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
program = gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_POPT_TABLE, options,
GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Daemon (Seahorse)"),
GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
......@@ -232,7 +238,8 @@ int main(int argc, char* argv[])
prepare_logging ();
/* Insert Icons into Stock */
seahorse_gtkstock_init();
seahorse_gtkstock_init ();
seahorse_gtkstock_add_icons (daemon_icons);
/* Make the default SeahorseContext */
seahorse_context_new (TRUE, 0);
......
......@@ -24,6 +24,8 @@
#include "config.h"
#define SEAHORSE_ICON_SHARING "seahorse-share-keys"
/* seahorse-sharing.c ------------------------------------------------------- */
#ifdef WITH_SHARING
......
......@@ -272,7 +272,7 @@ show_tray ()
box = gtk_event_box_new ();
image = gtk_image_new_from_stock (SEAHORSE_STOCK_SHARE_KEYS, (GtkIconSize)-1);
//image = gtk_image_new_from_file (PIXMAPSDIR "seahorse-share-keys.png");
gtk_container_add (GTK_CONTAINER (box), image);
gtk_container_add (GTK_CONTAINER (tray_icon), box);
......
gladedir = $(datadir)/seahorse/glade/
localedir = $(datadir)/locale
pixmapsdir = $(datadir)/pixmaps/
pixmapsdir = $(datadir)/pixmaps/seahorse/
seahorselibexecbindir = $(libexecdir)/seahorse/
INCLUDES = -I$(top_builddir) \
......
......@@ -29,40 +29,15 @@
#include "seahorse-gtkstock.h"
static const SeahorseStockIcon seahorse_icons[] = {
{ SEAHORSE_STOCK_KEY, "seahorse", "seahorse-key.png" },
{ SEAHORSE_STOCK_PERSON, "seahorse", "seahorse-person.png" },
{ SEAHORSE_STOCK_SIGN, "seahorse", "seahorse-sign.svg" },
{ SEAHORSE_STOCK_SEAHORSE, NULL, "seahorse.png" },
{ SEAHORSE_STOCK_SECRET, "seahorse", "seahorse-secret.png" },
{ SEAHORSE_STOCK_SHARE_KEYS, "seahorse", "seahorse-share-keys.png" },
{ SEAHORSE_STOCK_KEY_SSH, "seahorse", "seahorse-key-ssh.png" },
{ SEAHORSE_STOCK_KEY_SSH_LRG, "seahorse", "seahorse-key-ssh-large.png" },
{ NULL }
static const gchar *seahorse_icons[] = {
SEAHORSE_STOCK_KEY,
SEAHORSE_STOCK_SECRET,
SEAHORSE_STOCK_KEY_SSH,
SEAHORSE_STOCK_PERSON,
SEAHORSE_STOCK_SIGN,
NULL
};
static gchar *
find_file(const char *dir, const char *base)
{
char *filename;
if (base == NULL)
return NULL;
if (dir == NULL)
filename = g_build_filename (DATA_DIR, "pixmaps", base, NULL);
else
filename = g_build_filename (DATA_DIR, "pixmaps", dir, base, NULL);
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
g_critical ("Unable to load stock pixmap %s\n", base);
g_free (filename);
return NULL;
}
return filename;
}
void
seahorse_gtkstock_init(void)
{
......@@ -75,14 +50,39 @@ seahorse_gtkstock_init(void)
seahorse_gtkstock_add_icons (seahorse_icons);
}
static GtkIconSource*
make_icon_source (const gchar *icon, const gchar *base, const gchar *ext,
GtkIconSize size)
{
GtkIconSource *source;
gchar *filename;
filename = g_strdup_printf ("%s/%s/%s.%s", PIXMAPSDIR, base, icon, ext);
source = gtk_icon_source_new ();
gtk_icon_source_set_filename (source, filename);
gtk_icon_source_set_direction_wildcarded (source, TRUE);
gtk_icon_source_set_state_wildcarded (source, TRUE);
if (size == -1) {
gtk_icon_source_set_size_wildcarded (source, TRUE);
} else {
gtk_icon_source_set_size_wildcarded (source, FALSE);
gtk_icon_source_set_size (source, size);
}
g_free(filename);
return source;
}
void
seahorse_gtkstock_add_icons (const SeahorseStockIcon *icons)
seahorse_gtkstock_add_icons (const gchar **icons)
{
GtkIconFactory *factory;
GtkIconSource *source;
GtkIconSet *iconset;
GtkWidget *win;
gchar *filename;
/* Setup the icon factory. */
factory = gtk_icon_factory_new ();
......@@ -94,25 +94,30 @@ seahorse_gtkstock_add_icons (const SeahorseStockIcon *icons)
/* TODO: Implement differently sized icons here */
for ( ; icons->id; icons++) {
filename = find_file(icons->dir, icons->filename);
if (filename == NULL)
continue;
source = gtk_icon_source_new ();
gtk_icon_source_set_filename (source, filename);
gtk_icon_source_set_direction_wildcarded (source, TRUE);
gtk_icon_source_set_size_wildcarded (source, TRUE);
gtk_icon_source_set_state_wildcarded (source, TRUE);
g_free(filename);
for ( ; *icons; icons++) {
iconset = gtk_icon_set_new ();
source = make_icon_source (*icons, "22x22", "png", GTK_ICON_SIZE_BUTTON);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
source = make_icon_source (*icons, "22x22", "png", GTK_ICON_SIZE_MENU);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
source = make_icon_source (*icons, "22x22", "png", GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
source = make_icon_source (*icons, "22x22", "png", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
source = make_icon_source (*icons, "48x48", "png", GTK_ICON_SIZE_DIALOG);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
source = make_icon_source (*icons, "scaleable", "svg", -1);
gtk_icon_set_add_source (iconset, source);
gtk_icon_source_free (source);
gtk_icon_factory_add (factory, icons->id, iconset);
gtk_icon_factory_add (factory, *icons, iconset);
gtk_icon_set_unref (iconset);
}
......
......@@ -30,20 +30,14 @@
#define SEAHORSE_STOCK_KEY "seahorse-key"
#define SEAHORSE_STOCK_PERSON "seahorse-person"
#define SEAHORSE_STOCK_SIGN "seahorse-sign"
#define SEAHORSE_STOCK_SEAHORSE "seahorse"
#define SEAHORSE_STOCK_SECRET "seahorse-secret"
#define SEAHORSE_STOCK_SHARE_KEYS "seahorse-share-keys"
#define SEAHORSE_STOCK_SECRET "seahorse-key-personal"
#define SEAHORSE_STOCK_KEY_SSH "seahorse-key-ssh"
#define SEAHORSE_STOCK_KEY_SSH_LRG "seahorse-key-ssh-large"
typedef struct _SeahorseStockIcon {
const char *id;
const char *dir;
const char *filename;
} SeahorseStockIcon;
/* TODO: For now this is the default icon */
#define SEAHORSE_STOCK_SEAHORSE SEAHORSE_STOCK_SECRET
void seahorse_gtkstock_init (void);
void seahorse_gtkstock_add_icons (const SeahorseStockIcon *icons);
void seahorse_gtkstock_add_icons (const gchar **icons);
#endif /* _SEAHORSE_GTKSTOCK_H_ */
icon22dir = $(datadir)/pixmaps/seahorse/22x22/
icon22_DATA = seahorse-applet-encrypted.png \
seahorse-applet-key.png \
seahorse-applet-signed.png \
seahorse-applet-text.png \
seahorse-applet-unknown.png \
seahorse-key.png \
seahorse-key-personal.png \
seahorse-key-ssh.png \
seahorse-share-keys.png
iconsrc = seahorse-applet-encrypted.svg \
seahorse-applet-key.svg \
seahorse-applet-signed.svg \
seahorse-applet-text.svg \
seahorse-applet-unknown.svg \
seahorse-key.svg \
seahorse-key-personal.svg \
seahorse-key-ssh.svg \
seahorse-share-keys.svg
EXTRA_DIST = $(iconsrc) $(icon22_DATA)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
icon48dir = $(datadir)/pixmaps/seahorse/48x48/
icon48_DATA = seahorse-applet.png \
seahorse-applet-encrypted.png \
seahorse-applet-key.png \
seahorse-applet-signed.png \
seahorse-applet-text.png \
seahorse-applet-unknown.png \
seahorse-key.png \
seahorse-key-personal.png \
seahorse-key-ssh.png \
seahorse-person.png \
seahorse-share-keys.png \
seahorse-sign.png \
seahorse-sign-bad.png \
seahorse-sign-ok.png \
seahorse-sign-unknown.png
EXTRA_DIST = $(icon48_DATA)
INCLUDES = -DDATA_DIR=\""$(datadir)"\"
pixmap_DATA = seahorse.png \
seahorse-applet.png
appicon_DATA = seahorse-secret.png \
seahorse-key.png \
seahorse-key-ssh.png \
seahorse-key-ssh-large.png \
seahorse-share-keys.png \
seahorse-person.png \
seahorse-unknown.png \
seahorse-good.png \
seahorse-bad.png \
seahorse-sign.svg \
seahorse-applet-encrypted.png \
seahorse-applet-key.png \
seahorse-applet-signed.png \
seahorse-applet-text.png \
seahorse-applet-unknown.png
SUBDIRS = 22x22 48x48 scaleable
pixmapdir = $(datadir)/pixmaps/
appicondir = $(datadir)/pixmaps/seahorse
pixmap_DATA = seahorse.png
desktop_iconsdir = $(datadir)/icons/hicolor/48x48/apps
desktop_icons_DATA = seahorse.png
EXTRA_DIST = $(pixmap_DATA) \
$(appicon_DATA) \
seahorse-share-keys.xcf \
seahorse-applet.xcf
EXTRA_DIST = seahorse.png
pixmapdir = $(datadir)/pixmaps/
pixmap_DATA = seahorse-applet.svg
iconsvgdir = $(datadir)/pixmaps/seahorse/scaleable/
iconsvg_DATA = seahorse-applet.svg \
seahorse-applet-encrypted.svg \
seahorse-applet-key.svg \
seahorse-applet-signed.svg \
seahorse-applet-text.svg \
seahorse-applet-unknown.svg \
seahorse-key.svg \
seahorse-key-personal.svg \
seahorse-key-ssh.svg \
seahorse-person.svg \
seahorse-share-keys.svg \
seahorse-sign.svg \
seahorse-sign-bad.svg \
seahorse-sign-ok.svg \
seahorse-sign-unknown.svg
EXTRA_DIST = $(iconsvg_DATA)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,15 +9,18 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docbase="/home/jimmac/gfx/ximian/tango-icon-theme/scalable/mimetypes"
sodipodi:docname="application-certificate.svg"
inkscape:version="0.42+devel"
sodipodi:docbase="/data/Desktop/icons/scaleable"
sodipodi:docname="seahorse-sign.svg"
inkscape:version="0.42"
sodipodi:version="0.32"
id="svg5105"
xml:space="preserve"
viewBox="0 0 48 48"
height="48.000000px"
width="48.000000px"><metadata
width="48.000000px"
inkscape:export-filename="/data/Desktop/icons/scaleable/seahorse-sign.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"><metadata
id="metadata5189">
<rdf:RDF>
<cc:Work
......
......@@ -51,13 +51,13 @@
#define ICON_CLIPBOARD_KEY "seahorse-applet-key"
#define ICON_CLIPBOARD_DEFAULT ICON_CLIPBOARD_ENCRYPTED
static const SeahorseStockIcon clipboard_icons[] = {
{ ICON_CLIPBOARD_UNKNOWN, "seahorse", ICON_CLIPBOARD_UNKNOWN ".png" },
{ ICON_CLIPBOARD_TEXT, "seahorse", ICON_CLIPBOARD_TEXT ".png" },
{ ICON_CLIPBOARD_ENCRYPTED, "seahorse", ICON_CLIPBOARD_ENCRYPTED ".png" },
{ ICON_CLIPBOARD_SIGNED, "seahorse", ICON_CLIPBOARD_SIGNED ".png" },
{ ICON_CLIPBOARD_KEY, "seahorse", ICON_CLIPBOARD_KEY ".png" },
{ NULL }
static const gchar *clipboard_icons[] = {
ICON_CLIPBOARD_UNKNOWN,
ICON_CLIPBOARD_TEXT,
ICON_CLIPBOARD_ENCRYPTED,
ICON_CLIPBOARD_SIGNED,
ICON_CLIPBOARD_KEY,
NULL
};
typedef enum {
......
......@@ -172,7 +172,8 @@ seahorse_ssh_upload_prompt (GList *keys)
/* Set the image properly */
w = glade_xml_get_widget (swidget->xml, "icon-image");
gtk_image_set_from_stock (GTK_IMAGE (w), SEAHORSE_STOCK_KEY_SSH_LRG, GTK_ICON_SIZE_DIALOG);
gtk_image_set_from_stock (GTK_IMAGE (w), SEAHORSE_STOCK_KEY_SSH,
GTK_ICON_SIZE_DIALOG);
/* Default to the users current name */
w = glade_xml_get_widget (swidget->xml, "user-label");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment