Author: rpmcruz
Date: Fri Oct 24 10:29:36 2008
New Revision: 52495
URL: http://svn.opensuse.org/viewcvs/yast?rev=52495&view=rev
Log:
* src/YGPackageSelector (ListView): shortcut: when row activated
(double-click or space) install the package.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGPackageSelector.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=52495&r1=52494&r2=52495&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Fri Oct 24 10:29:36 2008
@@ -1,3 +1,8 @@
+2008-10-24 Ricardo Cruz
+
+ * src/YGPackageSelector (ListView): shortcut: when row activated
+ (double-click or space) install the package.
+
2008-10-23 Ricardo Cruz
* src/yzyppwrapper.cc: bug fix 436948: recommended & suggested in
Modified: trunk/gtk/src/YGPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=52495&r1=52494&r2=52495&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Fri Oct 24 10:29:36 2008
@@ -442,6 +442,8 @@
gtk_widget_show (m_widget);
if (editable) {
+ g_signal_connect (G_OBJECT (m_widget), "row-activated",
+ G_CALLBACK (package_activated_cb), this);
g_signal_connect (G_OBJECT (m_widget), "popup-menu",
G_CALLBACK (popup_key_cb), this);
g_signal_connect (G_OBJECT (m_widget), "button-press-event",
@@ -484,6 +486,14 @@
static void packages_selected_cb (GtkTreeSelection *selection, View *pThis)
{ pThis->signalSelected(); }
+ static void package_activated_cb (GtkTreeView *view, GtkTreePath *path,
+ GtkTreeViewColumn *column, View *pThis)
+ {
+ PkgList packages = pThis->getSelected();
+ if (packages.notInstalled() || packages.upgradable())
+ packages.install();
+ }
+
static gboolean popup_button_cb (GtkWidget *widget, GdkEventButton *event, View *pThis)
{
// workaround (based on gedit): we want the tree view to receive this press in order
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org