Author: rpmcruz
Date: Fri Apr 23 09:57:24 2010
New Revision: 61835
URL: http://svn.opensuse.org/viewcvs/yast?rev=61835&view=rev
Log:
2010-04-22 Ricardo Cruz
* src/pkg/ygtkpkgdetailview.cc: reverted description
layout.
2010-04-22 Ricardo Cruz
* src/pkg/ygtkpkgdetailview.cc: show version numbers in
dependencies table.
* src/pkg/ygtkpkghistorydialog.cc: only mark as patches
those packages from the update server that were already
installed. Also, remove the auto mark when a patch.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/pkg/ygtkpkgdetailview.cc
trunk/gtk/src/pkg/ygtkpkghistorydialog.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=61835&r1=61834&r2=61835&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Fri Apr 23 09:57:24 2010
@@ -1,5 +1,19 @@
2010-04-22 Ricardo Cruz
+ * src/pkg/ygtkpkgdetailview.cc: reverted description
+ layout.
+
+2010-04-22 Ricardo Cruz
+
+ * src/pkg/ygtkpkgdetailview.cc: show version numbers in
+ dependencies table.
+
+ * src/pkg/ygtkpkghistorydialog.cc: only mark as patches
+ those packages from the update server that were already
+ installed. Also, remove the auto mark when a patch.
+
+2010-04-22 Ricardo Cruz
+
* src/pkg/yzyppwrapper.cc:bug fix: ups: just broke
is-installed flag for patterns.
Modified: trunk/gtk/src/pkg/ygtkpkgdetailview.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgdetailview.cc?rev=61835&r1=61834&r2=61835&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgdetailview.cc Fri Apr 23 09:57:24 2010
@@ -680,14 +680,13 @@
: DetailExpander (_("Dependencies"), false)
{
vbox = gtk_vbox_new (FALSE, 6);
- addLine ("", _("<b>Installed Version</b>"), _("<b>Candidate Version</b>"), -1);
setChild (vbox);
}
void clear()
{
GList *children = gtk_container_get_children (GTK_CONTAINER (vbox));
- for (GList *i = children->next; i; i = i->next)
+ for (GList *i = children; i; i = i->next)
gtk_container_remove (GTK_CONTAINER (vbox), (GtkWidget *) i->data);
g_list_free (children);
}
@@ -740,6 +739,13 @@
Ypp::Selectable sel = list.get (0);
clear();
+ std::string installed_str (_("<b>Installed Version</b>"));
+ std::string candidate_str (_("<b>Candidate Version</b>"));
+ if (sel.hasInstalledVersion())
+ installed_str += "\n" + sel.installed().number();
+ if (sel.hasCandidateVersion())
+ candidate_str += "\n" + sel.candidate().number();
+ addLine ("", installed_str, candidate_str, -1);
for (int dep = 0; dep < VersionDependencies::total(); dep++) {
std::string inst, cand;
if (sel.hasInstalledVersion())
@@ -1135,12 +1141,8 @@
{
DetailWidget *widget;
- GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
- widget = new DetailName();
- m_widgets.push_back (widget);
- gtk_box_pack_start (GTK_BOX (vbox), widget->getWidget(), FALSE, TRUE, 0);
-
GtkWidget *side_vbox = gtk_vbox_new (FALSE, 0);
+
widget = new VersionExpander();
m_widgets.push_back (widget);
gtk_box_pack_start (GTK_BOX (side_vbox), widget->getWidget(), FALSE, TRUE, 0);
@@ -1151,6 +1153,11 @@
}
GtkWidget *main_vbox = gtk_vbox_new (FALSE, 0);
+
+ widget = new DetailName();
+ m_widgets.push_back (widget);
+ gtk_box_pack_start (GTK_BOX (main_vbox), widget->getWidget(), FALSE, TRUE, 0);
+
widget = new DetailDescription();
m_widgets.push_back (widget);
gtk_box_pack_start (GTK_BOX (main_vbox), widget->getWidget(), FALSE, TRUE, 0);
@@ -1183,14 +1190,14 @@
gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), side_vbox, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
- g_signal_connect (G_OBJECT (vbox), "expose-event",
+ GtkWidget *child = hbox;
+ g_signal_connect (G_OBJECT (child), "expose-event",
G_CALLBACK (text_expose_cb), detail_description);
m_scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (m_scroll), vbox);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (m_scroll), child);
gtk_widget_show_all (m_scroll);
g_signal_connect (G_OBJECT (m_scroll), "realize",
Modified: trunk/gtk/src/pkg/ygtkpkghistorydialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkghistorydialog.cc?rev=61835&r1=61834&r2=61835&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkghistorydialog.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkghistorydialog.cc Fri Apr 23 09:57:24 2010
@@ -105,7 +105,7 @@
{
GtkTreeIter iter;
const char *icon = 0;
- std::string shortcut = name;
+ std::string shortcut (name);
if (action == _("install"))
icon = GTK_STOCK_ADD;
else if (action == _("upgrade"))
@@ -124,21 +124,24 @@
int xpad = 0; // autoReq ? 25 : 0;
const char *repo_icon = 0, *color = 0;
- if (!repositoryUrl.empty()) {
+ bool is_patch = false;
+ if (action == _("upgrade") && !repositoryUrl.empty()) {
+ // if 'upgrade' and from '*update*' server then mark as patch
repo_icon = getRepositoryStockIcon (repositoryUrl);
if (repositoryUrl.find ("update") != std::string::npos) {
//color = "red";
std::string tag;
tag.reserve (64);
- tag = "("; tag += _("patch"); tag += ")</span>";
- _name += " "; _name += tag;
+ tag = "<small>"; tag += _("patch"); tag += "</span></small>";
+ _name += " "; _name += tag;
+ is_patch = true;
}
}
- if (autoReq) {
+ if (autoReq && !is_patch) { // dependency
std::string tag;
tag.reserve (64);
- tag = "("; tag += _("auto"); tag += ")</span>";
- _name += " "; _name += tag;
+ tag = "<small>"; tag += _("auto"); tag += "</span></small>";
+ _name += " "; _name += tag;
}
gtk_list_store_append (store, &iter);
@@ -434,8 +437,7 @@
if (column == ygtk_tree_view_get_column (YGTK_TREE_VIEW (view), 2)) { // repository
char *name, *url;
- gtk_tree_model_get (model, &iter,
- LogListHandler::REPOSITORY_COLUMN, &name,
+ gtk_tree_model_get (model, &iter, LogListHandler::REPOSITORY_COLUMN, &name,
LogListHandler::REPOSITORY_URL_COLUMN, &url, -1);
if (name && *name) {
text = name;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org