| 7 |
|
|
| 8 |
#include "config.h" |
#include "config.h" |
| 9 |
#include "MMISpouseToFamilyLink.hh" |
#include "MMISpouseToFamilyLink.hh" |
| 10 |
|
#include "OneSpouseToFamilyLink.hh" |
| 11 |
|
#include "OneSpouseToFamilyLinkHandler.hh" |
| 12 |
|
#include "MMIUnionFamilyNote.hh" |
| 13 |
#include <libgnome/libgnome.h> |
#include <libgnome/libgnome.h> |
| 14 |
#include "../string_utility/Converter.hh" |
#include "../string_utility/Converter.hh" |
| 15 |
|
|
| 18 |
{ |
{ |
| 19 |
} |
} |
| 20 |
|
|
| 21 |
OneSpouseToFamilyLink * MMISpouseToFamilyLink::addSpouseToFamilyLink(std::string const &union_date, |
OneFamilyLink * MMISpouseToFamilyLink::addFamilyLink(OneFamilyLinkHandler const &handler) |
|
std::string const &union_place, |
|
|
std::string const &husband, |
|
|
std::string const &wife, |
|
|
std::vector < std::string > const &children, |
|
|
SigC::Slot0<void> * slot_husband, |
|
|
SigC::Slot0<void> * slot_wife, |
|
|
std::vector< SigC::Slot0<void> * > slot_children) |
|
| 22 |
{ |
{ |
|
class OneSpouseToFamilyLink * OneSpouseToFamilyLink = manage(new class OneSpouseToFamilyLink(union_date, |
|
|
union_place, |
|
|
husband, |
|
|
wife, |
|
|
children, |
|
|
slot_husband, |
|
|
slot_wife, |
|
|
slot_children)); |
|
| 23 |
_cpt_family++; |
_cpt_family++; |
| 24 |
|
class OneSpouseToFamilyLink * OneSpouseToFamilyLink = manage(new class OneSpouseToFamilyLink(&handler)); |
| 25 |
|
class MMIUnionFamilyNote * MMIUnionFamilyNote = manage(new class MMIUnionFamilyNote()); |
| 26 |
Gtk::Label *_spouse_to_family_link1 = manage(new class Gtk::Label(_("Union ") + toString<int>(_cpt_family))); |
Gtk::Label *_spouse_to_family_link1 = manage(new class Gtk::Label(_("Union ") + toString<int>(_cpt_family))); |
| 27 |
_spouse_to_family_link1->set_alignment(0.5, 0.5); |
_spouse_to_family_link1->set_alignment(0.5, 0.5); |
| 28 |
_spouse_to_family_link1->set_padding(0, 0); |
_spouse_to_family_link1->set_padding(0, 0); |
| 29 |
Gtk::HBox *hbox25 = manage(new class Gtk::HBox(false, 0)); |
Gtk::HBox *hbox25 = manage(new class Gtk::HBox(false, 0)); |
| 30 |
hbox25->pack_start(*_spouse_to_family_link1); |
hbox25->pack_start(*_spouse_to_family_link1); |
|
class MMIUnionFamilyNote * MMIUnionFamilyNote = manage(new class MMIUnionFamilyNote()); |
|
| 31 |
hbox25->pack_start(*MMIUnionFamilyNote, false, true, 0); |
hbox25->pack_start(*MMIUnionFamilyNote, false, true, 0); |
| 32 |
hbox25->show_all(); |
hbox25->show_all(); |
| 33 |
_family_links->pages().push_back(Gtk::Notebook_Helpers::TabElem(*OneSpouseToFamilyLink, *hbox25)); |
_family_links->pages().push_back(Gtk::Notebook_Helpers::TabElem(*OneSpouseToFamilyLink, *hbox25)); |
| 34 |
OneSpouseToFamilyLink->MMIUnionFamilyNote = MMIUnionFamilyNote; |
OneSpouseToFamilyLink->setFamilyNote(*MMIUnionFamilyNote); |
| 35 |
return OneSpouseToFamilyLink; |
return OneSpouseToFamilyLink; |
| 36 |
} |
} |
| 37 |
|
|
| 38 |
void MMISpouseToFamilyLink::menu_add_activated(void) |
void MMISpouseToFamilyLink::menu_add_activated(void) |
| 39 |
{ |
{ |
| 40 |
std::vector < std::string > children; |
std::vector < std::string > children; |
| 41 |
std::vector< SigC::Slot0<void> * > slot_children; |
std::vector< OneFamilyLinkHandler::SlotHandler_t * > slots_children; |
| 42 |
addSpouseToFamilyLink("","","","",children,0,0,slot_children); |
OneSpouseToFamilyLinkHandler handler("","","","",children,0,0,slots_children); |
| 43 |
|
addFamilyLink(handler); |
| 44 |
MMIFamilyLink::menu_add_activated(); |
MMIFamilyLink::menu_add_activated(); |
| 45 |
return; |
return; |
| 46 |
} |
} |