[gnome-calendar] build: Added gresources to binary
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] build: Added gresources to binary
- Date: Thu, 4 Dec 2014 22:19:38 +0000 (UTC)
commit 6f42fc093a20a4c3cba101434a449c5e4be7e8ec
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Wed May 29 23:11:06 2013 -0400
build: Added gresources to binary
GcalNavBar ui added as a resource.
src/Makefile.am | 9 ++++
src/calendar.gresource.xml | 6 ++
src/nav_bar.ui | 109 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 124 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 69a54b3..00d707c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,6 +16,8 @@ AM_CFLAGS = \
bin_PROGRAMS = gnome-calendar
BUILT_SOURCES = \
+ gcal-resources.c \
+ gcal-resources.h \
gcal-enum-types.c \
gcal-enum-types.h
@@ -63,6 +65,12 @@ gnome_calendar_LDADD = \
$(top_builddir)/libgd/libgd.la \
$(CALENDAR_LIBS)
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/calendar.gresource.xml)
+gcal-resources.c: calendar.gresource.xml $(resource_files)
+ glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name calendar
$(srcdir)/calendar.gresource.xml
+gcal-resources.h: calendar.gresource.xml $(resource_files)
+ glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name calendar
$(srcdir)/calendar.gresource.xml
+
ENUM_TYPES = \
gcal-utils.h
@@ -77,6 +85,7 @@ CLEANFILES = \
$(NULL)
EXTRA_DIST = \
+ $(resource_files) \
gcal-enum-types.h.template \
gcal-enum-types.c.template
diff --git a/src/calendar.gresource.xml b/src/calendar.gresource.xml
new file mode 100644
index 0000000..d06cc33
--- /dev/null
+++ b/src/calendar.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/calendar">
+ <file compressed="true">nav_bar.ui</file>
+ </gresource>
+</gresources>
diff --git a/src/nav_bar.ui b/src/nav_bar.ui
new file mode 100644
index 0000000..d24fbd8
--- /dev/null
+++ b/src/nav_bar.ui
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.10 -->
+ <template class="GcalNavBar" parent="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="column_spacing">12</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ <child>
+ <object class="GtkBox" id="nav_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="back_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="gcal_nav_bar_btn_clicked" object="GcalNavBar" after="yes"
swapped="no" />
+ <style>
+ <class name="nav-button"/>
+ </style>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">go-previous-symbolic</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="forward_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="gcal_nav_bar_btn_clicked" object="GcalNavBar" after="yes"
swapped="no" />
+ <style>
+ <class name="nav-button"/>
+ </style>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">go-next-symbolic</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="left_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <style>
+ <class name="nav-header"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="right_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <style>
+ <class name="nav-header"/>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </template>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]