aboutsummaryrefslogtreecommitdiffstats
path: root/src/camorama-stock-items.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/camorama-stock-items.c')
-rw-r--r--src/camorama-stock-items.c76
1 files changed, 44 insertions, 32 deletions
diff --git a/src/camorama-stock-items.c b/src/camorama-stock-items.c
index e27e20f..f9ea37b 100644
--- a/src/camorama-stock-items.c
+++ b/src/camorama-stock-items.c
@@ -5,51 +5,63 @@
#endif
#include <glib/gi18n.h>
-#include <gtk/gtk.h>
+#include "v4l.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
static GtkStockItem camorama_items[] = {
- {CAMORAMA_STOCK_WEBCAM, N_("Webcam"), 0, 0, "camorama"}
+ {CAMORAMA_STOCK_WEBCAM, N_("Webcam"), 0, 0, "camorama"}
};
-static void
-add_default_image(const gchar* stock_id, gint size, gchar *pixfilename)
+#pragma GCC diagnostic pop
+
+static void add_default_image(const gchar * stock_id, gint size,
+ const gchar * pixfilename)
{
- GdkPixbuf* buf = gdk_pixbuf_new_from_file(pixfilename, NULL);
- g_return_if_fail(buf);
+ GdkPixbuf *buf = gdk_pixbuf_new_from_file(pixfilename, NULL);
+
+ g_return_if_fail(buf);
- gtk_icon_theme_add_builtin_icon(stock_id, size, buf);
- g_object_unref(buf);
+ gtk_icon_theme_add_builtin_icon(stock_id, size, buf);
+ g_object_unref(buf);
}
-void
-camorama_stock_init(void) {
- GtkIconFactory* factory = gtk_icon_factory_new();
- GtkIconSet * set = gtk_icon_set_new ();
- GtkIconSource * source = gtk_icon_source_new();
+void camorama_stock_init(void)
+{
+ GtkIconFactory *factory = gtk_icon_factory_new();
+ GtkIconSet *set = gtk_icon_set_new();
+ GtkIconSource *source = gtk_icon_source_new();
- gtk_stock_add_static(camorama_items, G_N_ELEMENTS(camorama_items));
+ gtk_stock_add_static(camorama_items, G_N_ELEMENTS(camorama_items));
- gtk_icon_source_set_size_wildcarded(source, TRUE);
- gtk_icon_source_set_direction_wildcarded(source, TRUE);
- gtk_icon_source_set_state_wildcarded(source, TRUE);
+ gtk_icon_source_set_size_wildcarded(source, TRUE);
+ gtk_icon_source_set_direction_wildcarded(source, TRUE);
+ gtk_icon_source_set_state_wildcarded(source, TRUE);
- gtk_icon_source_set_icon_name(source, CAMORAMA_STOCK_WEBCAM);
- gtk_icon_set_add_source(set, source);
+ gtk_icon_source_set_icon_name(source, CAMORAMA_STOCK_WEBCAM);
+ gtk_icon_set_add_source(set, source);
- gtk_icon_factory_add(factory, CAMORAMA_STOCK_WEBCAM, set);
+ gtk_icon_factory_add(factory, CAMORAMA_STOCK_WEBCAM, set);
- add_default_image(CAMORAMA_STOCK_WEBCAM, 16, PACKAGE_DATA_DIR "/icons/hicolor/16x16/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 24, PACKAGE_DATA_DIR "/icons/hicolor/24x24/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 32, PACKAGE_DATA_DIR "/icons/hicolor/32x32/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 48, PACKAGE_DATA_DIR "/icons/hicolor/48x48/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 64, PACKAGE_DATA_DIR "/icons/hicolor/64x64/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 128, PACKAGE_DATA_DIR "/icons/hicolor/128x128/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 256, PACKAGE_DATA_DIR "/icons/hicolor/256x256/devices/camorama.png");
- add_default_image(CAMORAMA_STOCK_WEBCAM, 512, PACKAGE_DATA_DIR "/icons/hicolor/512x512/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 16, PACKAGE_DATA_DIR
+ "/icons/hicolor/16x16/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 24, PACKAGE_DATA_DIR
+ "/icons/hicolor/24x24/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 32, PACKAGE_DATA_DIR
+ "/icons/hicolor/32x32/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 48, PACKAGE_DATA_DIR
+ "/icons/hicolor/48x48/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 64, PACKAGE_DATA_DIR
+ "/icons/hicolor/64x64/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 128, PACKAGE_DATA_DIR
+ "/icons/hicolor/128x128/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 256, PACKAGE_DATA_DIR
+ "/icons/hicolor/256x256/devices/camorama.png");
+ add_default_image(CAMORAMA_STOCK_WEBCAM, 512, PACKAGE_DATA_DIR
+ "/icons/hicolor/512x512/devices/camorama.png");
- gtk_icon_factory_add_default(factory);
+ gtk_icon_factory_add_default(factory);
- gtk_icon_set_unref(set);
- gtk_icon_source_free(source);
+ gtk_icon_set_unref(set);
+ gtk_icon_source_free(source);
}
-

Privacy Policy