Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] r58710 - in /trunk/gtk: ChangeLog src/yzypptags.cc src/yzypptags.h src/yzyppwrapper.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Tue, 22 Sep 2009 14:05:15 -0000
  • Message-id: <E1Mq5zX-00027G-7l@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Tue Sep 22 16:05:14 2009
New Revision: 58710

URL: http://svn.opensuse.org/viewcvs/yast?rev=58710&view=rev
Log:
* src/yzypptags.h/cc: -qt PK groups was not caughting
documentation and productivity branches.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/yzypptags.cc
trunk/gtk/src/yzypptags.h
trunk/gtk/src/yzyppwrapper.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58710&r1=58709&r2=58710&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Tue Sep 22 16:05:14 2009
@@ -1,5 +1,10 @@
2009-09-22 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

+ * src/yzypptags.h/cc: -qt PK groups was not caughting
+ documentation and productivity branches.
+
+2009-09-22 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
* src/ygtkzyppview.h/cc: fix: make double-click working on
remove and undo tabs.


Modified: trunk/gtk/src/yzypptags.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzypptags.cc?rev=58710&r1=58709&r2=58710&view=diff
==============================================================================
--- trunk/gtk/src/yzypptags.cc (original)
+++ trunk/gtk/src/yzypptags.cc Tue Sep 22 16:05:14 2009
@@ -13,8 +13,8 @@
#include "YGi18n.h"
#define YUILogComponent "gtk-pkg"
#include <YUILog.h>
-#include <zypp/sat/LookupAttr.h>
#include "yzypptags.h"
+#include <string>

/**
* translations taken from packagekit
@@ -50,8 +50,8 @@
case PK_GROUP_ENUM_POWER_MANAGEMENT: return _( "Power Management"
);
case PK_GROUP_ENUM_COMMUNICATION: return _( "Communication"
);
case PK_GROUP_ENUM_NETWORK: return _( "Network"
);
- case PK_GROUP_ENUM_MAPS: return _( "Maps"
);
- case PK_GROUP_ENUM_REPOS: return _( "Software Sources"
);
+ case PK_GROUP_ENUM_DOCUMENTATION: return _(
"Documentation" );
+ case PK_GROUP_ENUM_UTILITIES: return _( "Utilities"
);
case PK_GROUP_ENUM_UNKNOWN: return _( "Unknown Group"
);
}
return _("Unknown Group");
@@ -89,8 +89,8 @@
case PK_GROUP_ENUM_POWER_MANAGEMENT: return(
"package_settings_power" );
case PK_GROUP_ENUM_COMMUNICATION: return( "yast-modem"
);
case PK_GROUP_ENUM_NETWORK: return( "package_network"
);
- case PK_GROUP_ENUM_MAPS: return( "package_main"
);
- case PK_GROUP_ENUM_REPOS: return( "package_main"
);
+ case PK_GROUP_ENUM_DOCUMENTATION: return(
"package_documentation" );
+ case PK_GROUP_ENUM_UTILITIES: return( "package_utilities"
);
case PK_GROUP_ENUM_UNKNOWN: return( "package_main"
);
}
return "";
@@ -100,8 +100,12 @@
YPkgGroupEnum
zypp_tag_convert (const std::string &groupu)
{
- std::string group = zypp::str::toLower(groupu);
+ std::string group (groupu); // lower-case
+ for (unsigned int i = 0; i < group.length(); i++)
+ if (group[i] >= 'A' && group[i] <= 'Z')
+ group[i] = group[i] - 'A' + 'a';

+ // yast2-qt:
if ( group.find( "amusements/teaching" ) != string::npos ) return
PK_GROUP_ENUM_EDUCATION;
if ( group.find( "amusements" ) != string::npos ) return
PK_GROUP_ENUM_GAMES;
if ( group.find( "development" ) != string::npos ) return
PK_GROUP_ENUM_PROGRAMMING;
@@ -128,6 +132,11 @@
if ( group.find( "system" ) != string::npos ) return
PK_GROUP_ENUM_SYSTEM;
if ( group.find( "scientific" ) != string::npos ) return
PK_GROUP_ENUM_EDUCATION;

+ // our own:
+ if ( group.find( "documentation" ) != string::npos ) return
PK_GROUP_ENUM_DOCUMENTATION;
+ if ( group.find( "games" ) != string::npos ) return
PK_GROUP_ENUM_GAMES;
+ if ( group.find( "productivity" ) != string::npos ) return
PK_GROUP_ENUM_UTILITIES;
+
return PK_GROUP_ENUM_UNKNOWN;
}


Modified: trunk/gtk/src/yzypptags.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzypptags.h?rev=58710&r1=58709&r2=58710&view=diff
==============================================================================
--- trunk/gtk/src/yzypptags.h (original)
+++ trunk/gtk/src/yzypptags.h Tue Sep 22 16:05:14 2009
@@ -34,8 +34,8 @@
PK_GROUP_ENUM_POWER_MANAGEMENT,
PK_GROUP_ENUM_COMMUNICATION,
PK_GROUP_ENUM_NETWORK,
- PK_GROUP_ENUM_MAPS,
- PK_GROUP_ENUM_REPOS,
+ PK_GROUP_ENUM_DOCUMENTATION,
+ PK_GROUP_ENUM_UTILITIES,
PK_GROUP_ENUM_UNKNOWN,
} YPkgGroupEnum;


Modified: trunk/gtk/src/yzyppwrapper.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzyppwrapper.cc?rev=58710&r1=58709&r2=58710&view=diff
==============================================================================
--- trunk/gtk/src/yzyppwrapper.cc (original)
+++ trunk/gtk/src/yzyppwrapper.cc Tue Sep 22 16:05:14 2009
@@ -559,6 +559,9 @@
text += br + "<b>" + _("Website:") +
"</b> <a href=\"" + url + "\">" + url + "</a>";
if (!license.empty())
text += br + "<b>" + _("License:") +
"</b> " + license;
+#if 0
+ text += br + "<b>" + _("Category:") + "</b> " +
package->group();
+#endif
#if 0 // show "Installed at:" and "Last build:" info
bool hasCandidate = m_sel->hasCandidateObj();
if (isInstalled()) {

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages