~ubuntu-branches/ubuntu/vivid/xiphos/vivid-proposed

« back to all changes in this revision

Viewing changes to src/main/prayerlists.cc

  • Committer: Package Import Robot
  • Author(s): Dimitri John Ledkov
  • Date: 2014-07-12 17:08:46 UTC
  • mfrom: (17.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140712170846-1lcybpijz5fn72fg
Tags: 3.2.2+dfsg1-1
* New upstream release.
* Bump standards version.
* Switch uscan to sf.net redirector.
* Unpack waf in get-orig-source target.
* Bump to debhelper 9.
* Add uuid-dev build-dep.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Xiphos Bible Study Tool
3
3
 * prayerlists.cc - code to create several different prayer lists
4
4
 *
5
 
 * Copyright (C) 2008-2011 Xiphos Developer Team
 
5
 * Copyright (C) 2008-2014 Xiphos Developer Team
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify
8
8
 * it under the terms of the GNU General Public License as published by
69
69
        N_COLUMNS
70
70
};
71
71
 
72
 
static int pl_month_days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
73
 
static char *(pl_months[]) = {
74
 
    _("January"),
75
 
    _("February"),
76
 
    _("March"),
77
 
    _("April"),
78
 
    _("May"),
79
 
    _("June"),
80
 
    _("July"),
81
 
    _("August"),
82
 
    _("September"),
83
 
    _("October"),
84
 
    _("November"),
85
 
    _("December")
86
 
};
 
72
/* for constructing journals */
 
73
extern int month_day_counts[];
 
74
extern char *(month_names[]);
87
75
 
88
76
/*********************************    *************************************/
89
77
 
237
225
 
238
226
        // name selection dialog.
239
227
        info = gui_new_dialog();
240
 
        info->stock_icon = (gchar *)GTK_STOCK_DIALOG_QUESTION;
 
228
        info->stock_icon = (gchar *) 
 
229
#ifdef HAVE_GTK_310
 
230
                "dialog-question";
 
231
#else
 
232
                GTK_STOCK_DIALOG_QUESTION;
 
233
#endif  
241
234
        info->title = _("Prayer List/Journal");
242
235
        info->label_top = _("Name for new prayer list or journal");
243
236
        info->label1 = _("Name: ");
430
423
        {
431
424
                char monthnum[4], monthstring[32];
432
425
                snprintf(monthnum, 3, "%02d", month+1);
433
 
                snprintf(monthstring, 31, "<b>%s</b><br/>", _(pl_months[month]));
 
426
                snprintf(monthstring, 31, "<b>%s</b><br/>", _(month_names[month]));
434
427
 
435
428
                if (month == 0)
436
429
                        appendChild(treeKey, monthnum);
482
475
        {
483
476
                char monthnum[4], monthstring[32];
484
477
                snprintf(monthnum, 3, "%02d", month+1);
485
 
                snprintf(monthstring, 31, "<b>%s</b><br/>", _(pl_months[month]));
 
478
                snprintf(monthstring, 31, "<b>%s</b><br/>", _(month_names[month]));
486
479
 
487
480
                if (month == 0)
488
481
                        appendChild(treeKey, monthnum);
490
483
                        appendSibling(treeKey, monthnum);
491
484
                setEntryText(book, monthstring);
492
485
 
493
 
                for (int day = 0; day < pl_month_days[month]; ++day) {
 
486
                for (int day = 0; day < month_day_counts[month]; ++day) {
494
487
                        char daynum[4], monthday[32];
495
488
                        snprintf(daynum, 3, "%02d", day+1);
496
 
                        snprintf(monthday, 31, "<b>%s %d</b><br/>", _(pl_months[month]), day+1);
 
489
                        snprintf(monthday, 31, "<b>%s %d</b><br/>", _(month_names[month]), day+1);
497
490
 
498
491
                        if (day == 0)
499
492
                                appendChild(treeKey, daynum);