Logo Search packages:      
Sourcecode: wallpaper-tray version File versions  Download package

SearchDialog::SearchDialog ( BaseObjectType *  _pWindow,
const Glib::RefPtr< Gnome::Glade::Xml > &  _pGlade 
)

Create a new search dialog.

<SearchDialog::SearchDialog>

Parameters:
_pWindow A pointer required to allow creation of this dialog from glade xml.
_pGlade A reference to a pointer required to allow creation of this dialog from glade xml.
Date:
12-11-2006 GAF Written

Definition at line 29 of file SearchDialog.cc.

References OnButtonApplyClick(), OnButtonCancelClick(), and OnButtonNextClick().

  :
      Gtk::Dialog(_pWindow),
      m_pGlade(_pGlade)
{
      // set up the gconf client
      m_pGconfClient = Gnome::Conf::Client::get_default_client();

      // grab the main druid
      m_pGlade->get_widget("druid_search", m_pDruid);

      if(m_pDruid != NULL)
      {
            // hook up the cancel and finish buttons
            m_pDruid->signal_cancel().connect(sigc::mem_fun(*this, &SearchDialog::OnButtonCancelClick));
      }// end if

      // grab the finish druid page
      m_pGlade->get_widget("druidpagefinish", m_pDruidPageFinish);
      if(m_pDruidPageFinish != NULL)
      {
            // hook up the cancel and finish buttons  
            m_pDruidPageFinish->signal_finish().connect(sigc::mem_fun(*this, &SearchDialog::OnButtonApplyClick));
      }// end if

      // grab the finish druid page
      m_pGlade->get_widget("druidpagestandard_search_string", m_pDruidPageStdSearchString);
      if(m_pDruidPageStdSearchString != NULL)
      {
            // hook up the cancel and finish buttons  
            m_pDruidPageStdSearchString->signal_next().connect(sigc::mem_fun(*this, &SearchDialog::OnButtonNextClick));
      }// end if

      // grab the finish druid page
      m_pGlade->get_widget("druidpagestart", m_pDruidPageStdStart);

      // grab the tree view
      m_pGlade->get_widget("treeview_results", m_pTreeView);

      if(m_pTreeView == NULL)
      {
            throw std::runtime_error("SearchDialog::SearchDialog() : failed to get widget from glade");
      }// end if

      // set up the list store and model etc
      m_pListStore = Gtk::ListStore::create(m_Model);

      m_pTreeView->set_model(m_pListStore);
      m_pTreeView->append_column(_("Directories"), m_Model.m_FilePath);

      m_pGlade->get_widget("radiobutton_select", m_pRadioButtonSelect);
      m_pGlade->get_widget("radiobutton_delete", m_pRadioButtonDelete);
      m_pGlade->get_widget("entry_search_text", m_pEntrySearchString);

      // give the window an icon
      set_icon_from_file(GNOMEICONDIR"/wp_tray-applet.png");

      show_all_children();
}// end SearchDialog::SearchDialog


Generated by  Doxygen 1.6.0   Back to index