~ubuntu-branches/ubuntu/quantal/glom/quantal

« back to all changes in this revision

Viewing changes to glom/layout_item_dialogs/dialog_textobject.cc

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2009-01-11 17:12:01 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090111171201-0ov9zh1fxfueshxc
Tags: 1.8.5-0ubuntu1
* New upstream release (LP: #256701), fixes LP bugs: 
  + Clear the text in property dialogs for text items (LP: #309147)
  + Don't crash when showing and then hiding the grid (LP: #303453)
  + Temporarily remember the sort order so it is the same when navigating 
    away and back (LP: #303422)
  + Use the list's sort order for the top-level records in the report 
    (LP: #303425)
  + Users/Groups: Disable drag-and-drop for the treeview, because it is
    useless and confusing (LP: #299573)
  + Import: Sort the fields list alphabetically (LP: #306593)
  + delete primary key make unusuable the database (LP: #299549)
  + Spanish translate incomplete (LP: #299556)
  + import date format error (LP: #299591)
  + can't delete data from table list view (LP: #299853)
  + Field definition: default value not saved (LP: #299896)
  + reports crashing (LP: #300054)
  + Year error with date fields (LP: #300057)
  + list view: 2 records added instead of 1 (LP: #300819)
* debian/control: Refreshed dependencies for libglom-dev.
* debian/control: Updated build-deps to match configure checks. goocavnasmm
  build-dep bumped to version without .la files.
* debian/rules: Don't delete the directory containing the templates.
* debian/control, debian/rules, debian/glom-doc.*: Split out
  arch-independent manual and examples into separate package glom-doc, which
  is now recommended by glom (glom will still work if they're not available)
* debian/copyright: Rewritten to new machine-readable format. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
{
31
31
 
32
32
Dialog_TextObject::Dialog_TextObject(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
33
 
: Gtk::Dialog(cobject)
 
33
: Gtk::Dialog(cobject),
 
34
  m_box_title(0),
 
35
  m_entry_title(0),
 
36
  m_text_view(0)
34
37
{
 
38
  refGlade->get_widget("hbox_title",  m_box_title);
35
39
  refGlade->get_widget("entry_title",  m_entry_title);
36
40
  refGlade->get_widget("textview_text",  m_text_view);
37
41
 
46
50
{
47
51
}
48
52
 
49
 
void Dialog_TextObject::set_textobject(const sharedptr<const LayoutItem_Text>& textobject, const Glib::ustring& table_name)
 
53
void Dialog_TextObject::set_textobject(const sharedptr<const LayoutItem_Text>& textobject, const Glib::ustring& table_name, bool show_title)
50
54
{
51
55
  //set_blocked();
52
56
 
56
60
  m_entry_title->set_text(textobject->get_title());
57
61
  m_text_view->get_buffer()->set_text( textobject->get_text() );
58
62
 
 
63
  if(show_title)
 
64
    m_box_title->show();
 
65
  else
 
66
    m_box_title->hide();
 
67
 
59
68
  //set_blocked(false);
60
69
 
61
70
  //Dialog_Properties::set_modified(false);
65
74
{
66
75
  sharedptr<LayoutItem_Text> result = glom_sharedptr_clone(m_textobject); //Start with the old details, to preserve anything that is not in our UI.
67
76
 
68
 
  result->set_title(m_entry_title->get_text());
69
 
  result->set_text( m_text_view->get_buffer()->get_text() );
 
77
  get_textobject(result);
70
78
 
71
79
  return result;
72
80
}
73
81
 
 
82
void Dialog_TextObject::get_textobject(sharedptr<LayoutItem_Text>& textobject) const
 
83
{
 
84
  textobject->set_title(m_entry_title->get_text());
 
85
  textobject->set_text( m_text_view->get_buffer()->get_text() );
 
86
}
 
87
 
74
88
} //namespace Glom
75
89
 
76
90