summaryrefslogtreecommitdiff
path: root/src/trg-icons.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-04 20:26:19 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-04 20:26:19 +0000
commita73d164e9fae9059be1b347270f1c7debbc00f3e (patch)
treea91c94a322ead98226d01fa6bbe0c4c79478c627 /src/trg-icons.c
parent336960c958d0b4ebdc0b54c25aef87fc7cb7b0a8 (diff)
reindent with gnu indent. add keyboard accelerators for view menu, fix toggle filter widget also connected to toggle graph cb. add Lithuanian translation thanks to Algimantas Margevičius via launchpad.
Diffstat (limited to 'src/trg-icons.c')
-rw-r--r--src/trg-icons.c65
1 files changed, 28 insertions, 37 deletions
diff --git a/src/trg-icons.c b/src/trg-icons.c
index 4cd2bae..b507ce9 100644
--- a/src/trg-icons.c
+++ b/src/trg-icons.c
@@ -21,52 +21,43 @@
#include "icon-turtle.h"
-typedef struct
-{
- const guint8* raw;
- const char * name;
-}
-BuiltinIconInfo;
-
-static const BuiltinIconInfo my_fallback_icons[] =
-{
- { blue_turtle, "alt-speed-on" },
- { grey_turtle, "alt-speed-off" }
+typedef struct {
+ const guint8 *raw;
+ const char *name;
+} BuiltinIconInfo;
+
+static const BuiltinIconInfo my_fallback_icons[] = {
+ {blue_turtle, "alt-speed-on"},
+ {grey_turtle, "alt-speed-off"}
};
-void
-register_my_icons( GtkIconTheme *theme )
+void register_my_icons(GtkIconTheme * theme)
{
- int i;
- const int n = G_N_ELEMENTS( my_fallback_icons );
- GtkIconFactory * factory = gtk_icon_factory_new( );
+ int i;
+ const int n = G_N_ELEMENTS(my_fallback_icons);
+ GtkIconFactory *factory = gtk_icon_factory_new();
- gtk_icon_factory_add_default( factory );
+ gtk_icon_factory_add_default(factory);
- for( i = 0; i < n; ++i )
- {
- const char * name = my_fallback_icons[i].name;
+ for (i = 0; i < n; ++i) {
+ const char *name = my_fallback_icons[i].name;
- if( !gtk_icon_theme_has_icon( theme, name ) )
- {
- int width;
- GdkPixbuf * p;
- GtkIconSet * icon_set;
+ if (!gtk_icon_theme_has_icon(theme, name)) {
+ int width;
+ GdkPixbuf *p;
+ GtkIconSet *icon_set;
- p =
- gdk_pixbuf_new_from_inline( -1, my_fallback_icons[i].raw,
- FALSE,
- NULL );
- width = gdk_pixbuf_get_width( p );
- icon_set = gtk_icon_set_new_from_pixbuf( p );
- gtk_icon_theme_add_builtin_icon( name, width, p );
- gtk_icon_factory_add( factory, name, icon_set );
+ p = gdk_pixbuf_new_from_inline(-1, my_fallback_icons[i].raw,
+ FALSE, NULL);
+ width = gdk_pixbuf_get_width(p);
+ icon_set = gtk_icon_set_new_from_pixbuf(p);
+ gtk_icon_theme_add_builtin_icon(name, width, p);
+ gtk_icon_factory_add(factory, name, icon_set);
- g_object_unref( p );
- gtk_icon_set_unref( icon_set );
+ g_object_unref(p);
+ gtk_icon_set_unref(icon_set);
}
}
- g_object_unref ( G_OBJECT ( factory ) );
+ g_object_unref(G_OBJECT(factory));
}
-