1 /* IconZZzzzzzzzzz */ 2 3 #include <gtkmm/stockitem.h> 4 #include <gtkmm/icontheme.h> 5 6 #include "common.hpp" 7 #include "icon.hpp" 8 9 Gtk::StockID Gobby::IconManager::STOCK_USERLIST("gobby-user-list"); 10 Gtk::StockID Gobby::IconManager::STOCK_DOCLIST("gobby-document-list"); 11 Gtk::StockID Gobby::IconManager::STOCK_CHAT("gobby-chat"); 12 IconManager()13Gobby::IconManager::IconManager(): 14 m_icon_factory(Gtk::IconFactory::create() ) 15 { 16 Gtk::IconTheme::get_default()->append_search_path(ICONS_DIR); 17 18 Gtk::IconSource userlist_source; 19 userlist_source.set_icon_name("user-list"); 20 m_is_userlist.add_source(userlist_source); 21 Gtk::StockItem userlist_item(STOCK_USERLIST, _("User list") ); 22 m_icon_factory->add(STOCK_USERLIST, m_is_userlist); 23 24 Gtk::IconSource doclist_source; 25 doclist_source.set_icon_name("document-list"); 26 m_is_doclist.add_source(doclist_source); 27 Gtk::StockItem doclist_item(STOCK_DOCLIST, _("Document list") ); 28 m_icon_factory->add(STOCK_DOCLIST, m_is_doclist); 29 30 Gtk::IconSource chat_source; 31 chat_source.set_icon_name("chat"); 32 m_is_chat.add_source(chat_source); 33 Gtk::StockItem chat_item(STOCK_CHAT, _("Chat") ); 34 m_icon_factory->add(STOCK_CHAT, m_is_chat); 35 36 m_icon_factory->add_default(); 37 } 38 39