paperbox r228 - in trunk: . src
- From: markoa svn gnome org
- To: svn-commits-list gnome org
- Subject: paperbox r228 - in trunk: . src
- Date: Tue, 25 Nov 2008 10:45:00 +0000 (UTC)
Author: markoa
Date: Tue Nov 25 10:45:00 2008
New Revision: 228
URL: http://svn.gnome.org/viewvc/paperbox?rev=228&view=rev
Log:
Made doc_az_compare aware of empty subjects
Modified:
trunk/ChangeLog
trunk/src/browser.cc
Modified: trunk/src/browser.cc
==============================================================================
--- trunk/src/browser.cc (original)
+++ trunk/src/browser.cc Tue Nov 25 10:45:00 2008
@@ -64,7 +64,21 @@
operator()(const shared_ptr<Document>& lhs,
const shared_ptr<Document>& rhs) const
{
- return cmp_nocase(lhs->get_subject(), rhs->get_subject()) == -1;
+ Glib::ustring title1, title2;
+
+ if (! lhs->get_subject().empty()) {
+ title1 = lhs->get_subject();
+ } else {
+ title1 = lhs->get_file_name();
+ }
+
+ if (! rhs->get_subject().empty()) {
+ title2 = rhs->get_subject();
+ } else {
+ title2 = rhs->get_file_name();
+ }
+
+ return cmp_nocase(title1, title2) == -1;
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]