~ubuntu-branches/ubuntu/precise/glom/precise-updates

« back to all changes in this revision

Viewing changes to glom/mode_design/layout/dialog_choose_field.h

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-10-09 16:50:36 UTC
  • mfrom: (1.1.42 upstream)
  • Revision ID: james.westby@ubuntu.com-20091009165036-orinvwmohk838xxl
Tags: 1.12.2-0ubuntu1
* New upstream version:
  - FFE LP: #391664
* debian/control:
  - Bump python-gnome2-extras-dev build-dep to >= 2.25.3.
  - Bump libgdamm3.0-dev build-dep to libgdamm4.0-dev >= 3.99.14.
  - Change libgda3-dev build-dep to libgda-4.0-dev.
  - Change libgda3-postgres dependency to libgda-4.0-postgres.
  - Bump libgtkmm-2.4-dev build-dep to >= 2.14.
  - Add build-dep on libgconfmm-2.6-dev.
  - Bump libgoocanvasmm-dev build-dep to >= 0.14.0.
  - Remove build-dep on libbakery-2.6-dev.
  - Bump postgresql-8.3 dependency to postgresql-8.4.
  - Change scrollkeeper build-dep to rarian-compat.
  - Rename libglom{0,-dev} -> libglom-1.12-{0,dev}. Upstream include
    APIVER in the library name now.
* debian/rules:
  - Update --with-postgres-utils configure flag to point to the new
    path.
  - Drop deprecated --disable-scrollkeeper configure flag.
  - Update DEB_SHLIBDEPS_INCLUDE with new libglom-1.12-0 package name.
  - Don't include /usr/share/cdbs/1/rules/simple-patchsys.mk - there
    are currently no patches.
* debian/libglom-1.12-0.install:
  - Updated for new version.
* debian/libglom-1.12-dev.install:
  - Install pc and header files.
* debian/glom-doc.install:
  - Updated for new version.
* debian/glom.install:
  - Updated for new version.
* Fix debian/watch.
* Dropped obsolete 10-distro-install-postgres-change.patch.
* Built against latest libgoocanvasmm (LP: #428445).
* Also closes LP: #230007, LP: #393229, LP: #393231, LP: #394507,
  LP: #394887, LP: #394894, LP: #397409, LP: #381563.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Glom
 
2
 *
 
3
 * Copyright (C) 2001-2004 Murray Cumming
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License as
 
7
 * published by the Free Software Foundation; either version 2 of the
 
8
 * License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public
 
16
 * License along with this program; if not, write to the
 
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
 * Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef GLOM_MODE_DATA_DIALOG_CHOOSE_FIELD_H
 
22
#define GLOM_MODE_DATA_DIALOG_CHOOSE_FIELD_H
 
23
 
 
24
#include <gtkmm.h>
 
25
#include <glom/utility_widgets/dialog_properties.h>
 
26
#include <libglom/document/document.h>
 
27
#include <glom/box_withbuttons.h>
 
28
#include <glom/utility_widgets/combo_textglade.h>
 
29
#include <glom/mode_design/layout/combobox_relationship.h>
 
30
#include <glom/mode_design/comboentry_currency.h>
 
31
 
 
32
namespace Glom
 
33
{
 
34
 
 
35
class Dialog_ChooseField : public Gtk::Dialog
 
36
{
 
37
public:
 
38
  Dialog_ChooseField(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
39
  virtual ~Dialog_ChooseField();
 
40
 
 
41
  /**
 
42
   * @param document The document, so that the dialog can load the previous layout, and save changes.
 
43
   * @param table_name The table name.
 
44
   * @param field The starting field information.
 
45
   */
 
46
  virtual void set_document(Document* document, const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field);
 
47
  virtual void set_document(Document* document, const Glib::ustring& table_name);
 
48
 
 
49
 
 
50
  //void select_item(const sharedptr<const Field>& field);
 
51
 
 
52
  sharedptr<LayoutItem_Field> get_field_chosen() const;
 
53
  
 
54
  typedef std::list< sharedptr<LayoutItem_Field> > type_list_field_items;
 
55
  type_list_field_items get_fields_chosen() const;
 
56
 
 
57
private:
 
58
 
 
59
  virtual void on_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* view_column);
 
60
  virtual void on_treeview_selection_changed();
 
61
  virtual void on_combo_relationship_changed();
 
62
  virtual void on_checkbutton_related_relationships_toggled();
 
63
 
 
64
  //Tree model columns:
 
65
  class ModelColumns_Fields : public Gtk::TreeModel::ColumnRecord
 
66
  {
 
67
  public:
 
68
 
 
69
    ModelColumns_Fields()
 
70
    { add(m_col_name); add(m_col_title); add(m_col_field); }
 
71
 
 
72
    Gtk::TreeModelColumn<Glib::ustring> m_col_name;
 
73
    Gtk::TreeModelColumn<Glib::ustring> m_col_title;
 
74
    Gtk::TreeModelColumn< sharedptr<Field> > m_col_field;
 
75
  };
 
76
 
 
77
  ModelColumns_Fields m_ColumnsFields;
 
78
 
 
79
  ComboBox_Relationship* m_combo_relationship;
 
80
  Gtk::Button* m_button_select;
 
81
  Gtk::CheckButton* m_checkbutton_show_related_relationships;
 
82
  Gtk::TreeView* m_treeview;
 
83
  Glib::RefPtr<Gtk::ListStore> m_model;
 
84
 
 
85
  Glib::ustring m_table_name;
 
86
  sharedptr<LayoutItem_Field> m_start_field; //stored so we can preserve extra information that's not changed here.
 
87
 
 
88
  Document* m_document;
 
89
};
 
90
 
 
91
} //namespace Glom
 
92
 
 
93
#endif //GLOM_MODE_DATA_DIALOG_CHOOSE_FIELD_H