From 5742f8e4599560c05388f2f7957c0e3caf8e523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Sun, 19 Aug 2012 03:03:38 -0400 Subject: [PATCH] Improved autotools files. Moved all the style data to a theme directory ala gnome-shell. Added close-window.svg image. Added gcal-marshalers.list and rules to Makefile.am to generate the correct source and header. Note: The absence of this changes about the marshallers generation was making imposible to compile the changes about GcalView API. This will complete that commit. --- Makefile.am | 11 +-- configure.ac | 3 +- data/Makefile.am | 15 ++-- data/theme/close-window.svg | 152 ++++++++++++++++++++++++++++++++ data/{ => theme}/gtk-styles.css | 34 ++++--- src/Makefile.am | 47 +++++++++- src/gcal-marshalers.list | 1 + 7 files changed, 231 insertions(+), 32 deletions(-) create mode 100644 data/theme/close-window.svg rename data/{ => theme}/gtk-styles.css (79%) create mode 100644 src/gcal-marshalers.list diff --git a/Makefile.am b/Makefile.am index 11c62fa1..1b3b0a78 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,17 +15,14 @@ INTLTOOL_FILES = \ intltool-merge.in \ intltool-update.in -EXTRA_DIST = \ - $(gnome_calendardoc_DATA) \ - $(INTLTOOL_FILES) \ +EXTRA_DIST = \ + $(gnome_calendardoc_DATA) \ + $(INTLTOOL_FILES) \ THANKS \ TODO \ autogen.sh -CLEANFILES = \ - AUTHORS - -DISTCLEANFILES = \ +DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update \ diff --git a/configure.ac b/configure.ac index 5a539c26..77369dd4 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # require automake 1.11 AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar]) -AM_MAINTAINER_MODE([enable]) +AM_MAINTAINER_MODE dnl *************************************************************************** dnl Internationalization @@ -50,6 +50,7 @@ dnl ================================================================ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) +GNOME_COMMON_INIT GNOME_COMPILE_WARNINGS(maximum) GNOME_MAINTAINER_MODE_DEFINES diff --git a/data/Makefile.am b/data/Makefile.am index c173b62f..67b3b4c6 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -17,14 +17,15 @@ gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) styledir = $(pkgdatadir)/style -dist_style_DATA = \ - gtk-styles.css +dist_style_DATA = \ + theme/gtk-styles.css \ + theme/close-window.svg -EXTRA_DIST= \ - gnome-calendar.desktop \ - $(desktop_in_files) \ +EXTRA_DIST= \ + gnome-calendar.desktop \ + $(desktop_in_files) \ $(gsettingsschema_in_files) -CLEANFILES = \ - $(desktop_DATA) \ +CLEANFILES = \ + $(desktop_DATA) \ $(gsettings_SCHEMAS) diff --git a/data/theme/close-window.svg b/data/theme/close-window.svg new file mode 100644 index 00000000..10bbef9c --- /dev/null +++ b/data/theme/close-window.svg @@ -0,0 +1,152 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/data/gtk-styles.css b/data/theme/gtk-styles.css similarity index 79% rename from data/gtk-styles.css rename to data/theme/gtk-styles.css index 53b2da10..dc70e03f 100644 --- a/data/gtk-styles.css +++ b/data/theme/gtk-styles.css @@ -33,20 +33,6 @@ GtkClutterOffscreen.contents .frame { padding: 2px; } -.sources-views { - padding: 12px; - border-radius: 0; - border-style: none; - - background-image: -gtk-gradient(linear, left top, left bottom, - from(@osd_toolbar_bg_a), - color-stop(0.63, @osd_toolbar_bg_b), - to(@osd_toolbar_bg_c)); - - color: @osd_fg; - background-color: @osd_bg; -} - .osd.view { color: @osd_fg; background-color: transparent; @@ -54,6 +40,7 @@ GtkClutterOffscreen.contents .frame { .calendar-view header { font: bold 12; + padding: 12px; } .calendar-view { @@ -64,6 +51,7 @@ GtkClutterOffscreen.contents .frame { .calendar-view:selected { color: #0C73E5; + background-color: shade (#fff, 0.5); font: bold; } @@ -109,3 +97,21 @@ GtkClutterOffscreen.overlay .frame { GtkClutterOffscreen.overlay .frame * { color: @theme_fg_color; } + +GtkOverlay > GtkButton { + padding-top: 0px; + padding-right: 0px; + background-color: transparent; + background-image: none; + border: 0; +} + +.new-event-view { + padding: 18px; + border-radius: 3px; + border: darkblue 1px solid; + color: @theme_fg_color; + background-color: @theme_bg_color; + -GcalArrowContainer-arrow-size: 12px; + -GcalArrowContainer-shadow-span: 6px; +} diff --git a/src/Makefile.am b/src/Makefile.am index cd0f9a6e..f38f72b8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,6 +15,8 @@ AM_CFLAGS = \ bin_PROGRAMS = gnome-calendar BUILT_SOURCES = \ + gcal-marshalers.c \ + gcal-marshalers.h \ gcal-enum-types.c \ gcal-enum-types.h @@ -69,17 +71,56 @@ gnome_calendar_LDADD = \ ENUM_TYPES = \ gcal-utils.h +if MAINTAINER_MODE + +CLEANFILES = \ + $(BUILT_SOURCES) \ + stamp-gcal-marshalers.h \ + xgen-ac \ + xgen-ah \ + xgen-etbc \ + xgen-etbh \ + xgen-tmc \ + xgen-tmh \ + $(NULL) + gcal-enum-types.h: gcal-enum-types.h.template $(ENUM_TYPES) $(GLIB_MKENUMS) $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template gcal-enum-types.h.template $(ENUM_TYPES)) > $@ gcal-enum-types.c: gcal-enum-types.c.template $(ENUM_TYPES) $(GLIB_MKENUMS) $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template gcal-enum-types.c.template $(ENUM_TYPES)) > $@ +gcal-marshalers.h: stamp-gcal-marshalers.h + @true + +stamp-gcal-marshalers.h: gcal-marshalers.list Makefile + $(AM_V_GEN) ( \ + cd $(srcdir) \ + && ( glib-genmarshal \ + --prefix=_gcal_marshal \ + --header gcal-marshalers.list ) >> xgen-tmh \ + && ( cmp -s xgen-tmh gcal-marshalers.h || cp xgen-tmh gcal-marshalers.h ) \ + && rm -f xgen-tmh \ + && echo timestamp > $(@F) \ + ) + +gcal-marshalers.c: gcal-marshalers.list gcal-marshalers.h Makefile + $(AM_V_GEN) ( \ + cd $(srcdir) \ + && echo "#include \"gcal-marshalers.h\"" > xgen-tmc \ + && ( glib-genmarshal \ + --prefix=_gcal_marshal \ + --body gcal-marshalers.list ) >> xgen-tmc \ + && cp xgen-tmc gcal-marshalers.c \ + && rm -f xgen-tmc \ + ) + +endif + EXTRA_DIST = \ gcal-enum-types.h.template \ - gcal-enum-types.c.template - -CLEANFILES = $(BUILT_SOURCES) + gcal-enum-types.c.template \ + gcal-marshalers.list dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/src/gcal-marshalers.list b/src/gcal-marshalers.list new file mode 100644 index 00000000..d205cadf --- /dev/null +++ b/src/gcal-marshalers.list @@ -0,0 +1 @@ +VOID:POINTER,POINTER,DOUBLE,DOUBLE