main_win.cc
changeset 151 72f1c33f89d4
parent 140 d300e3153ab1
child 154 65c1b103443d
equal deleted inserted replaced
40:f3d9e63d1f04 41:7700e43d8676
    24       2328, gui_icons_addlink);
    24       2328, gui_icons_addlink);
    25   Glib::RefPtr<Gdk::Pixbuf> p_delete_pixbuf = Gdk::Pixbuf::create_from_inline(
    25   Glib::RefPtr<Gdk::Pixbuf> p_delete_pixbuf = Gdk::Pixbuf::create_from_inline(
    26       2328, gui_icons_delete);
    26       2328, gui_icons_delete);
    27   Glib::RefPtr<Gdk::Pixbuf> p_editlink_pixbuf = Gdk::Pixbuf::create_from_inline(
    27   Glib::RefPtr<Gdk::Pixbuf> p_editlink_pixbuf = Gdk::Pixbuf::create_from_inline(
    28       2328, gui_icons_editlink);
    28       2328, gui_icons_editlink);
    29   Glib::RefPtr<Gdk::Pixbuf> p_editnode_pixbuf = Gdk::Pixbuf::create_from_inline(
       
    30       2328, gui_icons_editnode);
       
    31   Glib::RefPtr<Gdk::Pixbuf> p_newmap_pixbuf = Gdk::Pixbuf::create_from_inline(
    29   Glib::RefPtr<Gdk::Pixbuf> p_newmap_pixbuf = Gdk::Pixbuf::create_from_inline(
    32       2328, gui_icons_newmap);
    30       2328, gui_icons_newmap);
    33 
    31 
    34   Gtk::IconSource move_icon_source;
    32   Gtk::IconSource move_icon_source;
    35   move_icon_source.set_pixbuf(p_move_pixbuf);
    33   move_icon_source.set_pixbuf(p_move_pixbuf);
    58   Gtk::IconSource editlink_icon_source;
    56   Gtk::IconSource editlink_icon_source;
    59   editlink_icon_source.set_pixbuf(p_editlink_pixbuf);
    57   editlink_icon_source.set_pixbuf(p_editlink_pixbuf);
    60   Gtk::IconSet editlink_icon_set;
    58   Gtk::IconSet editlink_icon_set;
    61   editlink_icon_set.add_source(editlink_icon_source);
    59   editlink_icon_set.add_source(editlink_icon_source);
    62   p_icon_factory->add(Gtk::StockID("gd-editlink"), editlink_icon_set);
    60   p_icon_factory->add(Gtk::StockID("gd-editlink"), editlink_icon_set);
    63 
       
    64   Gtk::IconSource editnode_icon_source;
       
    65   editnode_icon_source.set_pixbuf(p_editnode_pixbuf);
       
    66   Gtk::IconSet editnode_icon_set;
       
    67   editnode_icon_set.add_source(editnode_icon_source);
       
    68   p_icon_factory->add(Gtk::StockID("gd-editnode"), editnode_icon_set);
       
    69 
    61 
    70   Gtk::IconSource newmap_icon_source;
    62   Gtk::IconSource newmap_icon_source;
    71   newmap_icon_source.set_pixbuf(p_newmap_pixbuf);
    63   newmap_icon_source.set_pixbuf(p_newmap_pixbuf);
    72   Gtk::IconSet newmap_icon_set;
    64   Gtk::IconSet newmap_icon_set;
    73   newmap_icon_set.add_source(newmap_icon_source);
    65   newmap_icon_set.add_source(newmap_icon_source);
   123   ag->add( Gtk::RadioAction::create(tool_group, "EraseItem", Gtk::StockID("gd-delete"), _("Delete")),
   115   ag->add( Gtk::RadioAction::create(tool_group, "EraseItem", Gtk::StockID("gd-delete"), _("Delete")),
   124       sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 3) );
   116       sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 3) );
   125 
   117 
   126   ag->add( Gtk::RadioAction::create(tool_group, "EditEdgeMap", Gtk::StockID("gd-editlink"), _("Edit edge map")),
   118   ag->add( Gtk::RadioAction::create(tool_group, "EditEdgeMap", Gtk::StockID("gd-editlink"), _("Edit edge map")),
   127       sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 4) );
   119       sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 4) );
   128   ag->add( Gtk::RadioAction::create(tool_group, "EditNodeMap", Gtk::StockID("gd-editnode"), _("Edit node map")),
       
   129       sigc::bind( sigc::mem_fun ( *this, &MainWin::changeEditorialTool ), 5) );
       
   130 
   120 
   131   ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
   121   ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
   132       sigc::mem_fun ( *this , &MainWin::createNewMapWin ) );
   122       sigc::mem_fun ( *this , &MainWin::createNewMapWin ) );
   133 
   123 
   134   uim=Gtk::UIManager::create();
   124   uim=Gtk::UIManager::create();
   178       "    <toolitem action='MoveItem' />"
   168       "    <toolitem action='MoveItem' />"
   179       "    <toolitem action='CreateNode' />"
   169       "    <toolitem action='CreateNode' />"
   180       "    <toolitem action='CreateEdge' />"
   170       "    <toolitem action='CreateEdge' />"
   181       "    <toolitem action='EraseItem' />"
   171       "    <toolitem action='EraseItem' />"
   182       "    <toolitem action='EditEdgeMap' />"
   172       "    <toolitem action='EditEdgeMap' />"
   183       "    <toolitem action='EditNodeMap' />"
       
   184       "    <separator />"
   173       "    <separator />"
   185       "    <toolitem action='AddMap' />"
   174       "    <toolitem action='AddMap' />"
   186       "  </toolbar>"
   175       "  </toolbar>"
   187       "</ui>";
   176       "</ui>";
   188 
   177