summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-12-14 21:24:28 +0000
committerJason Woodward2008-12-14 21:24:28 +0000
commit84fa4b800cb229a691a6811935af79dfd09e4728 (patch)
tree6e4bc22d7205a554cdf28355b4c1494cd5257996
parentc86089e2555fcc5afb5428bc78f0a959c361b56f (diff)
downloadgslapt-84fa4b800cb229a691a6811935af79dfd09e4728.tar.gz
reordered priorities for default < official < preferred < custom. reworked update that fixed show upgradeable so that it does not exclude those lesser packages (instead of continue set is_an_upgrade to false).
-rw-r--r--gslapt.glade2
-rw-r--r--src/callbacks.c28
-rw-r--r--src/interface.c2
3 files changed, 17 insertions, 15 deletions
diff --git a/gslapt.glade b/gslapt.glade
index 5f3c316..ef9966d 100644
--- a/gslapt.glade
+++ b/gslapt.glade
@@ -5310,8 +5310,8 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="items" translatable="yes">Default
-Preferred
Official
+Preferred
Custom</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
diff --git a/src/callbacks.c b/src/callbacks.c
index 9809743..59ae8f6 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -464,20 +464,22 @@ void build_package_treeviewlist (GtkWidget *treeview)
slapt_pkg_info_t *installed_pkg = NULL, *newer_available_pkg = NULL;
gchar *location = NULL;
- /* we need to see if there is another available package
- that is newer than this one */
- if ( (newer_available_pkg = slapt_get_newest_pkg(all, all->pkgs[i]->name)) != NULL) {
- if ( slapt_cmp_pkgs(all->pkgs[i], newer_available_pkg) < 0 )
- continue;
- }
-
installed_pkg = slapt_get_newest_pkg(installed,all->pkgs[i]->name);
if (installed_pkg != NULL) {
int cmp = slapt_cmp_pkgs(all->pkgs[i], installed_pkg);
- if (cmp == 0)
+ if (cmp == 0) {
is_inst = TRUE;
- else if (cmp > 0)
+ } else if (cmp > 0) {
is_an_upgrade = TRUE;
+
+ /* we need to see if there is another available package
+ that is newer than this one */
+ if ( (newer_available_pkg = slapt_get_newest_pkg(all, all->pkgs[i]->name)) != NULL) {
+ if ( slapt_cmp_pkgs(all->pkgs[i], newer_available_pkg) < 0 )
+ is_an_upgrade = FALSE;
+ }
+
+ }
}
if (trans->exclude_pkgs->pkg_count > 0 &&
@@ -3874,9 +3876,9 @@ static SLAPT_PRIORITY_T convert_gslapt_priority_to_slapt_priority(gint p)
{
switch (p) {
case 1:
- return SLAPT_PRIORITY_PREFERRED;
- case 2:
return SLAPT_PRIORITY_OFFICIAL;
+ case 2:
+ return SLAPT_PRIORITY_PREFERRED;
case 3:
return SLAPT_PRIORITY_CUSTOM;
case 0:
@@ -3890,9 +3892,9 @@ static gint convert_slapt_priority_to_gslapt_priority(SLAPT_PRIORITY_T p)
switch (p) {
case SLAPT_PRIORITY_DEFAULT:
return 0;
- case SLAPT_PRIORITY_PREFERRED:
- return 1;
case SLAPT_PRIORITY_OFFICIAL:
+ return 1;
+ case SLAPT_PRIORITY_PREFERRED:
return 2;
case SLAPT_PRIORITY_CUSTOM:
return 3;
diff --git a/src/interface.c b/src/interface.c
index 2b204e1..cb6589d 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2977,8 +2977,8 @@ create_source_window (void)
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
gtk_container_set_border_width (GTK_CONTAINER (source_priority), 6);
gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Default"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Preferred"));
gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Official"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Preferred"));
gtk_combo_box_append_text (GTK_COMBO_BOX (source_priority), _("Custom"));
hbuttonbox4 = gtk_hbutton_box_new ();