Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first-day-of-week detexion in dense calendar (Upcoming Transactions) #1907

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions gnucash/gnome-utils/gnc-dense-cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,30 +496,7 @@ gnc_dense_cal_init(GncDenseCal *dcal)
dcal->initialized = TRUE;


dcal->week_starts_monday = 0;
{
gchar **parts;
const char *week_start_str;

/* Use this renaming macro to avoid extraction of the message
string into the gnucash.pot file when calling xgettext. */
#define dgettext_noextract dgettext
/* Translators: This string must not show up in gnucash.pot as
it is looked up in the "gtk20" translation domain
instead. */
week_start_str = dgettext_noextract("gtk20", "calendar:week_start:0");
#undef dgettext_noextract

parts = g_strsplit(week_start_str, ":", 3);
if (parts[0] != NULL
&& parts[1] != NULL
&& parts[2] != NULL)
{
if (strcmp("1", parts[2]) == 0)
dcal->week_starts_monday = 1;
}
g_strfreev(parts);
}
dcal->week_starts_monday = gnc_start_of_week() == 2;

gtk_widget_show_all(GTK_WIDGET(dcal));
}
Expand Down
Loading