Commit f6ba8920 authored by Og B. Maciel's avatar Og B. Maciel

Added new DatePicker widget and replaced calendar with it; updated the...

Added new DatePicker widget and replaced calendar with it; updated the translation catalog. More work is required to make the add/edit dialog fully functional.

svn path=/trunk/; revision=676
parent 2926f2eb
2008-11-16 Og Maciel <ogmaciel@gnome.org>
* src/gui/adddialog.py: Use new DatePicker widget and get rid of gtk.Calendar.
* src/gui/widgets/datepicker.py: New widget that lets you choose a date from a dropdown calendar.
* src/gui/widgets/Makefile.am: Added datepicker.py.
* src/gui/maindialog.py:
* po/pt_BR.po: Updated the catalog.
* po/POTFILES.in: Added datepicker.py.
* po/billreminder.pot: Updated the catalog.
2008-10-23 Og Maciel <ogmaciel@gnome.org>
* src/gui/aboutdialog.py: Use gnomevfs for url_show method.
......
......@@ -20,7 +20,7 @@ src/gui/adddialog.py
src/gui/categoriesdialog.py
src/gui/maindialog.py
src/gui/prefdialog.py
src/gui/widgets/calendarwidget.py
src/gui/widgets/datepicker.py
src/gui/widgets/datebutton.py
src/gui/widgets/genericlistview.py
src/gui/widgets/statusbar.py
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-05 17:31-0400\n"
"POT-Creation-Date: 2008-11-16 19:32-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -211,8 +211,8 @@ msgid "The bill %s is due."
msgstr ""
#. Button Title
#: ../src/daemon/alarm.py:128 ../src/gui/maindialog.py:314
#: ../src/gui/maindialog.py:347 ../src/lib/utils.py:135
#: ../src/daemon/alarm.py:128 ../src/gui/maindialog.py:298
#: ../src/gui/maindialog.py:331 ../src/lib/utils.py:135
msgid "Mark as paid"
msgstr ""
......@@ -220,28 +220,28 @@ msgstr ""
msgid "Edit"
msgstr ""
#: ../src/daemon/main.py:118
#: ../src/daemon/main.py:85
#, python-format
msgid "Lock File found: You have another instance running. (pid=%d)"
msgstr ""
#: ../src/daemon/main.py:123
#: ../src/daemon/main.py:90
msgid "Lock File found: Possibly the program was exited unexpectedly."
msgstr ""
#: ../src/daemon/main.py:126
#: ../src/daemon/main.py:93
msgid "Removing Lock File..."
msgstr ""
#: ../src/daemon/main.py:128
#: ../src/daemon/main.py:95
msgid "Successfully."
msgstr ""
#: ../src/daemon/main.py:130
#: ../src/daemon/main.py:97
msgid "Failed."
msgstr ""
#: ../src/daemon/main.py:134
#: ../src/daemon/main.py:101
msgid "BillReminder Notifier is already running."
msgstr ""
......@@ -253,72 +253,82 @@ msgstr ""
msgid "BillReminder Website"
msgstr ""
#: ../src/gui/adddialog.py:96
msgid "<b>_Due Date:</b>"
msgstr ""
#: ../src/gui/adddialog.py:104
#: ../src/gui/adddialog.py:95
msgid "<b>_Repeat:</b>"
msgstr ""
#: ../src/gui/adddialog.py:108
#: ../src/gui/adddialog.py:99
msgid "How many times to repeat this bill."
msgstr ""
#: ../src/gui/adddialog.py:141
#: ../src/gui/adddialog.py:125
msgid "<b>_Payee:</b>"
msgstr ""
#: ../src/gui/adddialog.py:144
#: ../src/gui/adddialog.py:128
msgid "<b>_Amount:</b>"
msgstr ""
#: ../src/gui/adddialog.py:147
#: ../src/gui/adddialog.py:131
msgid "<b>_Category:</b>"
msgstr ""
#: ../src/gui/adddialog.py:150
#: ../src/gui/adddialog.py:134
msgid "<b>_Notes:</b>"
msgstr ""
#: ../src/gui/adddialog.py:153
#: ../src/gui/adddialog.py:137
msgid "<b>A_larm:</b>"
msgstr ""
#: ../src/gui/adddialog.py:179
#: ../src/gui/adddialog.py:163
msgid "Manage Categories"
msgstr ""
#: ../src/gui/adddialog.py:202 ../src/gui/widgets/datebutton.py:40
#: ../src/gui/adddialog.py:187 ../src/gui/widgets/datebutton.py:40
msgid "Select Date and Time"
msgstr ""
#: ../src/gui/adddialog.py:191
msgid "<b>Due Date:</b>"
msgstr ""
#. TRANSLATORS: This is the end date for repeating bills.
#: ../src/gui/adddialog.py:195
msgid "<b>End:</b>"
msgstr ""
#. # Expander
#: ../src/gui/adddialog.py:229
msgid "<b>Optional Fields:</b>"
msgstr ""
#. TRANSLATORS: No date selected
#: ../src/gui/adddialog.py:336 ../src/gui/adddialog.py:360
#: ../src/gui/maindialog.py:295 ../src/gui/widgets/datebutton.py:18
#: ../src/gui/adddialog.py:345 ../src/gui/adddialog.py:369
#: ../src/gui/maindialog.py:279 ../src/gui/widgets/datebutton.py:18
#: ../src/gui/widgets/datebutton.py:26
msgid "None"
msgstr ""
#: ../src/gui/adddialog.py:342 ../src/gui/categoriesdialog.py:48
#: ../src/gui/adddialog.py:351 ../src/gui/categoriesdialog.py:48
msgid "New Category"
msgstr ""
#: ../src/gui/adddialog.py:477
#: ../src/gui/adddialog.py:486
#, python-format
msgid "\"%s\" and \"%s\" are required fields."
msgstr ""
#: ../src/gui/adddialog.py:478 ../src/gui/adddialog.py:482
#: ../src/gui/adddialog.py:487 ../src/gui/adddialog.py:491
#: ../src/gui/widgets/viewbill.py:89
msgid "Payee"
msgstr ""
#: ../src/gui/adddialog.py:478 ../src/gui/widgets/viewbill.py:93
#: ../src/gui/adddialog.py:487 ../src/gui/widgets/viewbill.py:93
msgid "Amount"
msgstr ""
#: ../src/gui/adddialog.py:482
#: ../src/gui/adddialog.py:491
#, python-format
msgid "\"%s\" is required field."
msgstr ""
......@@ -358,119 +368,119 @@ msgid_plural "There are %d more bills in this category."
msgstr[0] ""
msgstr[1] ""
#: ../src/gui/categoriesdialog.py:248 ../src/gui/maindialog.py:581
#: ../src/gui/categoriesdialog.py:248 ../src/gui/maindialog.py:564
msgid "Confirmation"
msgstr ""
#: ../src/gui/maindialog.py:307
#: ../src/gui/maindialog.py:291
msgid "New"
msgstr ""
#. Dialog Title
#: ../src/gui/maindialog.py:307 ../src/gui/maindialog.py:343
#: ../src/gui/maindialog.py:291 ../src/gui/maindialog.py:327
#: ../src/lib/dialogs.py:51
msgid "Add a new bill"
msgstr ""
#. Dialog Title
#: ../src/gui/maindialog.py:309 ../src/gui/maindialog.py:344
#: ../src/gui/maindialog.py:293 ../src/gui/maindialog.py:328
#: ../src/lib/dialogs.py:62
msgid "Edit a bill"
msgstr ""
#: ../src/gui/maindialog.py:311 ../src/gui/maindialog.py:345
#: ../src/gui/maindialog.py:295 ../src/gui/maindialog.py:329
msgid "Delete selected bill"
msgstr ""
#: ../src/gui/maindialog.py:314 ../src/gui/widgets/viewbill.py:97
#: ../src/gui/maindialog.py:298 ../src/gui/widgets/viewbill.py:97
msgid "Paid"
msgstr ""
#: ../src/gui/maindialog.py:317
#: ../src/gui/maindialog.py:301
msgid "Not Paid"
msgstr ""
#: ../src/gui/maindialog.py:317 ../src/gui/maindialog.py:348
#: ../src/gui/maindialog.py:301 ../src/gui/maindialog.py:332
msgid "Mark as not paid"
msgstr ""
#: ../src/gui/maindialog.py:342
#: ../src/gui/maindialog.py:326
msgid "_File"
msgstr ""
#: ../src/gui/maindialog.py:343 ../src/gui/maindialog.py:539
#: ../src/gui/maindialog.py:327 ../src/gui/maindialog.py:522
msgid "_Add New"
msgstr ""
#: ../src/gui/maindialog.py:346
#: ../src/gui/maindialog.py:330
msgid "_Edit"
msgstr ""
#: ../src/gui/maindialog.py:347 ../src/gui/maindialog.py:549
#: ../src/gui/maindialog.py:331 ../src/gui/maindialog.py:532
msgid "_Paid"
msgstr ""
#: ../src/gui/maindialog.py:348
#: ../src/gui/maindialog.py:332
msgid "_Not Paid"
msgstr ""
#: ../src/gui/maindialog.py:349
#: ../src/gui/maindialog.py:333
msgid "Edit preferences"
msgstr ""
#: ../src/gui/maindialog.py:350
#: ../src/gui/maindialog.py:334
msgid "Quit the Program"
msgstr ""
#: ../src/gui/maindialog.py:351
#: ../src/gui/maindialog.py:335
msgid "_View"
msgstr ""
#: ../src/gui/maindialog.py:352
#: ../src/gui/maindialog.py:336
msgid "_Help"
msgstr ""
#: ../src/gui/maindialog.py:353
#: ../src/gui/maindialog.py:337
msgid "About the application"
msgstr ""
#: ../src/gui/maindialog.py:363
#: ../src/gui/maindialog.py:347
msgid "_Show Toolbar"
msgstr ""
#: ../src/gui/maindialog.py:363
#: ../src/gui/maindialog.py:347
msgid "Show the toolbar"
msgstr ""
#: ../src/gui/maindialog.py:367
#: ../src/gui/maindialog.py:351
msgid "_Not Paid Only"
msgstr ""
#: ../src/gui/maindialog.py:367
#: ../src/gui/maindialog.py:351
msgid "Display all unpaid bills only"
msgstr ""
#: ../src/gui/maindialog.py:368
#: ../src/gui/maindialog.py:352
msgid "_Paid Only"
msgstr ""
#: ../src/gui/maindialog.py:368
#: ../src/gui/maindialog.py:352
msgid "Display all paid bills only"
msgstr ""
#: ../src/gui/maindialog.py:369
#: ../src/gui/maindialog.py:353
msgid "_All Bills"
msgstr ""
#: ../src/gui/maindialog.py:369
#: ../src/gui/maindialog.py:353
msgid "Display all bills"
msgstr ""
#: ../src/gui/maindialog.py:552
#: ../src/gui/maindialog.py:535
msgid "Not _Paid"
msgstr ""
#: ../src/gui/maindialog.py:579
#: ../src/gui/maindialog.py:562
#, python-format
msgid "Do you really want to delete \"%s\"?"
msgstr ""
......@@ -538,12 +548,10 @@ msgstr ""
msgid "<b>Note:</b> BillReminder Notifier is now running."
msgstr ""
#: ../src/gui/widgets/calendarwidget.py:55
msgid "<b>_Monthly Report:</b>"
msgstr ""
#: ../src/gui/widgets/calendarwidget.py:62
msgid "<b>_Year:</b>"
#. Label to display the date selected
#. TRANSLATORS: This is the date that is selected from the calendar. Try to keep it small.
#: ../src/gui/widgets/datepicker.py:40 ../src/gui/widgets/datepicker.py:64
msgid "%m/%d/%Y"
msgstr ""
#: ../src/gui/widgets/datebutton.py:32 ../src/gui/widgets/datebutton.py:65
......
......@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: billreminder\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-05 17:31-0400\n"
"POT-Creation-Date: 2008-11-16 19:32-0500\n"
"PO-Revision-Date: 2008-10-05 18:00-0300\n"
"Last-Translator: Kurt Kraut <translations@kurtkraut.net>\n"
"Language-Team: Brazilian Portuguese <gnome-l10n-br@listas.cipsga.org.br>\n"
......@@ -216,8 +216,8 @@ msgid "The bill %s is due."
msgstr "A conta %s está vencida."
#. Button Title
#: ../src/daemon/alarm.py:128 ../src/gui/maindialog.py:314
#: ../src/gui/maindialog.py:347 ../src/lib/utils.py:135
#: ../src/daemon/alarm.py:128 ../src/gui/maindialog.py:298
#: ../src/gui/maindialog.py:331 ../src/lib/utils.py:135
msgid "Mark as paid"
msgstr "Marca como paga"
......@@ -225,32 +225,32 @@ msgstr "Marca como paga"
msgid "Edit"
msgstr "Editar"
#: ../src/daemon/main.py:118
#: ../src/daemon/main.py:85
#, python-format
msgid "Lock File found: You have another instance running. (pid=%d)"
msgstr ""
"Arquivo de bloqueio localizado: Você tem uma outra instância executando. "
"(pid=%d)"
#: ../src/daemon/main.py:123
#: ../src/daemon/main.py:90
msgid "Lock File found: Possibly the program was exited unexpectedly."
msgstr ""
"Arquivo de bloqueio localizado: Possivelmente o programa saiu "
"inesperadamente."
#: ../src/daemon/main.py:126
#: ../src/daemon/main.py:93
msgid "Removing Lock File..."
msgstr "Removendo arquivo de bloqueio."
#: ../src/daemon/main.py:128
#: ../src/daemon/main.py:95
msgid "Successfully."
msgstr "Com sucesso."
#: ../src/daemon/main.py:130
#: ../src/daemon/main.py:97
msgid "Failed."
msgstr "Falhou."
#: ../src/daemon/main.py:134
#: ../src/daemon/main.py:101
msgid "BillReminder Notifier is already running."
msgstr "Notificador do BillReminder já está sendo executado."
......@@ -268,72 +268,83 @@ msgstr ""
msgid "BillReminder Website"
msgstr "Website do BillReminder"
#: ../src/gui/adddialog.py:96
msgid "<b>_Due Date:</b>"
msgstr "<b>_Data de vencimento:</b>"
#: ../src/gui/adddialog.py:104
#: ../src/gui/adddialog.py:95
msgid "<b>_Repeat:</b>"
msgstr "<b>_Repetir:</b>"
#: ../src/gui/adddialog.py:108
#: ../src/gui/adddialog.py:99
msgid "How many times to repeat this bill."
msgstr "Quantas vezes repetir esta conta."
#: ../src/gui/adddialog.py:141
#: ../src/gui/adddialog.py:125
msgid "<b>_Payee:</b>"
msgstr "<b>_Titular:</b>"
#: ../src/gui/adddialog.py:144
#: ../src/gui/adddialog.py:128
msgid "<b>_Amount:</b>"
msgstr "<b>V_alor:</b>"
#: ../src/gui/adddialog.py:147
#: ../src/gui/adddialog.py:131
msgid "<b>_Category:</b>"
msgstr "<b>_Categoria:</b>"
#: ../src/gui/adddialog.py:150
#: ../src/gui/adddialog.py:134
msgid "<b>_Notes:</b>"
msgstr "<b>A_notações:</b>"
#: ../src/gui/adddialog.py:153
#: ../src/gui/adddialog.py:137
msgid "<b>A_larm:</b>"
msgstr "<b>A_larme:</b>"
#: ../src/gui/adddialog.py:179
#: ../src/gui/adddialog.py:163
msgid "Manage Categories"
msgstr "Gerencia as categorias"
#: ../src/gui/adddialog.py:202 ../src/gui/widgets/datebutton.py:40
#: ../src/gui/adddialog.py:187 ../src/gui/widgets/datebutton.py:40
msgid "Select Date and Time"
msgstr "Selecione a data e hora"
#: ../src/gui/adddialog.py:191
msgid "<b>Due Date:</b>"
msgstr "<b>Data de vencimento:</b>"
#. TRANSLATORS: This is the end date for repeating bills.
#: ../src/gui/adddialog.py:195
#, fuzzy
msgid "<b>End:</b>"
msgstr "<b>V_alor:</b>"
#. # Expander
#: ../src/gui/adddialog.py:229
msgid "<b>Optional Fields:</b>"
msgstr ""
#. TRANSLATORS: No date selected
#: ../src/gui/adddialog.py:336 ../src/gui/adddialog.py:360
#: ../src/gui/maindialog.py:295 ../src/gui/widgets/datebutton.py:18
#: ../src/gui/adddialog.py:345 ../src/gui/adddialog.py:369
#: ../src/gui/maindialog.py:279 ../src/gui/widgets/datebutton.py:18
#: ../src/gui/widgets/datebutton.py:26
msgid "None"
msgstr "Nenhum"
#: ../src/gui/adddialog.py:342 ../src/gui/categoriesdialog.py:48
#: ../src/gui/adddialog.py:351 ../src/gui/categoriesdialog.py:48
msgid "New Category"
msgstr "Nova categoria"
#: ../src/gui/adddialog.py:477
#: ../src/gui/adddialog.py:486
#, python-format
msgid "\"%s\" and \"%s\" are required fields."
msgstr "\"%s\" e \"%s\" são campos requeridos."
#: ../src/gui/adddialog.py:478 ../src/gui/adddialog.py:482
#: ../src/gui/adddialog.py:487 ../src/gui/adddialog.py:491
#: ../src/gui/widgets/viewbill.py:89
msgid "Payee"
msgstr "Titular"
#: ../src/gui/adddialog.py:478 ../src/gui/widgets/viewbill.py:93
#: ../src/gui/adddialog.py:487 ../src/gui/widgets/viewbill.py:93
msgid "Amount"
msgstr "Valor"
#: ../src/gui/adddialog.py:482
#: ../src/gui/adddialog.py:491
#, python-format
msgid "\"%s\" is required field."
msgstr "\"%s\" é um campo requerido."
......@@ -376,119 +387,119 @@ msgid_plural "There are %d more bills in this category."
msgstr[0] "Existe mais %d conta nesta categoria."
msgstr[1] "Existem mais %d contas nesta categoria."
#: ../src/gui/categoriesdialog.py:248 ../src/gui/maindialog.py:581
#: ../src/gui/categoriesdialog.py:248 ../src/gui/maindialog.py:564
msgid "Confirmation"
msgstr "Confirmação"
#: ../src/gui/maindialog.py:307
#: ../src/gui/maindialog.py:291
msgid "New"
msgstr "Nova"
#. Dialog Title
#: ../src/gui/maindialog.py:307 ../src/gui/maindialog.py:343
#: ../src/gui/maindialog.py:291 ../src/gui/maindialog.py:327
#: ../src/lib/dialogs.py:51
msgid "Add a new bill"
msgstr "Adiciona uma nova conta"
#. Dialog Title
#: ../src/gui/maindialog.py:309 ../src/gui/maindialog.py:344
#: ../src/gui/maindialog.py:293 ../src/gui/maindialog.py:328
#: ../src/lib/dialogs.py:62
msgid "Edit a bill"
msgstr "Editar uma conta"
#: ../src/gui/maindialog.py:311 ../src/gui/maindialog.py:345
#: ../src/gui/maindialog.py:295 ../src/gui/maindialog.py:329
msgid "Delete selected bill"
msgstr "Exclui a conta selecionada"
#: ../src/gui/maindialog.py:314 ../src/gui/widgets/viewbill.py:97
#: ../src/gui/maindialog.py:298 ../src/gui/widgets/viewbill.py:97
msgid "Paid"
msgstr "Paga"
#: ../src/gui/maindialog.py:317
#: ../src/gui/maindialog.py:301
msgid "Not Paid"
msgstr "Não paga"
#: ../src/gui/maindialog.py:317 ../src/gui/maindialog.py:348
#: ../src/gui/maindialog.py:301 ../src/gui/maindialog.py:332
msgid "Mark as not paid"
msgstr "Marca como não paga"
#: ../src/gui/maindialog.py:342
#: ../src/gui/maindialog.py:326
msgid "_File"
msgstr "_Arquivo"
#: ../src/gui/maindialog.py:343 ../src/gui/maindialog.py:539
#: ../src/gui/maindialog.py:327 ../src/gui/maindialog.py:522
msgid "_Add New"
msgstr "_Adicionar nova"
#: ../src/gui/maindialog.py:346
#: ../src/gui/maindialog.py:330
msgid "_Edit"
msgstr "_Editar"
#: ../src/gui/maindialog.py:347 ../src/gui/maindialog.py:549
#: ../src/gui/maindialog.py:331 ../src/gui/maindialog.py:532
msgid "_Paid"
msgstr "_Paga"
#: ../src/gui/maindialog.py:348
#: ../src/gui/maindialog.py:332
msgid "_Not Paid"
msgstr "_Não paga"
#: ../src/gui/maindialog.py:349
#: ../src/gui/maindialog.py:333
msgid "Edit preferences"
msgstr "Edita as preferências"
#: ../src/gui/maindialog.py:350
#: ../src/gui/maindialog.py:334
msgid "Quit the Program"
msgstr "Sai do programa"
#: ../src/gui/maindialog.py:351
#: ../src/gui/maindialog.py:335
msgid "_View"
msgstr "_Ver"
#: ../src/gui/maindialog.py:352
#: ../src/gui/maindialog.py:336
msgid "_Help"
msgstr "Aj_uda"
#: ../src/gui/maindialog.py:353
#: ../src/gui/maindialog.py:337
msgid "About the application"
msgstr "Sobre o aplicativo"
#: ../src/gui/maindialog.py:363
#: ../src/gui/maindialog.py:347
msgid "_Show Toolbar"
msgstr "_Mostrar barra de ferramentas"
#: ../src/gui/maindialog.py:363
#: ../src/gui/maindialog.py:347
msgid "Show the toolbar"
msgstr "Mostra a barra de ferramentas"
#: ../src/gui/maindialog.py:367
#: ../src/gui/maindialog.py:351
msgid "_Not Paid Only"
msgstr "Apenas as _não pagas"
#: ../src/gui/maindialog.py:367
#: ../src/gui/maindialog.py:351
msgid "Display all unpaid bills only"
msgstr "Exibe apenas todas as contas pagas"
#: ../src/gui/maindialog.py:368
#: ../src/gui/maindialog.py:352
msgid "_Paid Only"
msgstr "Apenas as _pagas"
#: ../src/gui/maindialog.py:368
#: ../src/gui/maindialog.py:352
msgid "Display all paid bills only"
msgstr "Exibe apenas as contas pagas"
#: ../src/gui/maindialog.py:369
#: ../src/gui/maindialog.py:353
msgid "_All Bills"
msgstr "Tod_as as contas"
#: ../src/gui/maindialog.py:369
#: ../src/gui/maindialog.py:353
msgid "Display all bills"
msgstr "Exibir todas as contas."
#: ../src/gui/maindialog.py:552
#: ../src/gui/maindialog.py:535
msgid "Not _Paid"
msgstr "Não _paga"
#: ../src/gui/maindialog.py:579
#: ../src/gui/maindialog.py:562
#, python-format
msgid "Do you really want to delete \"%s\"?"
msgstr "Deseja realmente excluir \"%s\"?"
......@@ -559,13 +570,11 @@ msgstr "_Iniciar o Notificador do BillReminder"
msgid "<b>Note:</b> BillReminder Notifier is now running."
msgstr "<b>Nota:</b> O Notificador do BillReminder já está sendo executado."
#: ../src/gui/widgets/calendarwidget.py:55
msgid "<b>_Monthly Report:</b>"
msgstr "<b>Relatório _Mensal:</b>"
#: ../src/gui/widgets/calendarwidget.py:62
msgid "<b>_Year:</b>"
msgstr "<b>_Ano:</b>"
#. Label to display the date selected
#. TRANSLATORS: This is the date that is selected from the calendar. Try to keep it small.
#: ../src/gui/widgets/datepicker.py:40 ../src/gui/widgets/datepicker.py:64
msgid "%m/%d/%Y"
msgstr "%d/%m/%Y"
#: ../src/gui/widgets/datebutton.py:32 ../src/gui/widgets/datebutton.py:65
msgid "%Y/%m/%d %H:%M"
......@@ -687,6 +696,12 @@ msgstr "Semanalmente"
msgid "Monthly"
msgstr "Mensalmente"
#~ msgid "<b>_Monthly Report:</b>"
#~ msgstr "<b>Relatório _Mensal:</b>"
#~ msgid "<b>_Year:</b>"
#~ msgstr "<b>_Ano:</b>"
#~ msgid "<b>F_ilter:</b>"
#~ msgstr "<b>F_iltro:</b>"
......
......@@ -18,6 +18,7 @@ from lib.actions import Actions
from lib.utils import create_pixbuf
from lib import i18n
from gui.widgets.datebutton import DateButton
from gui.widgets.datepicker import DatePicker
from gui.categoriesdialog import CategoriesDialog
from lib.common import GCONF_PATH, GCONF_GUI_PATH, GCONF_ALARM_PATH
......@@ -27,7 +28,8 @@ class AddDialog(gtk.Dialog):
"""
def __init__(self, title=None, parent=None, record=None, selectedDate=None):
gtk.Dialog.__init__(self, title=title, parent=parent,
flags=gtk.DIALOG_MODAL|gtk.DIALOG_NO_SEPARATOR,
#flags=gtk.DIALOG_MODAL|gtk.DIALOG_NO_SEPARATOR,
flags=gtk.DIALOG_NO_SEPARATOR,
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT))
......@@ -86,19 +88,8 @@ class AddDialog(gtk.Dialog):
def _initialize_dialog_widgets(self):
self.vbox.set_spacing(12)
self.topcontainer = gtk.HBox(homogeneous=False, spacing=12)
self.topcontainer.set_border_width(6)
self.calbox = gtk.VBox(homogeneous=False, spacing=6)
self.fieldbox = gtk.VBox(homogeneous=False, spacing=6)
# Add calendar and label
self.callabel = gtk.Label()
self.callabel.set_markup_with_mnemonic(_("<b>_Due Date:</b>"))
self.callabel.set_alignment(0.00, 0.50)
self.calendar = gtk.Calendar()
self.callabel.set_mnemonic_widget(self.calendar)
## repeat times
self.repeatlabel = gtk.Label()
self.repeatlabel.set_markup_with_mnemonic(_("<b>_Repeat:</b>"))
......@@ -118,20 +109,13 @@ class AddDialog(gtk.Dialog):
#self.frequency.set_row_separator_func(self._determine_separator)
self._populate_frequency()
hbox = gtk.HBox(homogeneous=False, spacing=12)
hbox.pack_start(self.repeatlabel, expand=False, fill=True, padding=0)
hbox.pack_start(self.frequency, expand=True, fill=True, padding=0)
#hbox.pack_start(self.repeatlabel, expand=False, fill=True, padding=0)
#hbox.pack_start(self.frequency, expand=True, fill=True, padding=0)
hbox.pack_start(self.repeatSpinner, expand=True, fill=True, padding=0)
## Pack it all up
self.calbox.pack_start(self.callabel,
expand=False, fill=True)
self.calbox.pack_start(self.calendar,
expand=True, fill=True)
self.calbox.pack_start(hbox,
expand=True, fill=True)
# Fields
## Table of 5 x 2
self.table = gtk.Table(rows=5, columns=2, homogeneous=False)
## Table of 6 x 2
self.table = gtk.Table(rows=6, columns=2, homogeneous=False)
### Spacing to make things look better
self.table.set_col_spacings(12)
self.table.set_row_spacings(6)
......@@ -186,6 +170,7 @@ class AddDialog(gtk.Dialog):
self.categorydock.pack_start(self.categorybutton, expand=False,
fill=True, padding=0)
self._populate_category() # Populate combobox with category from db
### Notes
self.notesdock = gtk.ScrolledWindow()
self.notesdock.set_shadow_type(gtk.SHADOW_OUT)
......@@ -200,34 +185,58 @@ class AddDialog(gtk.Dialog):
self.alarmbutton = DateButton(self)
self.alarmlabel.set_mnemonic_widget(self.alarmbutton)
self.alarmbutton.set_tooltip_text(_("Select Date and Time"))
# Event responsible for updating alarm date
self.calendar.connect("day_selected", self._on_calendar_day_selected)
self.calendar.select_day(self.selectedDate.day)
self.calendar.select_month(self.selectedDate.month - 1, self.selectedDate.year)
self.calendar.mark_day(self.selectedDate.day)
# Datepickers
self.dueDateLabel = gtk.Label()
self.dueDateLabel.set_markup_with_mnemonic(_("<b>Due Date:</b>"))
self.dueDate = DatePicker()
self.endDatelabel = gtk.Label()
#TRANSLATORS: This is the end date for repeating bills.
self.endDatelabel.set_markup_with_mnemonic(_("<b>End:</b>"))
self.endDate = DatePicker()
## Pack it all into the table
self.table.attach(self.payeelabel, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
self.table.attach(self.amountlabel, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
self.table.attach(self.categorylabel, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
self.table.attach(self.noteslabel, 0, 1, 4, 5, gtk.FILL, gtk.FILL)
self.table.attach(self.alarmlabel, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
self.table.attach(self.payee, 1, 2, 0, 1, gtk.FILL, gtk.FILL)
self.table.attach(self.amount, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
self.table.attach(self.categorydock, 1, 2, 2, 3, gtk.FILL, gtk.FILL)
self.table.attach(self.notesdock, 1, 2, 4, 5, gtk.FILL, gtk.FILL)
self.table.attach(self.alarmbutton, 1, 2, 3, 4, gtk.FILL, gtk.FILL)
### Label widgets
self.table.attach(self.payeelabel, 0, 1,