Репозитории ALT
S: | 0.58-alt29 |
5.1: | 0.57.2-alt3.M51.1 |
4.1: | 0.57.2-alt2.5.M41.1 |
4.0: | 0.57.2-alt2.5.M40.1 |
3.0: | 0.56-alt0.3 |
Группа :: Система/Настройка/Пакеты
Пакет: synaptic
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: synaptic-0.58-rsources-extraspaces.patch
Скачать
Скачать
--- synaptic.orig/common/rsources.cc
+++ synaptic/common/rsources.cc
@@ -326,12 +326,13 @@ bool SourcesList::UpdateSources()
S += "[" + (*it)->VendorID + "] ";
S += (*it)->URI + " ";
- S += (*it)->Dist + " ";
+ S += (*it)->Dist;
for (unsigned int J = 0; J < (*it)->NumSections; J++)
- S += (*it)->Sections[J] + " ";
+ S += " " + (*it)->Sections[J];
}
- ofs << S << endl;
+ if ( ! S.empty() ) // we needn't to write empty line ...
+ ofs << S << endl;
}
ofs.close();
}
--- synaptic.orig/gtk/rgrepositorywin.cc
+++ synaptic/gtk/rgrepositorywin.cc
@@ -674,11 +674,15 @@ void RGRepositoryEditor::SelectionChanged(GtkTreeSelection *selection,
gtk_entry_set_text(GTK_ENTRY(me->_entryURI), utf8(rec->URI.c_str()));
gtk_entry_set_text(GTK_ENTRY(me->_entryDist), utf8(rec->Dist.c_str()));
gtk_entry_set_text(GTK_ENTRY(me->_entrySect), "");
-
- for (unsigned int I = 0; I < rec->NumSections; I++) {
- gtk_entry_append_text(GTK_ENTRY(me->_entrySect),
- utf8(rec->Sections[I].c_str()));
- gtk_entry_append_text(GTK_ENTRY(me->_entrySect), " ");
+
+ if (rec->NumSections > 0) { // if (... == 0) do nothing ...
+ for (unsigned int I = 0; I < (rec->NumSections - 1); I++) {
+ gtk_entry_append_text(GTK_ENTRY(me->_entrySect),
+ utf8(rec->Sections[I].c_str()));
+ gtk_entry_append_text(GTK_ENTRY(me->_entrySect), " ");
+ }
+ gtk_entry_append_text(GTK_ENTRY(me->_entrySect),
+ utf8(rec->Sections[rec->NumSections - 1].c_str()));
}
} else {
//cout << "no selection" << endl;