<chapter id="migration-1">
  <title>Migration from 1.X versions</title>

  <sect1><title>Global changes</title>
    <para>
      <itemizedlist>
	<listitem>
	  <para>The <function>db_shell_new()</function> has been removed as this kind of code is more an application
            code and not a library code</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbBrowser</classname> widget has been removed, use the
            <classname>GnomeDbSelector</classname> widget as a replacement; there is also a new application
            named <application>gnome-db-browser</application> which lets the user browse through the objects in a
            dictionary.</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbCombo</classname> now inherits from <classname>GtkComboBox</classname> and has
            more features, the
            <function>gnome_db_combo_get_column()</function> has been removed as the new combo can display more
            than one column at a time.</para>
	</listitem>
	<listitem>
	  <para>The <function>gnome_db_config*()</function> have all been removed as Libgnomedb now relies entirely
            on Libgda for the data sources management and <application>GConf</application> is not used anymore to
            keep a list of data sources.</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbConnectionSelector</classname> class has been removed as it was not implemented.
	  </para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbControlWidget</classname>,
            <classname>GnomeDbControl</classname> and <classname>GnomeDbWindow</classname> classes have
            been removed as <application>Bonobo</application> is not used anymore</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbDataSourceSelector</classname> widget now inherits
            <classname>GtkComboBox</classname> instead of the <classname>GtkOptionMenu</classname></para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbForm</classname> and <classname>GnomeDbGrid</classname> widgets have had many
            changes, see <link linkend="viewchanges">This section</link> for more information.</para>
	</listitem>
	<listitem>
	  <para>The <filename>gnome-db-i18n.h</filename> file has been removed, the standard
            <filename>glib/gi18n-lib.h</filename> is now used</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbIconList</classname> widget has been removed as it was not fully
            implemented</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbList</classname> widget has been removed, use
            <classname>GnomeDbGrid instead</classname></para>
	</listitem>
	<listitem>
	  <para>The <function>gnome_db_model_to_gtk_tree_view()</function> has been replaced by
            the <classname>GnomeDbDataStore</classname> object which implements the
            <classname>GtkTreeModel</classname> interface and can be used directly as the data model
            of a <classname>GtkTreeView</classname> widget</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbProviderSelector</classname> widget now inherits the
            <classname>GnomeDbCombo</classname> widget and has an improved API.</para>
	</listitem>
	<listitem>
	  <para>The <classname>GnomeDbQueryBuilder</classname>, <classname>GnomeDbTableEditor</classname>
            and <classname>SqlViewer</classname>
            widgets have been removed because they were not useable.</para>
	</listitem>
	<listitem>
	  <para>Some utility functions in <filename>gnome-db-util.h</filename> have been removed if they
            were not used anymore in Libgnomedb.</para>
	</listitem>
	<listitem>
	  <para>The <function>table_properties_dialog()</function>, <function>tables_page_*()</function>
            and <function>db_connect*()</function> have been removed because they offered little
            functionality on top of other GnomeDb widgets.
	  </para>
	</listitem>
      </itemizedlist>
    </para>
  </sect1>

  <sect1 id="viewchanges"><title>GnomeDbGrid and GnomeDbForm widgets changes</title>
    <para>The <classname>GnomeDbForm</classname> and <classname>GnomeDbGrid</classname> widgets both display
      data from a <classname>GdaDataModel</classname>, and, if the data model supports it, allow the user
      to make changes to the data. These widgets are structured in the same way, as described by the following
      UMLish diagram. They both implement the <classname>GnomeDbDataWidget</classname> interface.
    </para>
    <para>
      <mediaobject>
        <imageobject role="html">
          <imagedata fileref="Form_Grid.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Form and grid widgets overview</phrase>
        </textobject>
      </mediaobject>
    </para>
    <para>
      Also both of these widgets are
      visually composed of a specialized widget (which actually display the data) and of a
      <classname>GnomeDbDataWidgetInfo</classname> widget which displays navigation and other action buttons,
      which is illustrated in the following diagram:
    </para>
    <para>
      <mediaobject>
        <imageobject role="html">
          <imagedata fileref="Form_Grid_example.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Form and grid widgets composition examples</phrase>
        </textobject>
      </mediaobject>
    </para>
    <para>
      As illustrated on the UML diagram, the <classname>GnomeDbRawForm</classname> inherits the
      <classname>GnomeDbBasicForm</classname> which is a form which displays data contained in a
      <classname>GdaSet</classname> vector of values. The <classname>GnomeDbBasicForm</classname>
      can be used when the data to display is not in a <classname>GdaDataModel</classname>, such
      as when a couple of values are required to perform extra operation.
    </para>
  </sect1>
</chapter>
