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