[gegl-edit] Updated about dialog and added a logo
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-edit] Updated about dialog and added a logo
- Date: Thu, 9 Aug 2012 22:26:01 +0000 (UTC)
commit 25e33a02198d17b2db8b56801ce34548c2e9ec19
Author: Isaac Wagner <isaacbw src gnome org>
Date: Thu Aug 9 18:25:56 2012 -0400
Updated about dialog and added a logo
gegl-edit/Makefile.am | 3 +-
gegl-edit/data/logo.png | Bin 0 -> 28574 bytes
gegl-edit/gegl-edit.c | 54 +++++++++++++++++++++++++++++++++-------------
gegl-edit/gresource.xml | 1 +
4 files changed, 42 insertions(+), 16 deletions(-)
---
diff --git a/gegl-edit/Makefile.am b/gegl-edit/Makefile.am
index 2fc55b5..0bc8b1d 100644
--- a/gegl-edit/Makefile.am
+++ b/gegl-edit/Makefile.am
@@ -8,7 +8,8 @@ UI_FILES = \
data/in.png \
data/out.png \
data/unbounded.png \
- data/empty.png
+ data/empty.png \
+ data/logo.png
BUILT_SOURCES = \
resources.c \
diff --git a/gegl-edit/data/logo.png b/gegl-edit/data/logo.png
new file mode 100644
index 0000000..ac8afe1
Binary files /dev/null and b/gegl-edit/data/logo.png differ
diff --git a/gegl-edit/gegl-edit.c b/gegl-edit/gegl-edit.c
index 98cb45d..92c83cd 100644
--- a/gegl-edit/gegl-edit.c
+++ b/gegl-edit/gegl-edit.c
@@ -10,19 +10,28 @@
typedef struct
{
- GtkWidget *window;
- GraphGtkNode *context;
- GQueue *graph_stack;
- GQueue *view_stack;
- GtkWidget *view_box;
- GtkWidget *property_view;
- GtkMenu *popup;
- GtkMenu *popup2;
- const gchar *filename;
- cairo_surface_t *in;
- cairo_surface_t *out;
- cairo_surface_t *empty;
- cairo_surface_t *unbounded;
+ GtkWidget *window;
+
+ const gchar *filename;
+
+ GQueue *graph_stack;
+ GQueue *view_stack;
+
+ GtkWidget *view_box;
+ GtkWidget *property_view;
+
+ GraphGtkNode *context;
+ GtkWidget *popup;
+ GtkWidget *popup2;
+
+ //Node icons
+ cairo_surface_t *in;
+ cairo_surface_t *out;
+ cairo_surface_t *empty;
+ cairo_surface_t *unbounded;
+
+ //About dialog
+ GdkPixbuf *logo;
} CallbackData;
static const gchar* query_proxy(GeglGtkPropertyView *view, GeglNode *node, const gchar *property, CallbackData* data);
@@ -113,21 +122,31 @@ main (gint argc,
closure.bytes = in_bytes;
closure.offset = 0;
data->in = cairo_image_surface_create_from_png_stream( (cairo_read_func_t) cairo_read_bytes, &closure);
+ g_bytes_unref(in_bytes);
in_bytes = g_resource_lookup_data(resource, "/gegl-edit/data/out.png", 0, NULL);
closure.bytes = in_bytes;
closure.offset = 0;
data->out = cairo_image_surface_create_from_png_stream( (cairo_read_func_t) cairo_read_bytes, &closure);
+ g_bytes_unref(in_bytes);
in_bytes = g_resource_lookup_data(resource, "/gegl-edit/data/empty.png", 0, NULL);
closure.bytes = in_bytes;
closure.offset = 0;
data->empty = cairo_image_surface_create_from_png_stream( (cairo_read_func_t) cairo_read_bytes, &closure);
+ g_bytes_unref(in_bytes);
in_bytes = g_resource_lookup_data(resource, "/gegl-edit/data/unbounded.png", 0, NULL);
closure.bytes = in_bytes;
closure.offset = 0;
data->unbounded = cairo_image_surface_create_from_png_stream( (cairo_read_func_t) cairo_read_bytes, &closure);
+ g_bytes_unref(in_bytes);
+
+ in_bytes = g_resource_lookup_data(resource, "/gegl-edit/data/logo.png", 0, NULL);
+ gsize logo_size = g_bytes_get_size(in_bytes);
+ const gchar *logo_data = g_bytes_get_data(in_bytes, &logo_size);
+ data->logo = gdk_pixbuf_new_from_inline(logo_size, logo_data, TRUE, NULL);
+ g_bytes_unref(in_bytes);
//done loading images
g_signal_connect(props, "property-changed", G_CALLBACK(property_changed), view);
@@ -337,8 +356,13 @@ nodes_disconnected(GraphGtkView *view, GraphGtkNode *from, const gchar* output,
G_MODULE_EXPORT void activated_about(GtkMenuItem *menuitem, gpointer user_data)
{
CallbackData *data = user_data;
- gtk_show_about_dialog(GTK_WINDOW(data),
- "program-name", "GEGL-Edit",
+ gchar *authors[] = { "Isaac Wagner", NULL };
+
+ gtk_show_about_dialog(GTK_WINDOW(data->window),
+ "authors", authors,
+ "license", "GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007\n\n(See COPYING)",
+ "version", "0.1",
+ "logo", data->logo,
NULL);
}
diff --git a/gegl-edit/gresource.xml b/gegl-edit/gresource.xml
index 2b4a691..01e5e1b 100644
--- a/gegl-edit/gresource.xml
+++ b/gegl-edit/gresource.xml
@@ -8,5 +8,6 @@
<file>data/out.png</file>
<file>data/empty.png</file>
<file>data/unbounded.png</file>
+ <file preprocess="to-pixdata">data/logo.png</file>
</gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]