diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2013-04-12 19:28:04 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2013-04-12 19:28:04 +0900 |
commit | f6a253038501e46629b5ea50cd017044bfa507da (patch) | |
tree | 5f1c99dde4abf84cad0a66fe0c7479595fbdb085 | |
parent | 282a4944b17ed5762eeae8aa64b7b8c5b83621fc (diff) | |
download | glade-f6a253038501e46629b5ea50cd017044bfa507da.tar.gz |
GladeEditor rework: Make atk.png loaded as a GResource.
-rw-r--r-- | data/icons/Makefile.am | 2 | ||||
-rw-r--r-- | gladeui/Makefile.am | 21 | ||||
-rw-r--r-- | gladeui/atk.png (renamed from data/icons/atk.png) | bin | 914 -> 914 bytes | |||
-rw-r--r-- | gladeui/glade-editor.c | 8 | ||||
-rw-r--r-- | gladeui/glade-editor.h | 4 | ||||
-rw-r--r-- | gladeui/gladeui-resources.gresource.xml | 1 |
6 files changed, 21 insertions, 15 deletions
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index e9ac3d1b..02f7d9a9 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -18,7 +18,7 @@ update-icon-cache: pixmapsdir = $(pkgdatadir)/pixmaps pixmaps_DATA = devhelp.png \ - plus.png atk.png \ + plus.png \ fixed-bg.png placeholder.png \ deprecated-16x16.png \ deprecated-22x22.png diff --git a/gladeui/Makefile.am b/gladeui/Makefile.am index 14b925c5..188da9de 100644 --- a/gladeui/Makefile.am +++ b/gladeui/Makefile.am @@ -54,12 +54,17 @@ UI_FILES = \ glade-project-properties.ui \ glade-property-label.ui -EXTRA_DIST = \ - $(UI_FILES) \ - glade-marshallers.list \ - gladeui.rc.in \ - icon-naming-spec.c \ - glade-previewer.rc.in \ +GRAPHICS_FILES = \ + atk.png + + +EXTRA_DIST = \ + $(UI_FILES) \ + $(GRAPHICS_FILES) \ + glade-marshallers.list \ + gladeui.rc.in \ + icon-naming-spec.c \ + glade-previewer.rc.in \ gladeui-resources.gresource.xml # The glade core library @@ -236,9 +241,9 @@ CLEANFILES += $(gir_DATA) $(typelib_DATA) endif # Generate resources -gladeui-resources.h: gladeui-resources.gresource.xml $(UI_FILES) +gladeui-resources.h: gladeui-resources.gresource.xml $(UI_FILES) $(GRAPHICS_FILES) $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \ --target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-header -gladeui-resources.c: gladeui-resources.gresource.xml $(UI_FILES) +gladeui-resources.c: gladeui-resources.gresource.xml $(UI_FILES) $(GRAPHICS_FILES) $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \ --target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-source diff --git a/data/icons/atk.png b/gladeui/atk.png Binary files differindex 2c1ace56..2c1ace56 100644 --- a/data/icons/atk.png +++ b/gladeui/atk.png diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c index bdf776d9..8c0ec573 100644 --- a/gladeui/glade-editor.c +++ b/gladeui/glade-editor.c @@ -138,7 +138,7 @@ struct _GladeEditorPrivate gboolean show_class_field; /* Whether or not to show the class field at the top */ }; -G_DEFINE_TYPE (GladeEditor, glade_editor, GTK_TYPE_VBOX); +G_DEFINE_TYPE (GladeEditor, glade_editor, GTK_TYPE_BOX); static GParamSpec *properties[N_PROPERTIES]; @@ -273,8 +273,7 @@ glade_editor_notebook_page (GladeEditor *editor, /* construct tab label widget */ if (type == GLADE_PAGE_ATK) { - gchar *path = g_build_filename (glade_app_get_pixmaps_dir (), "atk.png", NULL); - GtkWidget *image = gtk_image_new_from_file (path); + GtkWidget *image = gtk_image_new_from_resource ("/org/gnome/gladeui/atk.png"); label_widget = gtk_event_box_new (); gtk_container_add (GTK_CONTAINER (label_widget), image); @@ -282,7 +281,6 @@ glade_editor_notebook_page (GladeEditor *editor, gtk_widget_show (image); gtk_widget_set_tooltip_text (label_widget, name); - g_free (path); } else { @@ -451,6 +449,8 @@ glade_editor_init (GladeEditor *editor) GladeEditorPrivate *priv; GtkWidget *hbox; + gtk_orientable_set_orientation (GTK_ORIENTABLE (editor), GTK_ORIENTATION_VERTICAL); + editor->priv = priv = GLADE_EDITOR_GET_PRIVATE (editor); priv->notebook = gtk_notebook_new (); diff --git a/gladeui/glade-editor.h b/gladeui/glade-editor.h index 3f24382c..1a39b3d2 100644 --- a/gladeui/glade-editor.h +++ b/gladeui/glade-editor.h @@ -24,14 +24,14 @@ typedef struct _GladeEditorPrivate GladeEditorPrivate; */ struct _GladeEditor { - GtkVBox vbox; /* The editor is a vbox */ + GtkBox vbox; /* The editor is a vbox */ GladeEditorPrivate *priv; }; struct _GladeEditorClass { - GtkVBoxClass parent_class; + GtkBoxClass parent_class; void (* glade_reserved1) (void); void (* glade_reserved2) (void); diff --git a/gladeui/gladeui-resources.gresource.xml b/gladeui/gladeui-resources.gresource.xml index 96a4b3d7..03aea4ff 100644 --- a/gladeui/gladeui-resources.gresource.xml +++ b/gladeui/gladeui-resources.gresource.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <gresources> <gresource prefix="/org/gnome/gladeui"> + <file>atk.png</file> <file compressed="true" preprocess="xml-stripblanks">glade-project-properties.ui</file> <file compressed="true" preprocess="xml-stripblanks">glade-property-label.ui</file> </gresource> |