libgnomedb r1734 - in trunk: . doc/C doc/C/images libgnomedb libgnomedb-extra libgnomedb-graph
- From: vivien svn gnome org
- To: svn-commits-list gnome org
- Subject: libgnomedb r1734 - in trunk: . doc/C doc/C/images libgnomedb libgnomedb-extra libgnomedb-graph
- Date: Wed, 2 Jul 2008 19:46:45 +0000 (UTC)
Author: vivien
Date: Wed Jul 2 19:46:45 2008
New Revision: 1734
URL: http://svn.gnome.org/viewvc/libgnomedb?rev=1734&view=rev
Log:
2008-07-02 Vivien Malerba <malerba gnome-db org>
* libgnomedb-extra/gnome-db-selector-part.c:
* libgnomedb/gnome-db-init.c:
* doc/C: doc. improvements (now can generate a PDF, use 'make PDF')
* libgnomedb-graph/goo-canvas-test.c:
* libgnomedb-graph/gnome-db-canvas-db-relations.c: adaptations to
the GdaMetaStruct changes
Added:
trunk/doc/C/migration2.xml
trunk/doc/C/sampleapp1.png
- copied unchanged from r1733, /trunk/doc/C/images/sampleapp1.png
trunk/doc/C/sampleapp2.png
- copied unchanged from r1733, /trunk/doc/C/images/sampleapp2.png
Removed:
trunk/doc/C/images/sampleapp1.png
trunk/doc/C/images/sampleapp2.png
Modified:
trunk/ChangeLog
trunk/doc/C/Makefile.am
trunk/doc/C/example.sgml
trunk/doc/C/libgnomedb-4.0-docs.sgml
trunk/doc/C/migration.xml
trunk/libgnomedb-extra/gnome-db-selector-part.c
trunk/libgnomedb-graph/gnome-db-canvas-db-relations.c
trunk/libgnomedb-graph/goo-canvas-test.c
trunk/libgnomedb/gnome-db-init.c
Modified: trunk/doc/C/Makefile.am
==============================================================================
--- trunk/doc/C/Makefile.am (original)
+++ trunk/doc/C/Makefile.am Wed Jul 2 19:46:45 2008
@@ -55,8 +55,8 @@
$(srcdir)/images/gnome-db-form.png \
$(srcdir)/images/gnome-db-grid.png \
$(srcdir)/images/gnome-db-selector.png \
- $(srcdir)/images/sampleapp1.png \
- $(srcdir)/images/sampleapp2.png \
+ sampleapp1.png \
+ sampleapp2.png \
$(srcdir)/images/sampleapp3.png \
$(srcdir)/images/sampleapp4.png \
$(srcdir)/images/Form_Grid.png \
@@ -70,3 +70,18 @@
# Other files to distribute
EXTRA_DIST += example.c
+# Files not to distribute
+# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
+# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
+DISTCLEANFILES = $(DOC_MODULE)-docs.sgml.pdf
+
+DOC_STAMPS += pdf-build.stamp
+CLEANFILES += $(DOC_STAMPS)
+
+# Create the PDF
+PDF: pdf-build.stamp
+pdf-build.stamp:
+ if test -f $(srcdir)/$(DOC_MAIN_SGML_FILE); then \
+ dblatex $(srcdir)/$(DOC_MAIN_SGML_FILE); \
+ fi
+ touch pdf-build.stamp
Modified: trunk/doc/C/example.sgml
==============================================================================
--- trunk/doc/C/example.sgml (original)
+++ trunk/doc/C/example.sgml Wed Jul 2 19:46:45 2008
@@ -21,13 +21,21 @@
and the bottom part shows the selected order's contents (one item in the example).
Even though they are used, all the primary and foreign keys are hidden from the user.
</para>
- <inlinegraphic fileref="sampleapp1.png" format="PNG"></inlinegraphic>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="sampleapp1.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
<para>
The user is expected to select a customer from a popup list at the top of the application, and when done, the
list of orders for that customers gets updated; when the selected order changes, the order's contents (details)
is also updated as a dependency, as illustrated in the following picture:
</para>
- <inlinegraphic fileref="sampleapp2.png" format="PNG"></inlinegraphic>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="sampleapp2.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
<para>
This sample example is built using LibGlade, and avoids concentrating on the GTK specific layout code. The code
is located in the <filename>samples/SimpleExample</filename> directory,
Modified: trunk/doc/C/libgnomedb-4.0-docs.sgml
==============================================================================
--- trunk/doc/C/libgnomedb-4.0-docs.sgml (original)
+++ trunk/doc/C/libgnomedb-4.0-docs.sgml Wed Jul 2 19:46:45 2008
@@ -7,6 +7,7 @@
<!ENTITY fdl-appendix SYSTEM "fdl-appendix.sgml">
<!ENTITY visual-index SYSTEM "visual_index.xml">
<!ENTITY migration SYSTEM "migration.xml">
+<!ENTITY migration2 SYSTEM "migration2.xml">
<!ENTITY libgnomedb-Example SYSTEM "example.sgml">
<!ENTITY libgnomedb-Example-Code SYSTEM "example.c">
<!ENTITY libgnomedb-init SYSTEM "xml/libgnomedb.xml">
@@ -223,6 +224,7 @@
</chapter>
&migration;
+ &migration2;
</part>
<part>
@@ -359,11 +361,12 @@
&libgnomedb-GnomeDbEntryCommonTime;
</chapter>
</part>
- &fdl-appendix;
- <chapter id="libgnomedb-index">
- <title>Index</title>
+
+ <part id="part_index">
+ <title>Appendix</title>
+ &fdl-appendix;
<index>
<title>Index</title>
</index>
- </chapter>
+ </part>
</book>
Modified: trunk/doc/C/migration.xml
==============================================================================
--- trunk/doc/C/migration.xml (original)
+++ trunk/doc/C/migration.xml Wed Jul 2 19:46:45 2008
@@ -1,5 +1,5 @@
-<chapter id="migration">
- <title>Migration from older versions</title>
+<chapter id="migration-1">
+ <title>Migration from 1.X versions</title>
<sect1><title>Global changes</title>
<para>
Added: trunk/doc/C/migration2.xml
==============================================================================
--- (empty file)
+++ trunk/doc/C/migration2.xml Wed Jul 2 19:46:45 2008
@@ -0,0 +1,18 @@
+<chapter id="migration-2">
+ <title>Migration from 3.X versions</title>
+ <sect1><title>Overview</title>
+ <para>Version 4.0 of &LIBGNOMEDB; is a major rework of the library (mainly guided by the the version 4.0 of Libgda),
+ for the following benefits:
+ <itemizedlist>
+ <listitem><para>easier to understand and to use API, with less strange path usage (which were inherited
+ from modifications above modifications where no global coherence was adressed)</para></listitem>
+ <listitem><para>removed dependancy on the obsolete GnomeCanvas library</para></listitem>
+ </itemizedlist>
+ </para>
+ </sect1>
+
+ <sect1>
+ <title>Global changes</title>
+ </sect1>
+
+</chapter>
Modified: trunk/libgnomedb-extra/gnome-db-selector-part.c
==============================================================================
--- trunk/libgnomedb-extra/gnome-db-selector-part.c (original)
+++ trunk/libgnomedb-extra/gnome-db-selector-part.c Wed Jul 2 19:46:45 2008
@@ -272,7 +272,7 @@
* @store: a #GtkTreeStore, or %NULL
* @at_iter: a #GtkTreeIter, or %NULL
*
- * Looks for a value whih id is @id in @part and its parent hierarchy
+ * Looks for a value which id is @id in @part (also looks in its parent hierarchy)
*
* Returns: the (non modifiable) #GValue, or %NULL if not found
*/
Modified: trunk/libgnomedb-graph/gnome-db-canvas-db-relations.c
==============================================================================
--- trunk/libgnomedb-graph/gnome-db-canvas-db-relations.c (original)
+++ trunk/libgnomedb-graph/gnome-db-canvas-db-relations.c Wed Jul 2 19:46:45 2008
@@ -305,8 +305,8 @@
if (!canvas->priv->mstruct) {
if (!canvas->priv->store)
return NULL;
- canvas->priv->mstruct = gda_meta_struct_new (GDA_META_STRUCT_FEATURE_FOREIGN_KEYS);
- gda_meta_struct_complement_default (canvas->priv->mstruct, canvas->priv->store, NULL);
+ canvas->priv->mstruct = gda_meta_struct_new (canvas->priv->store, GDA_META_STRUCT_FEATURE_FOREIGN_KEYS);
+ gda_meta_struct_complement_default (canvas->priv->mstruct, NULL);
}
return canvas->priv->mstruct;
}
@@ -424,7 +424,7 @@
return;
if (dbrel->priv->store)
- gda_meta_struct_complement_depend (dbrel->priv->mstruct, dbrel->priv->store, dbo, NULL);
+ gda_meta_struct_complement_depend (dbrel->priv->mstruct, dbo, NULL);
GdaMetaTable *mtable = GDA_META_TABLE (dbo);
GSList *list;
GooCanvasBounds bounds;
@@ -495,7 +495,7 @@
build_context_menu (GnomeDbCanvas *canvas)
{
GtkWidget *menu, *mitem, *submenu, *submitem;
- GSList *list;
+ GSList *dbolist, *list;
GnomeDbCanvasDbRelations *dbrel = GNOME_DB_CANVAS_DB_RELATIONS (canvas);
if (!get_mstruct (dbrel))
@@ -508,7 +508,8 @@
submenu = NULL;
/* build list of tables */
- for (list = dbrel->priv->mstruct->db_objects; list; list = list->next) {
+ dbolist = gda_meta_struct_get_all_db_objects (dbrel->priv->mstruct);
+ for (list = dbolist; list; list = list->next) {
GdaMetaDbObject *dbo = GDA_META_DB_OBJECT (list->data);
GdaMetaTable *mtable;
@@ -538,6 +539,7 @@
g_object_set_data_full (G_OBJECT (mitem), "tname", tname, (GDestroyNotify) gda_value_free);
g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_add_table_cb), canvas);
}
+ g_slist_free (dbolist);
/* sub menu is incensitive if there are no more tables left to add */
gtk_widget_set_sensitive (submitem, submenu ? TRUE : FALSE);
@@ -559,7 +561,7 @@
/*g_print ("Add %s.%s.%s\n", g_value_get_string (table_catalog),
g_value_get_string (table_schema), g_value_get_string (table_name));*/
- mtable = (GdaMetaTable*) gda_meta_struct_complement (canvas->priv->mstruct, canvas->priv->store, GDA_META_DB_TABLE,
+ mtable = (GdaMetaTable*) gda_meta_struct_complement (canvas->priv->mstruct, GDA_META_DB_TABLE,
table_catalog, table_schema, table_name, NULL);
if (mtable) {
GnomeDbGraphItem *gitem;
@@ -623,7 +625,7 @@
if (!get_mstruct (canvas))
return NULL;
- mtable = (GdaMetaTable *) gda_meta_struct_complement (canvas->priv->mstruct, canvas->priv->store, GDA_META_DB_TABLE,
+ mtable = (GdaMetaTable *) gda_meta_struct_complement (canvas->priv->mstruct, GDA_META_DB_TABLE,
table_catalog, table_schema, table_name, NULL);
if (mtable) {
GnomeDbGraphItem *gitem;
Modified: trunk/libgnomedb-graph/goo-canvas-test.c
==============================================================================
--- trunk/libgnomedb-graph/goo-canvas-test.c (original)
+++ trunk/libgnomedb-graph/goo-canvas-test.c Wed Jul 2 19:46:45 2008
@@ -71,11 +71,11 @@
item = gnome_db_canvas_text_new (root, "GnomeDbCanvasText", 100., 140., NULL);
/* Entity: table */
- mstruct = gda_meta_struct_new (GDA_META_STRUCT_FEATURE_FOREIGN_KEYS);
+ mstruct = gda_meta_struct_new (store, GDA_META_STRUCT_FEATURE_FOREIGN_KEYS);
GdaMetaTable *mtable;
GValue *value;
g_value_set_string ((value = gda_value_new (G_TYPE_STRING)), "customers");
- mtable = gda_meta_struct_complement (mstruct, store, GDA_META_DB_TABLE,
+ mtable = gda_meta_struct_complement (mstruct, GDA_META_DB_TABLE,
NULL, NULL, value, NULL);
if (mtable)
item = gnome_db_canvas_table_new (root, mtable, 200., 200., NULL);
Modified: trunk/libgnomedb/gnome-db-init.c
==============================================================================
--- trunk/libgnomedb/gnome-db-init.c (original)
+++ trunk/libgnomedb/gnome-db-init.c Wed Jul 2 19:46:45 2008
@@ -41,6 +41,7 @@
* gnome_db_init
*
* Initialization of the libgnomedb library, must be called before any usage of the library.
+ * Note: gtk_init() is not called by this function and should also be called.
*/
void
gnome_db_init (void)
@@ -80,7 +81,10 @@
* gnome_db_get_application_exec_path
* @app_name: the name of the application to find
*
- * Find the path to the application identified by @app_name.
+ * Find the path to the application identified by @app_name. For example if the application
+ * is "gnome-database-properties", then calling this function will return
+ * "/your/prefix/bin/gnome-database-properties-4.0" if Libgnomedb is installed in
+ * the "/your/prefix" prefix (which would usually be "/usr"), and for the ABI version 4.0.
*
* Returns: the path as a new string, or %NULL if the application cannot be found
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]