libyui-gtk-pkg  2.42.9
 All Classes
ygtkpkglanguageview.cc
1 /********************************************************************
2  * YaST2-GTK - http://en.opensuse.org/YaST2-GTK *
3  ********************************************************************/
4 /* Textdomain "yast2-gtk" */
5 /* YGtkPkgLanguageView, language list implementation */
6 // check the header file for information about this widget
7 
8 #include "YGi18n.h"
9 #include "config.h"
10 #include "ygtkpkglanguageview.h"
11 #include <gtk/gtk.h>
12 
13 YGtkPkgLanguageView::YGtkPkgLanguageView()
14 : YGtkPkgListView (true, Ypp::List::NAME_SORT, false, true)
15 {
16  addCheckColumn (INSTALLED_CHECK_PROP);
17  addTextColumn (NULL, NAME_SUMMARY_PROP, true, -1);
18 
19  Ypp::LangQuery query;
20  YGtkPkgListView::setList (query);
21 
22  YGtkPkgListView::setListener (this);
23 }
24 
25 GtkWidget *YGtkPkgLanguageView::getWidget()
26 { return YGtkPkgListView::getWidget(); }
27 
28 bool YGtkPkgLanguageView::writeQuery (Ypp::PoolQuery &query)
29 {
30  Ypp::List list (getSelected());
31  if (list.size() > 0) {
32  Ypp::Collection col (list.get (0));
33  query.addCriteria (new Ypp::FromCollectionMatch (col));
34  return true;
35  }
36  return false;
37 }
38 
39 void YGtkPkgLanguageView::selectionChanged()
40 { notify(); }
41