[Xfce4-commits] be able to compile in gtk+ 2.24.x, to become ready for debian wheezy
Updating branch refs/heads/master to 6279a7844f27fcbc28c5ddaffa0b511638dc8ec1 (commit) from 6b6fa16607d5b29924a5037f427b6bee280fc763 (commit) commit 6279a7844f27fcbc28c5ddaffa0b511638dc8ec1 Author: Bo Lorensen Date: Sun Oct 28 22:54:30 2012 +0100 be able to compile in gtk+ 2.24.x, to become ready for debian wheezy CMakeLists.txt | 20 core/xfc/CMakeLists.txt |6 ++ core/xfc/glib/completion.hh |4 core/xfc/glib/mutex.hh |6 ++ core/xfc/glib/thread.hh |5 + core/xfc/glib/utils.hh |2 ++ debian/changelog |7 +++ demos/xfc-demo/CMakeLists.txt|3 +-- examples/CMakeLists.txt |3 +-- examples/core/iochannel/iochannel.cc |1 + sourceview/xfc/CMakeLists.txt|2 +- ui/xfc/CMakeLists.txt|7 --- xfc-config.h.in |2 ++ 13 files changed, 48 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa20003..590831a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,15 +3,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(XFC) INCLUDE(FindPkgConfig) +INCLUDE(CheckIncludeFiles) +INCLUDE(FindGTK2) -PKG_SEARCH_MODULE(GLIB REQUIRED glib-2.0) +#PKG_SEARCH_MODULE(GLIB REQUIRED glib-2.0) PKG_SEARCH_MODULE(SIGC REQUIRED sigc++-2.0) -PKG_SEARCH_MODULE(GOBJ REQUIRED gobject-2.0) -PKG_SEARCH_MODULE(GMOD REQUIRED gmodule-2.0) -PKG_SEARCH_MODULE(GTHR REQUIRED gthread-2.0) -PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0) +#PKG_SEARCH_MODULE(GOBJ REQUIRED gobject-2.0) +#PKG_SEARCH_MODULE(GMOD REQUIRED gmodule-2.0) +#PKG_SEARCH_MODULE(GTHR REQUIRED gthread-2.0) +#PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0) PKG_SEARCH_MODULE(GTK_PRN gtk+-unix-print-2.0) -PKG_SEARCH_MODULE(GDK REQUIRED gdk-2.0 ) +#PKG_SEARCH_MODULE(GDK REQUIRED gdk-2.0 ) PKG_SEARCH_MODULE(SIGC REQUIRED sigc++-2.0) PKG_SEARCH_MODULE(PANGO REQUIRED pango) PKG_SEARCH_MODULE(CAIRO REQUIRED cairo) @@ -22,6 +24,8 @@ PKG_SEARCH_MODULE(XFCE_UI libxfce4ui-1) PKG_SEARCH_MODULE(XFCE_CONF libxfconf-0) PKG_SEARCH_MODULE(GLADE libglade-2.0) +CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H ) + IF(PANGO_FOUND) SET(XFC_PANGO 1) ENDIF(PANGO_FOUND) @@ -29,10 +33,10 @@ ENDIF(PANGO_FOUND) IF(CAIRO_FOUND) SET(XFC_CAIRO 1) ENDIF(CAIRO_FOUND) - + SET(XFC_MAJOR_VERSION 4) SET(XFC_MINOR_VERSION 6) -SET(XFC_MICRO_VERSION 0) +SET(XFC_MICRO_VERSION 1) SET(XFC_VERSION "${XFC_MAJOR_VERSION}.${XFC_MINOR_VERSION}.${XFC_MICRO_VERSION}") diff --git a/core/xfc/CMakeLists.txt b/core/xfc/CMakeLists.txt index d82aa50..f35b0bc 100644 --- a/core/xfc/CMakeLists.txt +++ b/core/xfc/CMakeLists.txt @@ -1,14 +1,12 @@ ADD_SUBDIRECTORY( glib ) -INCLUDE_DIRECTORIES( ${GLIB_INCLUDE_DIRS} ${GOJB_INCLUDE_DIRS} ${GMOD_INCLUDE_DIRS} ${GTHR_INCLUDE_DIRS} - ${SIGC_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR}) - +INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${XFC_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} ) ADD_LIBRARY( xfc_core SHARED convert.cc i18n.cc object.cc stackobject.cc trackable.cc utfstring.cc version.cc ${glib_src}) -TARGET_LINK_LIBRARIES( xfc_core ${GLIB_LIBRARIES} ${GOBJ_LIBRARIES} ${GMOD_LIBRARIES} ${GTHR_LIBRARIES} ${SIGC_LIBRARIES}) +TARGET_LINK_LIBRARIES( xfc_core ${GTK2_GLIB_LIBRARIES} ${SIGC_LIBRARIES}) SET_TARGET_PROPERTIES( xfc_core PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} ) #SET_TARGET_PROPERTIES( xfc_core PROPERTIES LINK_INTERFACE_LIBRARIES "") diff --git a/core/xfc/glib/completion.hh b/core/xfc/glib/completion.hh index f759abd..6efb90f 100644 --- a/core/xfc/glib/completion.hh +++ b/core/xfc/glib/completion.hh @@ -30,7 +30,11 @@ #endif #ifndef __G_COMPLETION_H__ +#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24 #include +#else +#include +#endif #endif #ifndef _CPP_VECTOR diff --git a/core/xfc/glib/mutex.hh b/core/xfc/glib/mutex.hh index 28b7ba0..390c1c0 100644 --- a/core/xfc/glib/mutex.hh +++ b/core/xfc/glib/mutex.hh @@ -24,6 +24,12 @@ #ifndef XFC_G_MUTEX_HH #define XFC_G_MUTEX_HH +#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24 +#include +#else +#include +#endif + #ifndef XFC_OBJECT_HH #include #endif diff --git a/core/xfc/glib/thread.hh b/core/xfc/glib/thread.hh index 64cccee..3de0806 100644 --- a/core/xfc/glib/thread.hh +++ b/core/xfc/glib/thread.hh @@ -29,6 +29,11 @@ #ifndef XFC_G_THREAD_HH #define XFC_G_THREAD_HH +#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 24 +#include +#else +#include +#endif #ifndef XFC_G_MUTEX_HH #include #endif diff --git a/core/xfc/glib/utils.hh b/core/xfc/glib/utils.hh index aae5f2d..c008704 100644 --- a/core/xfc/glib/utils.hh +++ b/core/xfc/glib/utils.hh @@ -22,6 +22,8 @@ #ifndef XFC_G_UTI
[Xfce4-commits] cmake cleanup, more central detection logic
Updating branch refs/heads/master to 49ba217d73fa3b06f54143fd4cd6c3db432ff4fe (commit) from 408a0b3493f3cfa2046d65c0bb7605fa916473b1 (commit) commit 49ba217d73fa3b06f54143fd4cd6c3db432ff4fe Author: Bo Lorensen Date: Sat Dec 31 15:11:07 2011 +0100 cmake cleanup, more central detection logic CMakeLists.txt| 40 +--- de/xfc/CMakeLists.txt |5 - glade/xfc/CMakeLists.txt |2 +- sourceview/xfc/CMakeLists.txt |4 +--- ui/xfc/CMakeLists.txt |9 ++--- ui/xfc/config.h.in|8 +++- 6 files changed, 44 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d34379..b70ee15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,27 @@ PROJECT( XFC ) INCLUDE( FindPkgConfig ) +PKG_SEARCH_MODULE(GTK REQUIRED gtk+-2.0) +PKG_SEARCH_MODULE(GTK_PRN gtk+-unix-print-2.0) +PKG_SEARCH_MODULE(GDK REQUIRED gdk-2.0 ) +PKG_SEARCH_MODULE(SIGC REQUIRED sigc++-2.0) +PKG_SEARCH_MODULE(PANGO REQUIRED pango) +PKG_SEARCH_MODULE(CAIRO REQUIRED cairo) +PKG_SEARCH_MODULE(SOURCEVIEW gtksourceview-1.0) +PKG_SEARCH_MODULE(XFCE_PANEL libxfce4panel-1.0 ) +PKG_SEARCH_MODULE(XFCE_UTILS libxfce4util-1.0 ) +PKG_SEARCH_MODULE(XFCE_UI libxfce4ui-1 ) +PKG_SEARCH_MODULE(XFCE_CONF libxfconf-0 ) +PKG_SEARCH_MODULE(GLADE libglade-2.0) + +IF(DEFINED PANGO_FOUND) + SET(XFC_PANGO 1) +ENDIF(DEFINED PANGO_FOUND) + +IF(DEFINED CAIRO_FOUND) + SET(XFC_CAIRO 1) +ENDIF(DEFINED CAIRO_FOUND) + SET( XFC_MAJOR_VERSION 4 ) SET( XFC_MINOR_VERSION 6 ) SET( XFC_MICRO_VERSION 0 ) @@ -14,9 +35,22 @@ SET( XFCEDIR xfce4 ) ADD_SUBDIRECTORY( core ) ADD_SUBDIRECTORY( ui ) -ADD_SUBDIRECTORY( glade ) -ADD_SUBDIRECTORY( de ) -ADD_SUBDIRECTORY( sourceview ) + +IF(DEFINED GLADE_FOUND) + SET(XFC_GLADE 1) + ADD_SUBDIRECTORY( glade ) +ENDIF(DEFINED GLADE_FOUND) + +IF(DEFINED XFCE_UI_FOUND) + SET(XFC_DE 1) + ADD_SUBDIRECTORY( de ) +ENDIF(DEFINED XFCE_UI_FOUND) + +IF(DEFINED SOURCEVIEW_FOUND) + SET( XFC_SOURCEVIEW 1 ) + ADD_SUBDIRECTORY( sourceview ) +ENDIF(DEFINED SOURCEVIEW_FOUND) + ADD_SUBDIRECTORY( demos ) ADD_SUBDIRECTORY( examples ) ADD_SUBDIRECTORY( docs ) diff --git a/de/xfc/CMakeLists.txt b/de/xfc/CMakeLists.txt index 8c0e5ab..f323006 100644 --- a/de/xfc/CMakeLists.txt +++ b/de/xfc/CMakeLists.txt @@ -2,11 +2,6 @@ #ADD_SUBDIRECTORY( panel ) ADD_SUBDIRECTORY( utils ) -pkg_search_module( XFCE_PANEL REQUIRED libxfce4panel-1.0 ) -pkg_search_module( XFCE_UTILS REQUIRED libxfce4util-1.0 ) -pkg_search_module( XFCE_UI REQUIRED libxfce4ui-1 ) -pkg_search_module( XFCE_CONF REQUIRED libxfconf-0 ) - INCLUDE_DIRECTORIES( ${XFCE_UTILS_INCLUDE_DIRS} ${XFCE_CONF_INCLUDE_DIRS} ${XFCE_UI_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${XFC_DE_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} ${SIGC_INCLUDE_DIRS} ${XFCE_CONF_INCLUDE_DIRS} ${XFCE_UTIL_INCLUDE_DIRS}) diff --git a/glade/xfc/CMakeLists.txt b/glade/xfc/CMakeLists.txt index 0096bbb..b8bac07 100644 --- a/glade/xfc/CMakeLists.txt +++ b/glade/xfc/CMakeLists.txt @@ -1,6 +1,6 @@ ## libXFCglade source directory -pkg_search_module( GLADE REQUIRED libglade-2.0) + ADD_SUBDIRECTORY( glade ) diff --git a/sourceview/xfc/CMakeLists.txt b/sourceview/xfc/CMakeLists.txt index 8d6ad0c..0ba65d6 100644 --- a/sourceview/xfc/CMakeLists.txt +++ b/sourceview/xfc/CMakeLists.txt @@ -1,11 +1,9 @@ ## libXFCsourceview source directory -pkg_search_module( SOURCEVIEW REQUIRED gtksourceview-1.0) - ADD_SUBDIRECTORY( sourceview ) INCLUDE_DIRECTORIES( ${SOURCEVIEW_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR} ${XFC_UI_SOURCE_DIR} -${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${XFC_SOURCEVIEW_SOURCE_DIR} ) +${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${XFC_SOURCEVIEW_SOURCE_DIR} ) ADD_LIBRARY( xfc_sourceview SHARED ${sourceview_src}) diff --git a/ui/xfc/CMakeLists.txt b/ui/xfc/CMakeLists.txt index 319bbcd..37e5d0e 100644 --- a/ui/xfc/CMakeLists.txt +++ b/ui/xfc/CMakeLists.txt @@ -1,10 +1,3 @@ -pkg_search_module( GTK REQUIRED gtk+-2.0) -pkg_search_module( GTK_PRN REQUIRED gtk+-unix-print-2.0) -pkg_search_module( GDK REQUIRED gdk-2.0 ) -pkg_search_module( SIGC REQUIRED sigc++-2.0) -pkg_search_module( PANGO REQUIRED pango) -pkg_search_module( CAIRO REQUIRED cairo) - INCLUDE_DIRECTORIES( ${GLIB_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GDK_INCLUDE_DIRS} ${GTK_PRN_INCLUDE_DIRS} ${SIGC_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${PANGO_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR} ${XFC_UI_SOURCE_DIR} ) @@ -22,6 +15,8 @@ ADD_LIBRARY( xfc_ui SHARED main.cc ${src}) TARGET_LINK_LIBRARIES( xfc_ui xfc_core ${GTK_LIBRARIES} ) SET_TARGET_PROPERTIES( xfc_ui PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} ) +CONFIGURE_FILE( config.h.in config.h ) + INSTALL(TARGETS xfc_ui RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) diff --git a/ui/xfc
[Xfce4-commits] add missing file in de module
Updating branch refs/heads/master to 408a0b3493f3cfa2046d65c0bb7605fa916473b1 (commit) from 1d5e20af937c323a296acfd7be42ed26aa843f18 (commit) commit 408a0b3493f3cfa2046d65c0bb7605fa916473b1 Author: Bo Lorensen Date: Sat Dec 31 00:14:35 2011 +0100 add missing file in de module de/xfc/{ui/inline/dialog.inl => main.cc} |0 1 files changed, 0 insertions(+), 0 deletions(-) diff --git a/de/xfc/ui/inline/dialog.inl b/de/xfc/main.cc similarity index 100% copy from de/xfc/ui/inline/dialog.inl copy to de/xfc/main.cc ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] more pkg work
Updating branch refs/heads/master to 1d5e20af937c323a296acfd7be42ed26aa843f18 (commit) from df22a2224dbdc8a670b6dcab421cd93d4f95984e (commit) commit 1d5e20af937c323a296acfd7be42ed26aa843f18 Author: Bo Lorensen Date: Sat Dec 31 00:01:38 2011 +0100 more pkg work core/xfccore.pc.in |2 +- debian/libxfcde-dev.install |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/xfccore.pc.in b/core/xfccore.pc.in index eaa8b03..f8185f5 100644 --- a/core/xfccore.pc.in +++ b/core/xfccore.pc.in @@ -6,7 +6,7 @@ includedir=${prefix}/include Name: Xfc-Core Description: The Xfce Foundation Classes core library Version: @XFC_VERSION@ -Requires: glib-2.0 gobject-2.0 sigc++-2.0 gthread-2.0 +Requires: glib-2.0 gobject-2.0 sigc++-2.0 gthread-2.0 gdk-2.0 Libs: -L${libdir} -lxfc_core Cflags: -I${includedir}/@XFCEDIR@ diff --git a/debian/libxfcde-dev.install b/debian/libxfcde-dev.install index db744a0..533a57c 100644 --- a/debian/libxfcde-dev.install +++ b/debian/libxfcde-dev.install @@ -1,5 +1,5 @@ -debian/tmp/usr/include/xfce4/xfc/ui/*.hh -debian/tmp/usr/include/xfce4/xfc/ui/inline/*.inl +#debian/tmp/usr/include/xfce4/xfc/ui/*.hh +#debian/tmp/usr/include/xfce4/xfc/ui/inline/*.inl debian/tmp/usr/include/xfce4/xfc/utils/*.hh debian/tmp/usr/include/xfce4/xfc/utils/inline/*.inl debian/tmp/usr/lib/pkgconfig/xfcde-*.pc ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] One day I may learn to understand GIT :-)
Updating branch refs/heads/master to df22a2224dbdc8a670b6dcab421cd93d4f95984e (commit) from 608ef55d1ddce59f5cf87d39ba6e49856826b322 (commit) commit df22a2224dbdc8a670b6dcab421cd93d4f95984e Author: Bo Lorensen Date: Thu Sep 22 22:30:37 2011 +0200 One day I may learn to understand GIT :-) CMakeLists.txt|7 - core/CMakeLists.txt |6 + core/xfc/CMakeLists.txt |2 +- core/xfccore.pc.in| 12 +- de/CMakeLists.txt |5 de/xfc/CMakeLists.txt |9 +++ de/xfc/ui/CMakeLists.txt |8 ++- de/xfc/utils/CMakeLists.txt |9 --- de/xfcde.pc.in| 13 +-- debian/libxfc-doc.install |2 +- debian/libxfccore-dev.install |1 - debian/libxfccore.install |2 +- debian/libxfcde.install |2 +- debian/libxfcglade-dev.install|3 +- debian/libxfcglade.install|2 +- debian/libxfcsourceview-dev.install |1 - debian/libxfcsourceview.install |2 +- debian/libxfcui-dev.install |4 --- debian/libxfcui.install |2 +- debian/rules |3 +- demos/xfc-demo/CMakeLists.txt | 39 docs/CMakeFiles.txt |9 --- docs/index.html.in|2 +- docs/reference/Doxyfile.in|4 +- glade/CMakeLists.txt |8 ++ glade/xfc/CMakeLists.txt |8 +- glade/xfc/glade/CMakeLists.txt|3 +- glade/xfc/glade/inline/CMakeLists.txt |2 +- glade/xfc/glade/xml.cc|2 +- glade/xfcglade.pc.in | 14 ++-- sourceview/CMakeLists.txt |8 ++ ui/CMakeLists.txt |5 ui/xfc/CMakeLists.txt |2 +- ui/xfc/atk/CMakeLists.txt |2 +- ui/xfc/cairo/CMakeLists.txt |2 +- ui/xfc/gdk-pixbuf/CMakeLists.txt |2 +- ui/xfc/gdk/CMakeLists.txt |2 +- ui/xfc/gtk/CMakeLists.txt |2 +- ui/xfc/pango/CMakeLists.txt |2 +- ui/xfcui.pc.in| 14 ++-- 40 files changed, 142 insertions(+), 85 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee2d853..1d34379 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,12 +10,15 @@ SET( XFC_MICRO_VERSION 0 ) SET( XFC_VERSION "${XFC_MAJOR_VERSION}.${XFC_MINOR_VERSION}.${XFC_MICRO_VERSION}") +SET( XFCEDIR xfce4 ) + ADD_SUBDIRECTORY( core ) ADD_SUBDIRECTORY( ui ) -#ADD_SUBDIRECTORY( glade ) +ADD_SUBDIRECTORY( glade ) ADD_SUBDIRECTORY( de ) -#ADD_SUBDIRECTORY( sourceview ) +ADD_SUBDIRECTORY( sourceview ) ADD_SUBDIRECTORY( demos ) ADD_SUBDIRECTORY( examples ) +ADD_SUBDIRECTORY( docs ) CONFIGURE_FILE( xfc-config.h.in xfc-config.h ) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ba17d11..ed9c382 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -7,3 +7,9 @@ pkg_search_module( GMOD REQUIRED gmodule-2.0) pkg_search_module( GTHR REQUIRED gthread-2.0) ADD_SUBDIRECTORY( xfc ) + +CONFIGURE_FILE( xfccore.pc.in xfccore-${XFC_VERSION}.pc @ONLY ) + +INSTALL( FILES xfccore-${XFC_VERSION}.pc +DESTINATION lib/pkgconfig ) + diff --git a/core/xfc/CMakeLists.txt b/core/xfc/CMakeLists.txt index 0ac61a6..d82aa50 100644 --- a/core/xfc/CMakeLists.txt +++ b/core/xfc/CMakeLists.txt @@ -27,4 +27,4 @@ INSTALL( FILES utfstring.hh version.hh xfccore.hh - DESTINATION include/xfc) + DESTINATION include/xfce4/xfc) diff --git a/core/xfccore.pc.in b/core/xfccore.pc.in index 625082e..eaa8b03 100644 --- a/core/xfccore.pc.in +++ b/core/xfccore.pc.in @@ -1,13 +1,13 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include Name: Xfc-Core Description: The Xfce Foundation Classes core library -Version: @VERSION@ +Version: @XFC_VERSION@ Requires: glib-2.0 gobject-2.0 sigc++-2.0 gthread-2.0 -Libs: -L${libdir} -lXFCcore-@XFC_API_VERSION@ +Libs: -L${libdir} -lxfc_core Cflags: -I${includedir}/@XFCEDIR@ diff --git a/de/CMakeLists.txt b/de/CMakeLists.txt index 1eb7fe7..f695808 100644 --- a/de/CMakeLists.txt +++ b/de/CMakeLists.txt @@ -1,3 +1,8 @@ PROJECT( XFC_DE ) ADD_SUBDIRECTORY( xfc ) + +CONFIGURE_FILE( xfcde.pc.in xfcde-${XFC_VERSION}.pc @ONLY ) + +INSTALL( FILES xfcde-${XFC_VERSION}.pc + DESTINATION lib/pkgconfig ) diff --git a/de/xfc/CMakeLists.txt b/de/xfc/CMakeLists.txt index 32319fc..8c0e5ab 100644 --- a/de/xfc/CMakeLists.txt +++ b/de/xfc/CMakeLists.txt @@ -1,3 +1,6 @@ +#ADD_SUBDIRECTORY( ui ) +#ADD_SUBDIRECTORY( panel ) +ADD_SUBDIRECTORY( utils ) pkg_search_module(
[Xfce4-commits] first real build using debian package too
Updating branch refs/heads/master to 608ef55d1ddce59f5cf87d39ba6e49856826b322 (commit) from a1e5eb9032afb15d3c72bd9a3c5ac510fe6fabbd (commit) commit 608ef55d1ddce59f5cf87d39ba6e49856826b322 Author: Bo Lorensen Date: Thu Sep 22 22:25:49 2011 +0200 first real build using debian package too ui/xfc/gtk/inline/printpapersize.inl |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/ui/xfc/gtk/inline/printpapersize.inl b/ui/xfc/gtk/inline/printpapersize.inl new file mode 100644 index 000..75bff4b --- /dev/null +++ b/ui/xfc/gtk/inline/printpapersize.inl @@ -0,0 +1,9 @@ +inline GtkPaperSize *Xfc::Gtk::PaperSize::gtk_paper_size() const +{ +return reinterpret_cast(_obj); +} + +inline Xfc::Gtk::PaperSize::operator GtkPaperSize* () const +{ +return this ? ((GtkPaperSize*)_obj) : NULL; +} ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Total debian build possible again
Updating branch refs/heads/master to a1e5eb9032afb15d3c72bd9a3c5ac510fe6fabbd (commit) from 12592389476b45cfc6f3920bd626f014fa659abd (commit) commit a1e5eb9032afb15d3c72bd9a3c5ac510fe6fabbd Author: Bo Lorensen Date: Mon Sep 12 00:04:38 2011 +0200 Total debian build possible again Makefile.am| 26 autogen.sh | 95 -- core/xfc/glib/CMakeLists.txt | 80 core/xfc/glib/inline/CMakeLists.txt| 31 + core/{xfccore-4.3.pc.in => xfccore.pc.in} |0 de/xfc/ui/inline/CMakeLists.txt|3 + de/{xfcde-4.3.pc.in => xfcde.pc.in}|0 docs/{Makefile.am => CMakeFiles.txt} |0 docs/CMakeLists.txt| 15 +++ docs/faq/CMakeLists.txt|5 + docs/howto/CMakeLists.txt | 10 ++ docs/howto/html/CMakeLists.txt | 60 + docs/images/CMakeLists.txt | 60 + docs/reference/CMakeLists.txt | 15 +++ docs/tutorial/CMakeLists.txt | 11 ++ docs/tutorial/html/CMakeLists.txt | 12 ++ examples/tutorial/CMakeLists.txt | 10 ++ examples/tutorial/chapter01/CMakeLists.txt |4 + examples/tutorial/chapter02/CMakeLists.txt |4 + examples/tutorial/chapter03/CMakeLists.txt |4 + examples/tutorial/chapter04/CMakeLists.txt |4 + examples/tutorial/chapter06/CMakeLists.txt |4 + examples/tutorial/chapter07/CMakeLists.txt |4 + examples/tutorial/chapter08/CMakeLists.txt |3 + examples/tutorial/chapter08/src/CMakeLists.txt |4 + examples/tutorial/chapter09/CMakeLists.txt |3 + examples/tutorial/chapter09/src/CMakeLists.txt |4 + glade/xfc/CMakeLists.txt | 16 +++ glade/xfc/glade/CMakeLists.txt | 11 ++ glade/xfc/glade/inline/CMakeLists.txt |5 + glade/{xfcglade-4.3.pc.in => xfcglade.pc.in} |0 sourceview/xfc/CMakeLists.txt | 18 +++ sourceview/xfc/sourceview/CMakeLists.txt | 39 ++ ...xfcsourceview-4.3.pc.in => xfcsourceview.pc.in} |0 ui/xfc/atk/inline/CMakeLists.txt | 23 ui/xfc/gdk-pixbuf/inline/CMakeLists.txt|8 ++ ui/xfc/gdk/inline/CMakeLists.txt | 25 ui/xfc/gtk/inline/CMakeLists.txt | 134 ui/xfc/pango/inline/CMakeLists.txt | 19 +++ ui/{xfcui-4.3.pc.in => xfcui.pc.in}|0 40 files changed, 648 insertions(+), 121 deletions(-) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 563a6e9..000 --- a/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## top directory - -SUBDIRS = @DOCS_SUBDIR@ libXFCcore libXFCui @SOURCEVIEW_SUBDIR@ @GLADE_SUBDIR@ @DEMOS_SUBDIR@ @EXAMPLES_SUBDIR@ @DE_SUBDIR@ - -DIST_SUBDIRS = docs libXFCcore libXFCui libXFCglade libXFCsourceview libXFCde demos examples - -EXTRA_DIST = autogen.sh xfc.spec xfc-config.h.in - -dist-hook: - rm -rf `find $(distdir)/docs -name .svn` - -distclean-local: - rm -rf xfc.spec *.cache *~ - -rpm: dist - rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz - @rm -f $(PACKAGE)-$(VERSION).tar.gz - -library_configdir = $(libdir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/include -library_config_DATA = xfc-config.h - -xfc_doc_DATA = AUTHORS ChangeLog COPYING NEWS README - -DISTCHECK_CONFIGURE_FLAGS = \ - --disable-debug \ - --enable-docs diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index df07bd3..000 --- a/autogen.sh +++ /dev/null @@ -1,95 +0,0 @@ -#! /bin/sh - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -PKG_NAME="XFC" -TEST_TYPE=-f -FILE=configure.ac - -DIE=0 - -# Check that autogen.sh is being run in the top-level directory - -test $TEST_TYPE $FILE || { - echo "You must run this script in the top-level $PKG_NAME directory" - exit 1 -} - -# Check that libtool 1.4 > is installed - -have_libtool=false -if libtoolize --version < /dev/null > /dev/null 2>&1 ; then - libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'` - case $libtool_version in -1.4*|1.5*|2.*) - have_libtool=true -;; - esac -fi -if $have_libtool ; then : ; else - echo - echo "You must have libtool 1.4 installed to compile $PKG_NAME." - echo "Install the appropriate package for your distribution," - echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"; - DIE=1 -fi - -# Check that automake is installed - -(automake --version) < /dev/null
[Xfce4-commits] add new build system
Updating branch refs/heads/master to 12592389476b45cfc6f3920bd626f014fa659abd (commit) from a46c90dd0214094538a3ec2aa19b369636d48628 (commit) commit 12592389476b45cfc6f3920bd626f014fa659abd Author: Bo Lorensen Date: Wed Sep 7 20:52:11 2011 +0200 add new build system core/xfc/CMakeLists.txt | 58 --- de/xfc/CMakeLists.txt|8 ++- de/xfc/utils/CMakeLists.txt |7 +- debian/changelog |6 + debian/rules | 79 ++- examples/CMakeLists.txt |2 +- ui/xfc/CMakeLists.txt| 12 +++ ui/xfc/atk/CMakeLists.txt| 31 ++ ui/xfc/atk/Makefile.am | 112 +++--- ui/xfc/cairo/CMakeLists.txt | 13 +++ ui/xfc/cairo/Makefile.am | 46 +- ui/xfc/gdk-pixbuf/CMakeLists.txt | 12 ++- ui/xfc/gdk/CMakeLists.txt| 30 ++ ui/xfc/gdk/Makefile.am | 108 ++-- ui/xfc/gtk/CMakeLists.txt| 202 ++ ui/xfc/pango/CMakeLists.txt | 21 - xfc-config.h.in |2 +- 17 files changed, 524 insertions(+), 225 deletions(-) diff --git a/core/xfc/CMakeLists.txt b/core/xfc/CMakeLists.txt index 7f9c7df..0ac61a6 100644 --- a/core/xfc/CMakeLists.txt +++ b/core/xfc/CMakeLists.txt @@ -1,46 +1,30 @@ +ADD_SUBDIRECTORY( glib ) + INCLUDE_DIRECTORIES( ${GLIB_INCLUDE_DIRS} ${GOJB_INCLUDE_DIRS} ${GMOD_INCLUDE_DIRS} ${GTHR_INCLUDE_DIRS} ${SIGC_INCLUDE_DIRS} ${XFC_CORE_SOURCE_DIR}) INCLUDE_DIRECTORIES( ${SIGC_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS} ${XFC_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} ) -SET( glib_files - glib/asyncqueue.cc - glib/boxed.cc - glib/completion.cc - glib/connection.cc - glib/date.cc - glib/error.cc - glib/fileutils.cc - glib/iochannel.cc - glib/keyfile.cc - glib/main.cc - glib/markup.cc - glib/marshal.cc - glib/module.cc - glib/mutex.cc - glib/object.cc - glib/objectsignals.cc - glib/option.cc - glib/pattern.cc - glib/property.cc - glib/quark.cc - glib/rand.cc - glib/scanner.cc - glib/shell.cc - glib/signals.cc - glib/spawn.cc - glib/thread.cc - glib/threadpool.cc - glib/timer.cc - glib/timeval.cc - glib/type.cc - glib/unicode.cc - glib/utils.cc - glib/value.cc) - ADD_LIBRARY( xfc_core SHARED convert.cc i18n.cc object.cc stackobject.cc trackable.cc - utfstring.cc version.cc ${glib_files}) + utfstring.cc version.cc ${glib_src}) TARGET_LINK_LIBRARIES( xfc_core ${GLIB_LIBRARIES} ${GOBJ_LIBRARIES} ${GMOD_LIBRARIES} ${GTHR_LIBRARIES} ${SIGC_LIBRARIES}) - +SET_TARGET_PROPERTIES( xfc_core PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} ) #SET_TARGET_PROPERTIES( xfc_core PROPERTIES LINK_INTERFACE_LIBRARIES "") + +INSTALL(TARGETS xfc_core +RUNTIME DESTINATION bin +LIBRARY DESTINATION lib ) + +INSTALL( FILES + convert.hh + i18n.hh + integerobject.hh + object.hh + pointer.hh + stackobject.hh + trackable.hh + utfstring.hh + version.hh + xfccore.hh + DESTINATION include/xfc) diff --git a/de/xfc/CMakeLists.txt b/de/xfc/CMakeLists.txt index 06afe40..32319fc 100644 --- a/de/xfc/CMakeLists.txt +++ b/de/xfc/CMakeLists.txt @@ -5,10 +5,16 @@ pkg_search_module( XFCE_UI REQUIRED libxfce4ui-1 ) pkg_search_module( XFCE_CONF REQUIRED libxfconf-0 ) INCLUDE_DIRECTORIES( ${XFCE_UTILS_INCLUDE_DIRS} ${XFCE_CONF_INCLUDE_DIRS} ${XFCE_UI_INCLUDE_DIRS} ) +INCLUDE_DIRECTORIES( ${XFC_DE_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} ${SIGC_INCLUDE_DIRS} ${XFCE_CONF_INCLUDE_DIRS} ${XFCE_UTIL_INCLUDE_DIRS}) -ADD_LIBRARY( xfc_de SHARED main.cc) +ADD_LIBRARY( xfc_de SHARED main.cc ${utils_src}) TARGET_LINK_LIBRARIES( xfc_de ${XFCE_UTILS_LIBRARIES} ${XFCE_CONF_LIBRARIES} ${XFCE_UI_LIBARIES}) +SET_TARGET_PROPERTIES( xfc_de PROPERTIES VERSION ${XFC_VERSION} SOVERSION ${XFC_MAJOR_VERSION} ) + +INSTALL(TARGETS xfc_de +RUNTIME DESTINATION bin +LIBRARY DESTINATION lib ) #ADD_SUBDIRECTORY( ui ) #ADD_SUBDIRECTORY( panel ) diff --git a/de/xfc/utils/CMakeLists.txt b/de/xfc/utils/CMakeLists.txt index 6645af1..ec5c27d 100644 --- a/de/xfc/utils/CMakeLists.txt +++ b/de/xfc/utils/CMakeLists.txt @@ -1,3 +1,6 @@ -INCLUDE_DIRECTORIES( ${XFC_DE_SOURCE_DIR} ${XFC_CORE_SOURCE_DIR} ${SIGC_INCLUDE_DIRS} ${XFCE_CONF_INCLUDE_DIRS} ${XFCE_UTIL_INCLUDE_DIRS}) -ADD_LIBRARY( xfc_de_utils STATIC config.cc ) +SET( utils_src +utils/config.cc ) + +INSTALL( FILES config.hh DESTINATION include/xfc/utils ) +INSTALL( FILES inline/config.inl DESTINATION include/xfc/utils/inline ) diff --git a/debian/changelog b/debian/changelog index d036867..d11751a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xfc (4.6.0-1) unstable; urgency=low + + * Convert the builing system to cmake + + -- Bo Lorentsen Mon, 15 Aug 2011 23:55:46 +0100 + xfc (4.3.4-1) unstable; urgency=low * New micro release diff --git a/debian/rules b/debian/rules index db463d6..4e7f1aa 100755 --- a/debian/r
[Xfce4-commits] make library build more cmake freindly
Updating branch refs/heads/master to a46c90dd0214094538a3ec2aa19b369636d48628 (commit) from 5c873d05c9fbafa4db4d8d822c277927fd16624a (commit) commit a46c90dd0214094538a3ec2aa19b369636d48628 Author: Bo Lorensen Date: Mon Aug 15 00:07:50 2011 +0200 make library build more cmake freindly CMakeLists.txt|4 ++ core/CMakeLists.txt |3 ++ core/xfc/CMakeLists.txt | 46 ++--- core/xfc/glib/CMakeLists.txt |9 - demos/CMakeLists.txt |3 ++ demos/xfc-demo/CMakeLists.txt | 16 + examples/CMakeLists.txt | 11 ++ examples/core/CMakeLists.txt |6 +++ examples/core/iochannel/CMakeLists.txt|5 +++ examples/core/mainloop/CMakeLists.txt |5 +++ examples/core/spawn/CMakeLists.txt|5 +++ examples/core/threads/CMakeLists.txt | 17 + examples/howto/CMakeLists.txt | 38 examples/howto/actions/CMakeLists.txt |5 +++ examples/howto/arrow/CMakeLists.txt |5 +++ examples/howto/aspectframe/CMakeLists.txt |5 +++ examples/howto/buttonbox/CMakeLists.txt |5 +++ examples/howto/buttons/CMakeLists.txt |5 +++ examples/howto/calendar/CMakeLists.txt|5 +++ examples/howto/colorselection/CMakeLists.txt |5 +++ examples/howto/combobox/CMakeLists.txt|9 + examples/howto/dial/CMakeLists.txt|5 +++ examples/howto/dnd/CMakeLists.txt |5 +++ examples/howto/drawingarea/CMakeLists.txt |9 + examples/howto/entry/CMakeLists.txt |5 +++ examples/howto/entrycompletion/CMakeLists.txt |5 +++ examples/howto/eventbox/CMakeLists.txt|5 +++ examples/howto/fixed/CMakeLists.txt |5 +++ examples/howto/fontselection/CMakeLists.txt |5 +++ examples/howto/frame/CMakeLists.txt |5 +++ examples/howto/label/CMakeLists.txt |5 +++ examples/howto/menu/CMakeLists.txt|9 + examples/howto/notebook/CMakeLists.txt|5 +++ examples/howto/packbox/CMakeLists.txt |5 +++ examples/howto/paned/CMakeLists.txt |5 +++ examples/howto/progressbar/CMakeLists.txt |5 +++ examples/howto/radiobuttons/CMakeLists.txt|5 +++ examples/howto/rangewidgets/CMakeLists.txt|5 +++ examples/howto/rulers/CMakeLists.txt |5 +++ examples/howto/scrolledwindow/CMakeLists.txt |5 +++ examples/howto/selection/CMakeLists.txt |5 +++ examples/howto/spinbutton/CMakeLists.txt |5 +++ examples/howto/statusbar/CMakeLists.txt |5 +++ examples/howto/table/CMakeLists.txt |5 +++ examples/howto/textview/CMakeLists.txt|5 +++ examples/howto/thread/CMakeLists.txt |5 +++ examples/howto/tictactoe/CMakeLists.txt |5 +++ examples/howto/toolbar/CMakeLists.txt |5 +++ examples/howto/treeview/CMakeLists.txt|5 +++ examples/ui/CMakeLists.txt| 10 + examples/ui/actions/CMakeLists.txt|5 +++ examples/ui/cairo/CMakeLists.txt |5 +++ examples/ui/combobox/CMakeLists.txt |5 +++ examples/ui/entrycompletion/CMakeLists.txt|5 +++ examples/ui/filechooser/CMakeLists.txt|5 +++ examples/ui/mergemenus/CMakeLists.txt |5 +++ examples/ui/printing/CMakeLists.txt |5 +++ examples/ui/toolbar/CMakeLists.txt|5 +++ ui/xfc/CMakeLists.txt |8 +++- ui/xfc/atk/CMakeLists.txt | 11 -- ui/xfc/cairo/CMakeLists.txt | 11 -- ui/xfc/gdk-pixbuf/CMakeLists.txt | 11 -- ui/xfc/gdk/CMakeLists.txt | 11 -- ui/xfc/gtk/CMakeLists.txt | 10 -- ui/xfc/pango/CMakeLists.txt | 11 -- 65 files changed, 449 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69316ec..ee2d853 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,10 +8,14 @@ SET( XFC_MAJOR_VERSION 4 ) SET( XFC_MINOR_VERSION 6 ) SET( XFC_MICRO_VERSION 0 ) +SET( XFC_VERSION "${XFC_MAJOR_VERSION}.${XFC_MINOR_VERSION}.${XFC_MICRO_VERSION}") + ADD_SUBDIRECTORY( core ) ADD_SUBDIRECTORY( ui ) #ADD_SUBDIRECTORY( glade ) ADD_SUBDIRECTORY( de ) #ADD_SUBDIRECTORY( sourceview ) +ADD_SUBDIRECTORY( demos ) +ADD_SUBDIRECTORY( examples ) CONFIGURE_FILE( xfc-config.h.in xfc-config.h ) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index b74dde2..ba17d11 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -2,5 +2,8 @@ PROJECT( XFC_CORE ) pkg_search_module( GLIB REQUIRE
[Xfce4-commits] Creating branch last_automake
Updating branch refs/heads/last_automake as new branch to 2d1da72894755c1fe5324cfc41c2f4052357450e (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/last_automake for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] More paper size
Updating branch refs/heads/master to 2d1da72894755c1fe5324cfc41c2f4052357450e (commit) from cd2bace4ccdf894001000963fcb1608cf2611158 (commit) commit 2d1da72894755c1fe5324cfc41c2f4052357450e Author: Bo Lorensen Date: Sun Apr 18 21:52:03 2010 +0200 More paper size ChangeLog |5 + configure.ac |2 +- libXFCcore/xfc/version.hh |2 +- libXFCui/xfc/gtk/Makefile.am |2 - libXFCui/xfc/gtk/printoperation.hh | 212 +++- libXFCui/xfc/gtk/printpagesetup.cc | 14 ++- libXFCui/xfc/gtk/printpagesetup.hh | 21 +++- libXFCui/xfc/gtk/printsetting.cc | 29 +++-- libXFCui/xfc/gtk/printsetting.hh | 45 ++-- 9 files changed, 296 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bf53e4..04d6572 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-17 Bo Lorentsen + + * Add PaperSize implimentation, to be able to request for non default + pages sizes. + 2009-09-10 Bo Lorentsen * Remove xfce-panel build in automake if not Xfce 4.7 or later diff --git a/configure.ac b/configure.ac index 190cce0..d0646f6 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl -- m4_define([xfc_major_version], [4]) m4_define([xfc_minor_version], [3]) -m4_define([xfc_micro_version], [3]) +m4_define([xfc_micro_version], [4]) m4_define([xfc_api_version], [xfc_major_version.xfc_minor_version]) m4_define([xfc_version], [xfc_major_version.xfc_minor_version.xfc_micro_version]) diff --git a/libXFCcore/xfc/version.hh b/libXFCcore/xfc/version.hh index 33bf0c0..a4d4026 100644 --- a/libXFCcore/xfc/version.hh +++ b/libXFCcore/xfc/version.hh @@ -29,7 +29,7 @@ #define XFC_MINOR_VERSION (3) /// Compile time micro version macro. -#define XFC_MICRO_VERSION (3) +#define XFC_MICRO_VERSION (4) /// @name Library Version /// @{ diff --git a/libXFCui/xfc/gtk/Makefile.am b/libXFCui/xfc/gtk/Makefile.am index 5261d13..205aafd 100755 --- a/libXFCui/xfc/gtk/Makefile.am +++ b/libXFCui/xfc/gtk/Makefile.am @@ -132,7 +132,6 @@ hh_sources = \ printoperation.hh \ printoperationsignals.hh \ printpagesetup.hh \ - printpapersize.hh \ printsetting.hh \ radioaction.hh \ radioactionsignals.hh \ @@ -329,7 +328,6 @@ cc_sources = \ printoperation.cc \ printoperationsignals.cc \ printpagesetup.cc \ - printpapersize.cc \ printsetting.cc \ progressbar.cc \ radioaction.cc \ diff --git a/libXFCui/xfc/gtk/printoperation.hh b/libXFCui/xfc/gtk/printoperation.hh index 04efbd3..d11c288 100644 --- a/libXFCui/xfc/gtk/printoperation.hh +++ b/libXFCui/xfc/gtk/printoperation.hh @@ -51,6 +51,29 @@ namespace Xfc { FINISHED_ABORTED = GTK_PRINT_STATUS_FINISHED_ABORTED }; +/** +Gtk::PrintOperation is the high-level, portable printing API. +It looks a bit different than other GTK+ dialogs such as the +GtkFileChooser, since some platforms don't expose enough infrastructure +to implement a good print dialog. On such platforms, Gtk::PrintOperation +uses the native print dialog. On platforms which do not +provide a native print dialog, GTK+ uses its own + +@see Gtk::PrintUnixDialog. + +The typical way to use the high-level printing API is to create +a Gtk::PrintOperation object with construcor +when the user selects to print. Then you set some properties +on it, e.g. the page size, any Gtk::PrintSettings from previous +print operations, the number of pages, the current page, etc. + +Then you start the print operation by calling run(). It will +then show a dialog, let the user select a printer and +options. When the user finished the dialog various signals +will be emitted on the Gtk::PrintOperation, the main one being +draw-page, which you are supposed to catch and render the +page on the provided Gtk::PrintContext using Cairo. +*/ class PrintOperation : public PrintOperationPreview { friend class G::Object; @@ -132,21 +155,208 @@ namespace Xfc { /// @name Methods /// @{ +/** +Sets whether the run() may return before the print +operation is completed. + +@note that some platforms may not allow asynchronous operation. + +@param allow_async true to allow asynchronous operation +*/ void set_allow_async(bool allow_async); + +/** +Makes default_page_setup the default page setup for op. + +This page setup will be used by run(), but it can be +overridden on a per-page basis by connecting to the +"re
[Xfce4-commits] More paper size
Updating branch refs/heads/master to cd2bace4ccdf894001000963fcb1608cf2611158 (commit) from 52d1fa604af32087afacba8f47d3b0e958159b87 (commit) commit cd2bace4ccdf894001000963fcb1608cf2611158 Author: Bo Lorensen Date: Sun Apr 18 21:45:02 2010 +0200 More paper size debian/changelog |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/debian/changelog b/debian/changelog index a876b80..d036867 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xfc (4.3.4-1) unstable; urgency=low + + * New micro release + + -- Bo Lorentsen Sun, 17 Apr 2010 23:19:50 +0100 + xfc (4.3.2-5) unstable; urgency=low * include missing config.h file in dev packages ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] PageSize added
Updating branch refs/heads/master to 52d1fa604af32087afacba8f47d3b0e958159b87 (commit) from d5d1253377d20fb835254dc8f7a34afe98ca232b (commit) commit 52d1fa604af32087afacba8f47d3b0e958159b87 Author: Bo Lorensen Date: Sun Apr 18 21:38:43 2010 +0200 PageSize added libXFCui/xfc/gtk/printpapersize.cc |1 - libXFCui/xfc/gtk/printpapersize.hh | 53 2 files changed, 0 insertions(+), 54 deletions(-) diff --git a/libXFCui/xfc/gtk/printpapersize.cc b/libXFCui/xfc/gtk/printpapersize.cc deleted file mode 100644 index 993cbc9..000 --- a/libXFCui/xfc/gtk/printpapersize.cc +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libXFCui/xfc/gtk/printpapersize.hh b/libXFCui/xfc/gtk/printpapersize.hh deleted file mode 100644 index 57fd491..000 --- a/libXFCui/xfc/gtk/printpapersize.hh +++ /dev/null @@ -1,53 +0,0 @@ -/** - GtkPageSetup - Stores page setup information -*/ -#ifndef XFC_GTK_PAPER_SIZE_HH -#define XFC_GTK_PAPER_SIZE_HH 1 - -#include - -namespace Xfc { -namespace Gtk { -/** - A PageSetup object stores the page size, orientation and margins. - The idea is that you can get one of these from the page setup - dialog and then pass it to the PrintOperation when printing. - The benefit of splitting this out of the PrintSettings is that - these affect the actual layout of the page, and thus need to - be set long before user prints. - - The margins specified in this object are the "print margins", - i.e. the parts of the page that the printer cannot print on. - These are different from the layout margins that a word processor - uses; they are typically used to determine the minimal size - for the layout margins. - - To obtain a PageSetup use gtk_page_setup_new() to get the defaults, - or use run_page_setup_dialog() to show the page setup - dialog and receive the resulting page setup. -*/ -class PrintPaperSize : public G::Object { -public: -PageOrientation get_orientation(); -void set_orientation( PageOrientation orientation); -PaperSize* get_paper_size(); -void set_paper_size( GtkPaperSize *size ); -gdouble get_top_margin( GtkUnit unit); -void set_top_margin( gdouble margin, GtkUnit unit); -gdouble get_bottom_margin( GtkUnit unit); -void set_bottom_margin( gdouble margin, GtkUnit unit); -gdouble get_left_margin( GtkUnit unit); -void set_left_margin( gdouble margin, GtkUnit unit); -gdouble get_right_margin( GtkUnit unit); -void set_right_margin( gdouble margin, GtkUnit unit); -void set_paper_size_and_default_margins( PaperSize *size); -gdouble get_paper_width( GtkUnit unit); -gdouble get_paper_height( GtkUnit unit); -gdouble get_page_width(GtkUnit unit); -gdouble get_page_height( GtkUnit unit); - -}; -} -} - -#endif ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] add missing config.h file
Updating branch refs/heads/master to d5d1253377d20fb835254dc8f7a34afe98ca232b (commit) from 75823972840bbf8cc863904f1a8757fa20bd1401 (commit) commit d5d1253377d20fb835254dc8f7a34afe98ca232b Author: Bo Lorensen Date: Mon Mar 22 23:21:31 2010 +0100 add missing config.h file debian/changelog |6 ++ debian/libxfcui-dev.install |1 + libXFCui/xfc/gtk/messagedialog.hh |2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1cecf15..a876b80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xfc (4.3.2-5) unstable; urgency=low + + * include missing config.h file in dev packages + + -- Bo Lorentsen Mon, 22 Mar 2010 23:19:50 +0100 + xfc (4.3.2-4) unstable; urgency=low * Added G::SList template diff --git a/debian/libxfcui-dev.install b/debian/libxfcui-dev.install index 90fe50e..3ac8cd5 100644 --- a/debian/libxfcui-dev.install +++ b/debian/libxfcui-dev.install @@ -16,4 +16,5 @@ debian/tmp/usr/include/xfce4/xfc/gtk/inline/*.inl debian/tmp/usr/include/xfce4/xfc/pango/*.hh debian/tmp/usr/include/xfce4/xfc/pango/inline/*.inl debian/tmp/usr/include/xfce4/xfc/cairo/*.hh +debian/tmp/usr/include/xfce4/xfc/config.h debian/tmp/usr/lib/pkgconfig/xfcui-*.pc diff --git a/libXFCui/xfc/gtk/messagedialog.hh b/libXFCui/xfc/gtk/messagedialog.hh index 32b5b65..2d4bcb7 100755 --- a/libXFCui/xfc/gtk/messagedialog.hh +++ b/libXFCui/xfc/gtk/messagedialog.hh @@ -81,7 +81,7 @@ enum ButtonType /// Example: A modal dialog. /// @code /// Gtk::MessageDialog dialog(Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, this); -/// dialog.set_message("Error loading file '%s': %s", filename.c_str(), error.message()); +/// dialog.format_message("Error loading file '%s': %s", filename.c_str(), error.message()); /// dialog.set_position(Gtk::WIN_POS_CENTER); /// dialog.run(); /// dialog.dispose(); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] move de headers out of de sub tree
Updating branch refs/heads/master to 75823972840bbf8cc863904f1a8757fa20bd1401 (commit) from 561bd8eb9b6fd8557c8824fd5e0b91c4454938b4 (commit) commit 75823972840bbf8cc863904f1a8757fa20bd1401 Author: Bo Lorensen Date: Mon Nov 16 22:40:54 2009 +0100 move de headers out of de sub tree debian/libxfcde-dev.install |8 libXFCde/xfc/panel/Makefile.am|2 +- libXFCde/xfc/panel/inline/Makefile.am |2 +- libXFCde/xfc/ui/Makefile.am |2 +- libXFCde/xfc/ui/inline/Makefile.am|2 +- libXFCde/xfc/utils/Makefile.am|2 +- libXFCde/xfc/utils/inline/Makefile.am |2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/debian/libxfcde-dev.install b/debian/libxfcde-dev.install index 298240d..db744a0 100644 --- a/debian/libxfcde-dev.install +++ b/debian/libxfcde-dev.install @@ -1,5 +1,5 @@ -debian/tmp/usr/include/xfce4/xfc/de/ui/*.hh -debian/tmp/usr/include/xfce4/xfc/de/ui/inline/*.inl -debian/tmp/usr/include/xfce4/xfc/de/utils/*.hh -debian/tmp/usr/include/xfce4/xfc/de/utils/inline/*.inl +debian/tmp/usr/include/xfce4/xfc/ui/*.hh +debian/tmp/usr/include/xfce4/xfc/ui/inline/*.inl +debian/tmp/usr/include/xfce4/xfc/utils/*.hh +debian/tmp/usr/include/xfce4/xfc/utils/inline/*.inl debian/tmp/usr/lib/pkgconfig/xfcde-*.pc diff --git a/libXFCde/xfc/panel/Makefile.am b/libXFCde/xfc/panel/Makefile.am index 79abc20..a3412b4 100644 --- a/libXFCde/xfc/panel/Makefile.am +++ b/libXFCde/xfc/panel/Makefile.am @@ -8,7 +8,7 @@ hh_sources =\ cc_sources =\ panel.cc -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/panel +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/panel library_include_HEADERS = $(hh_sources) INCLUDES = -I$(top_builddir)/libXFCde -I$(top_builddir)/libXFCcore diff --git a/libXFCde/xfc/panel/inline/Makefile.am b/libXFCde/xfc/panel/inline/Makefile.am index d834214..f4dac4c 100644 --- a/libXFCde/xfc/panel/inline/Makefile.am +++ b/libXFCde/xfc/panel/inline/Makefile.am @@ -1,6 +1,6 @@ inline_sources = panel.inl -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/panel +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/panel inline_includedir = $(library_includedir)/inline inline_include_HEADERS = $(inline_sources) diff --git a/libXFCde/xfc/ui/Makefile.am b/libXFCde/xfc/ui/Makefile.am index dae0554..44c8843 100644 --- a/libXFCde/xfc/ui/Makefile.am +++ b/libXFCde/xfc/ui/Makefile.am @@ -8,7 +8,7 @@ hh_sources =\ cc_sources =\ dialogs.cc -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/ui +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/ui library_include_HEADERS = $(hh_sources) INCLUDES = -I$(top_builddir)/libXFCde -I$(top_builddir)/libXFCcore -I$(top_builddir)/libXFCui diff --git a/libXFCde/xfc/ui/inline/Makefile.am b/libXFCde/xfc/ui/inline/Makefile.am index 0dd03b4..38cfc96 100644 --- a/libXFCde/xfc/ui/inline/Makefile.am +++ b/libXFCde/xfc/ui/inline/Makefile.am @@ -1,6 +1,6 @@ inline_sources = dialog.inl -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/ui +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/ui inline_includedir = $(library_includedir)/inline inline_include_HEADERS = $(inline_sources) diff --git a/libXFCde/xfc/utils/Makefile.am b/libXFCde/xfc/utils/Makefile.am index 857005f..c086d90 100644 --- a/libXFCde/xfc/utils/Makefile.am +++ b/libXFCde/xfc/utils/Makefile.am @@ -8,7 +8,7 @@ hh_sources =\ cc_sources =\ config.cc -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/utils +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/utils library_include_HEADERS = $(hh_sources) INCLUDES = -I$(top_builddir)/libXFCde -I$(top_builddir)/libXFCcore diff --git a/libXFCde/xfc/utils/inline/Makefile.am b/libXFCde/xfc/utils/inline/Makefile.am index 6551aa8..c6792a4 100644 --- a/libXFCde/xfc/utils/inline/Makefile.am +++ b/libXFCde/xfc/utils/inline/Makefile.am @@ -1,6 +1,6 @@ inline_sources = config.inl -library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/de/utils +library_includedir=$(includedir)/$(XFCEDIR)/$(XFC_LIBRARY_NAME)/utils inline_includedir = $(library_includedir)/inline inline_include_HEADERS = $(inline_sources) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] fix problem while including xfconf.h
Updating branch refs/heads/master to 561bd8eb9b6fd8557c8824fd5e0b91c4454938b4 (commit) from 14ea664de626e312693107f9ba560c7e218ddc35 (commit) commit 561bd8eb9b6fd8557c8824fd5e0b91c4454938b4 Author: Bo Lorensen Date: Mon Nov 16 20:45:00 2009 +0100 fix problem while including xfconf.h libXFCde/xfc/utils/config.hh |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/libXFCde/xfc/utils/config.hh b/libXFCde/xfc/utils/config.hh index 44f01f6..0362ff9 100644 --- a/libXFCde/xfc/utils/config.hh +++ b/libXFCde/xfc/utils/config.hh @@ -19,6 +19,9 @@ #ifndef __XFCONF_H__ extern "C" { +#ifdef __GNUC__ +#pragma GCC system_header +#endif #include } #endif @@ -130,6 +133,6 @@ namespace Xfc { } // namespace De } // namespace Xfc -#include +#include #endif ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] add missing inl file
Updating branch refs/heads/master to 14ea664de626e312693107f9ba560c7e218ddc35 (commit) from 5e5cd00b3b4fba8374280b75fe765f39ae3f3c56 (commit) commit 14ea664de626e312693107f9ba560c7e218ddc35 Author: Bo Lorensen Date: Sun Nov 15 23:42:11 2009 +0100 add missing inl file libXFCui/xfc/gtk/inline/builder.inl | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/libXFCui/xfc/gtk/inline/builder.inl b/libXFCui/xfc/gtk/inline/builder.inl new file mode 100644 index 000..3fea8b9 --- /dev/null +++ b/libXFCui/xfc/gtk/inline/builder.inl @@ -0,0 +1,47 @@ +inline GtkBuilder* Xfc::Gtk::Builder::gtk_builder() const +{ +return reinterpret_cast(instance_); +} + +inline Xfc::Gtk::Builder::operator GtkBuilder* () const +{ +return this ? gtk_builder() : NULL; +} + +template +inline bool +Xfc::Gtk::Builder::get_widget(const String& name, WidgetType *&widget) const +{ + widget = 0; + GtkWidget *tmp_widget = GTK_WIDGET(gtk_builder_get_object(gtk_builder(), name.c_str())); + if (tmp_widget) + { + typedef typename WidgetType::CObjectType GtkWidgetType; + widget = G::Object::wrap((GtkWidgetType*)tmp_widget); + } + return widget != 0; +} + +template +inline bool +Xfc::Gtk::Builder::get_widget_derived(const String& name, DerivedType *&widget) const +{ + widget = 0; + GtkWidget *tmp_widget = GTK_WIDGET(gtk_builder_get_object(gtk_builder(), name.c_str())); + if (tmp_widget) + { + G::Object *object = G::Object::pointer((GObject*)tmp_widget); + if (object) + { + widget = dynamic_cast(object); + if (!widget) + g_error("Wrong derived widget argument type passed for \"%s\"\n", name.c_str()); + } + else + { + typedef typename DerivedType::CObjectType GtkWidgetType; + widget = new DerivedType((GtkWidgetType*)tmp_widget, *this); + } + } + return widget != 0; +} ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] builder succefully added, and does even work
Updating branch refs/heads/master to 5e5cd00b3b4fba8374280b75fe765f39ae3f3c56 (commit) from d967ef4d2e0878cb1a8767e85beacf2fcb09a173 (commit) commit 5e5cd00b3b4fba8374280b75fe765f39ae3f3c56 Author: Bo Lorensen Date: Sun Nov 15 22:51:15 2009 +0100 builder succefully added, and does even work configure.ac|8 +- debian/changelog|7 ++ debian/libxfccore-dev.install |2 +- debian/libxfcsourceview-dev.install |2 +- debian/libxfcui-dev.install |2 +- examples/Makefile.fragment |1 - libXFCcore/xfc/glib/Makefile.am |1 + libXFCde/xfc/Makefile.am|8 +- libXFCde/xfc/utils/config.hh|2 +- libXFCui/xfc/gtk/Makefile.am|2 + libXFCui/xfc/gtk/builder.cc | 60 libXFCui/xfc/gtk/builder.hh | 173 +++ libXFCui/xfc/gtk/inline/Makefile.am |1 + 13 files changed, 257 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 2b3b470..190cce0 100644 --- a/configure.ac +++ b/configure.ac @@ -496,9 +496,11 @@ AC_CONFIG_FILES([libXFCde/Makefile \ libXFCde/xfc/ui/Makefile \ libXFCde/xfc/ui/inline/Makefile]) -AM_COND_IF([USE_PANEL], [AC_CONFIG_FILES([ -libXFCde/xfc/panel/Makefile \ -libXFCde/xfc/panel/inline/Makefile])] ) +if test "x$DE_PANEL_FOUND" == "xyes"; then +AC_CONFIG_FILES([ + libXFCde/xfc/panel/Makefile \ + libXFCde/xfc/panel/inline/Makefile]) +fi AC_OUTPUT() diff --git a/debian/changelog b/debian/changelog index 9bf4394..1cecf15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xfc (4.3.2-4) unstable; urgency=low + + * Added G::SList template + * Added Gtk::Builder class to make it possible to stop using libglade + + -- Bo Lorentsen Sun, 15 Nov 2009 20:12:19 +0100 + xfc (4.3.2-3) unstable; urgency=low * Basic printing support added diff --git a/debian/libxfccore-dev.install b/debian/libxfccore-dev.install index cc8cd31..e275c73 100644 --- a/debian/libxfccore-dev.install +++ b/debian/libxfccore-dev.install @@ -11,4 +11,4 @@ debian/tmp/usr/include/xfce4/xfc/integerobject.hh debian/tmp/usr/include/xfce4/xfc/glib/*.hh debian/tmp/usr/include/xfce4/xfc/glib/private/*.hh debian/tmp/usr/include/xfce4/xfc/glib/inline/*.inl -debian/tmp/usr/lib/pkgconfig/xfccore-4.3.pc +debian/tmp/usr/lib/pkgconfig/xfccore-*.pc diff --git a/debian/libxfcsourceview-dev.install b/debian/libxfcsourceview-dev.install index e02103a..7b31eff 100644 --- a/debian/libxfcsourceview-dev.install +++ b/debian/libxfcsourceview-dev.install @@ -1,3 +1,3 @@ debian/tmp/usr/include/xfce4/xfc/sourceview/*.hh debian/tmp/usr/include/xfce4/xfc/sourceview/private/*.hh -debian/tmp/usr/lib/pkgconfig/xfcsourceview-4.3.pc +debian/tmp/usr/lib/pkgconfig/xfcsourceview-*.pc diff --git a/debian/libxfcui-dev.install b/debian/libxfcui-dev.install index 6e9b185..90fe50e 100644 --- a/debian/libxfcui-dev.install +++ b/debian/libxfcui-dev.install @@ -16,4 +16,4 @@ debian/tmp/usr/include/xfce4/xfc/gtk/inline/*.inl debian/tmp/usr/include/xfce4/xfc/pango/*.hh debian/tmp/usr/include/xfce4/xfc/pango/inline/*.inl debian/tmp/usr/include/xfce4/xfc/cairo/*.hh -debian/tmp/usr/lib/pkgconfig/xfcui-4.3.pc +debian/tmp/usr/lib/pkgconfig/xfcui-*.pc diff --git a/examples/Makefile.fragment b/examples/Makefile.fragment index f5c3e68..41b6fa1 100644 --- a/examples/Makefile.fragment +++ b/examples/Makefile.fragment @@ -18,4 +18,3 @@ uninstall-local: rm -f $(DESTDIR)$(xfc_docdir)/$(subdir)/$$f; \ fi; \ done - diff --git a/libXFCcore/xfc/glib/Makefile.am b/libXFCcore/xfc/glib/Makefile.am index b3ba1bf..33f618d 100644 --- a/libXFCcore/xfc/glib/Makefile.am +++ b/libXFCcore/xfc/glib/Makefile.am @@ -30,6 +30,7 @@ hh_sources = \ scanner.hh \ shell.hh \ signals.hh \ + slist.hh \ spawn.hh \ thread.hh \ threadpool.hh \ diff --git a/libXFCde/xfc/Makefile.am b/libXFCde/xfc/Makefile.am index a1d25c6..f85c861 100644 --- a/libXFCde/xfc/Makefile.am +++ b/libXFCde/xfc/Makefile.am @@ -11,8 +11,8 @@ libXFCde_4_3_la_LIBADD= utils/libutils.la ui/libui.la $(XFC_DE_UTIL_LIBS) $(XFC_ libXFCde_4_3_la_LDFLAGS= -version-info $(XFC_LIBRARY_VERSION) # Panel will not work until Xfce 4.8 -if USE_PANEL - SUBDIRS += panel - libXFCde_4_3_la_LIBADD += panel/libpanel.la $(XFC_DE_PANEL_LIBS) -endif +#if USE_PANEL +# SUBDIRS += panel +# libXFCde_4_3_la_LIBADD += panel/libpanel.la $(XFC_DE_PANEL_LIBS) +#endif diff --git a/libXFCde/xfc/utils/config.hh b/libXFCde/xfc/utils/config.hh index a7a3402..44f01f6 100644 --- a/libXFCde/xfc/utils/config.hh +++ b/libXFCde/xfc/utils/config.hh @@ -130,6 +130,6 @@ namespace Xfc { } // namespace De } // namespace Xfc -#include +#include #endif diff --git a/libXFCui/xfc/gtk/Makefile.am b/libXFCui/xfc/gtk/Makefile.am index dfcc739..5261d13 100755 --- a/libXFCui/xfc/gtk/Makefile.am ++
[Xfce4-commits] builder succefully added, and does even work
Updating branch refs/heads/master to d967ef4d2e0878cb1a8767e85beacf2fcb09a173 (commit) from 6cebac338aded76d3e7625d26dbadb5263953d36 (commit) commit d967ef4d2e0878cb1a8767e85beacf2fcb09a173 Author: Bo Lorensen Date: Sun Nov 15 22:44:01 2009 +0100 builder succefully added, and does even work debian/libxfcde-dev.install |5 ++ debian/libxfcde.install |1 + libXFCcore/xfc/glib/slist.hh | 124 ++ 3 files changed, 130 insertions(+), 0 deletions(-) diff --git a/debian/libxfcde-dev.install b/debian/libxfcde-dev.install new file mode 100644 index 000..298240d --- /dev/null +++ b/debian/libxfcde-dev.install @@ -0,0 +1,5 @@ +debian/tmp/usr/include/xfce4/xfc/de/ui/*.hh +debian/tmp/usr/include/xfce4/xfc/de/ui/inline/*.inl +debian/tmp/usr/include/xfce4/xfc/de/utils/*.hh +debian/tmp/usr/include/xfce4/xfc/de/utils/inline/*.inl +debian/tmp/usr/lib/pkgconfig/xfcde-*.pc diff --git a/debian/libxfcde.install b/debian/libxfcde.install new file mode 100644 index 000..afec8e8 --- /dev/null +++ b/debian/libxfcde.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libXFCde*.so* diff --git a/libXFCcore/xfc/glib/slist.hh b/libXFCcore/xfc/glib/slist.hh new file mode 100644 index 000..80e024f --- /dev/null +++ b/libXFCcore/xfc/glib/slist.hh @@ -0,0 +1,124 @@ +#ifndef XFC_SLIST_HH +#define XFC_SLIST_HH + +#include + +#ifndef __G_SLIST_H__ +#include +#endif + +namespace Xfc { +namespace G { + +/** +Template version of glib GSList, holding only a subset of functions +that can be contained inside a glist. The template has all of the short +commings of the underlaying GSList, and adds only type safty and +some simple conversions. + +Also note that the list holds a pointer to the elements inside the +list and that these pointers are unmaintained and unreferenced. + +The template are ment as a thin wrapper to be able to handle listed +handed over by the underlaying GTK layer as cheap as possible. + +This class in NOT thread safe. +*/ +template class SList { +GSList *_list; +public: +class iterator { +GSList *_cur; +public: +iterator( SList &base ) : _cur( base._list ) {} + +void operator++() { +_cur = g_slist_next( _cur ); +} + +operator T * () { return _cur->data; } +}; + +SList() { +_list = g_slist_alloc(); +} + +// Please note that this is not typesafe, so you need to know what you are doing +SList( GSList *orig ) { +_list = orig; +} + +~SList() { g_slist_free( _list ); } + +iterator begin() const { +return iterator( _list ); +} + +iterator end() const { +return iterator( g_slist_last( _list )); +} + +// The same as push_back in STL +void append( T *data ) { +_list = g_slist_append( _list, data ); +} + +void prepend( T *data ) { +_list = g_list_prepend( _list, data ); +} + +void insert( T* data, size_t position) { +_list = g_slist_insert( _list, data, position ); +} + +void remove( const T *data ) { +_list = g_slist_remove( _list, data ); +} + +void remove_all( const T *data) { +_list = g_slist_remove_all( _list, data ); +} + +size_t length() const { +return g_slist_length( _list ); +} + +SList copy() const { +return SList( g_slist_copy( _list )); +} + +SList reverse() const { +return SList( g_slist_reverse( _list )); +} + +void concat( SList &list ) { +_list = g_slist_concat( _list, list._list ); +} + +T* nth_data(size_t n) { +return g_slist_nth_data( _list, n ); +} + +size_t index( const T *data ) const { +return g_slist_index( _list, data ); +} + +/** +Convert to the nearest STL container, but only on demand. +This is a full copy, and perform as that ! +*/ +operator std::list &() const { +std::list< T* > l; + +for( iterator i = begin(); i != end(); ++i ) +l.push_back( *i ); + +return l; +} + +friend class iterator; +}; +} +} + +#endif ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits