├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── CONTRIBUTING.md ├── COPYING ├── README.md ├── data ├── appdata │ ├── cook-later.png │ ├── cooking.png │ ├── cuisine.png │ ├── cuisines.png │ ├── details.png │ ├── edit.png │ ├── org.gnome.Recipes.appdata.xml.in │ ├── osx.png │ └── recipes.png ├── chefs.db ├── chefs.db.h ├── icons │ ├── 16x16 │ │ ├── org.gnome.Recipes-symbolic.symbolic.png │ │ └── org.gnome.Recipes.png │ ├── 24x24 │ │ ├── org.gnome.Recipes-symbolic.symbolic.png │ │ └── org.gnome.Recipes.png │ ├── 32x32 │ │ ├── org.gnome.Recipes-symbolic.symbolic.png │ │ └── org.gnome.Recipes.png │ ├── 48x48 │ │ ├── org.gnome.Recipes-symbolic.symbolic.png │ │ └── org.gnome.Recipes.png │ ├── 512x512 │ │ ├── org.gnome.Recipes-symbolic.symbolic.png │ │ └── org.gnome.Recipes.png │ └── symbolic │ │ └── org.gnome.Recipes-symbolic.svg ├── images │ ├── american.png │ ├── big-american.png │ ├── big-chinese.png │ ├── big-french.jpg │ ├── big-indian.jpg │ ├── big-italian.png │ ├── big-mediterranean.png │ ├── big-nordic.jpg │ ├── big-turkish.png │ ├── chinese.png │ ├── french.jpg │ ├── indian.jpg │ ├── italian.png │ ├── mediterranean.png │ ├── nordic.jpg │ └── turkish.png ├── ingredients.list ├── meson.build ├── org.gnome.Recipes-mime.xml ├── org.gnome.Recipes-search-provider.ini ├── org.gnome.Recipes.desktop.in ├── org.gnome.Recipes.gschema.xml ├── org.gnome.Recipes.service.in ├── picks.db ├── recipes.db ├── recipes.db.h └── sounds │ └── complete.oga ├── flatpak ├── README.md ├── build-bundle.sh ├── gnome-recipes.flatpakref └── org.gnome.Recipes.json ├── help ├── C │ ├── add-recipe-description.page │ ├── add-recipe-details.page │ ├── add-recipe-directions.page │ ├── add-recipe-images.page │ ├── add-recipe-ingredients.page │ ├── add-recipe.page │ ├── chef.page │ ├── common-problems.page │ ├── contribute.page │ ├── cooking.page │ ├── find-recipe.page │ ├── images │ │ ├── Recipes.png │ │ ├── down.png │ │ ├── love.png │ │ ├── rotate-left.png │ │ ├── rotate-right.png │ │ ├── search.png │ │ ├── star.png │ │ └── trash.png │ ├── index.page │ ├── legal.xml │ ├── notes.page │ ├── share.page │ └── shop.page ├── LINGUAS ├── cs │ └── cs.po ├── de │ └── de.po ├── es │ └── es.po ├── fr │ └── fr.po ├── ko │ └── ko.po ├── meson.build ├── pl │ └── pl.po ├── sv │ └── sv.po └── uk │ └── uk.po ├── make-pot ├── make_release.sh ├── meson.build ├── meson_options.txt ├── meson_post_install.py ├── osx ├── Info.plist ├── README.md ├── build-osx-installer.sh ├── gnome-recipes.sh ├── org.gnome.Recipes.bundle ├── org.gnome.Recipes.icns └── template.dmg.gz ├── po-data ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── ar.po ├── cs.po ├── de.po ├── es.po ├── eu.po ├── fr.po ├── fur.po ├── hu.po ├── id.po ├── meson.build ├── nl.po ├── pt_BR.po ├── sl.po ├── sr.po ├── sv.po ├── uk.po └── zh_CN.po ├── po ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── ar.po ├── ca.po ├── cs.po ├── de.po ├── en_GB.po ├── es.po ├── eu.po ├── fi.po ├── fr.po ├── fur.po ├── hi.po ├── hr.po ├── hu.po ├── id.po ├── ka.po ├── kab.po ├── ko.po ├── meson.build ├── nb.po ├── nl.po ├── pl.po ├── pt_BR.po ├── sk.po ├── sl.po ├── sr.po ├── sv.po ├── tr.po ├── uk.po ├── zh_CN.po └── zh_TW.po ├── recipes.doap ├── src ├── built-with-builder-symbolic.symbolic.png ├── category.css ├── chef-conflict-dialog.ui ├── cuisine.css ├── gr-about-dialog.c ├── gr-about-dialog.h ├── gr-account.c ├── gr-account.h ├── gr-app.c ├── gr-app.h ├── gr-appdata.c ├── gr-appdata.h ├── gr-category-tile.c ├── gr-category-tile.h ├── gr-category-tile.ui ├── gr-chef-dialog.c ├── gr-chef-dialog.h ├── gr-chef-dialog.ui ├── gr-chef-tile.c ├── gr-chef-tile.h ├── gr-chef-tile.ui ├── gr-chef.c ├── gr-chef.h ├── gr-convert-units.c ├── gr-convert-units.h ├── gr-cooking-page.c ├── gr-cooking-page.h ├── gr-cooking-page.ui ├── gr-cooking-view.c ├── gr-cooking-view.h ├── gr-cooking-view.ui ├── gr-cuisine-page.c ├── gr-cuisine-page.h ├── gr-cuisine-page.ui ├── gr-cuisine-tile.c ├── gr-cuisine-tile.h ├── gr-cuisine-tile.ui ├── gr-cuisine.c ├── gr-cuisine.h ├── gr-cuisines-page.c ├── gr-cuisines-page.h ├── gr-cuisines-page.ui ├── gr-details-page.c ├── gr-details-page.h ├── gr-details-page.ui ├── gr-diet-row.c ├── gr-diet-row.h ├── gr-diet-row.ui ├── gr-diet.c ├── gr-diet.h ├── gr-edit-page.c ├── gr-edit-page.h ├── gr-edit-page.ui ├── gr-gourmet-format.c ├── gr-gourmet-format.h ├── gr-image-page.c ├── gr-image-page.h ├── gr-image-page.ui ├── gr-image-viewer.c ├── gr-image-viewer.h ├── gr-image-viewer.ui ├── gr-image.c ├── gr-image.h ├── gr-ingredient-row.c ├── gr-ingredient-row.h ├── gr-ingredient-row.ui ├── gr-ingredient.c ├── gr-ingredient.h ├── gr-ingredients-list.c ├── gr-ingredients-list.h ├── gr-ingredients-viewer-row.c ├── gr-ingredients-viewer-row.h ├── gr-ingredients-viewer-row.ui ├── gr-ingredients-viewer.c ├── gr-ingredients-viewer.h ├── gr-ingredients-viewer.ui ├── gr-list-page.c ├── gr-list-page.h ├── gr-list-page.ui ├── gr-logging.c ├── gr-logging.h ├── gr-mail.c ├── gr-mail.h ├── gr-meal-row.c ├── gr-meal-row.h ├── gr-meal-row.ui ├── gr-meal.c ├── gr-meal.h ├── gr-number.c ├── gr-number.h ├── gr-query-editor.c ├── gr-query-editor.h ├── gr-query-editor.ui ├── gr-recipe-exporter.c ├── gr-recipe-exporter.h ├── gr-recipe-formatter.c ├── gr-recipe-formatter.h ├── gr-recipe-importer.c ├── gr-recipe-importer.h ├── gr-recipe-printer.c ├── gr-recipe-printer.h ├── gr-recipe-store.c ├── gr-recipe-store.h ├── gr-recipe-tile.c ├── gr-recipe-tile.h ├── gr-recipe-tile.ui ├── gr-recipe.c ├── gr-recipe.h ├── gr-recipes-page.c ├── gr-recipes-page.h ├── gr-recipes-page.ui ├── gr-search-page.c ├── gr-search-page.h ├── gr-search-page.ui ├── gr-season.c ├── gr-season.h ├── gr-settings.c ├── gr-settings.h ├── gr-shell-search-provider.c ├── gr-shell-search-provider.h ├── gr-shopping-list-exporter.c ├── gr-shopping-list-exporter.h ├── gr-shopping-list-formatter.c ├── gr-shopping-list-formatter.h ├── gr-shopping-list-printer.c ├── gr-shopping-list-printer.h ├── gr-shopping-page.c ├── gr-shopping-page.h ├── gr-shopping-page.ui ├── gr-shopping-tile.c ├── gr-shopping-tile.h ├── gr-shopping-tile.ui ├── gr-spice-row.c ├── gr-spice-row.h ├── gr-spice-row.ui ├── gr-time-widget.c ├── gr-time-widget.h ├── gr-time-widget.ui ├── gr-timer-widget.c ├── gr-timer-widget.h ├── gr-timer.c ├── gr-timer.h ├── gr-unit.c ├── gr-unit.h ├── gr-utils.c ├── gr-utils.h ├── gr-window.c ├── gr-window.h ├── gr-window.ui ├── help-cursor-keys.png ├── help-esc-key.png ├── help-key-double-press.png ├── help-key-press.png ├── icons │ ├── 16x16 │ │ └── apps │ │ │ ├── dairy-content-symbolic.symbolic.png │ │ │ ├── egg-content-symbolic.symbolic.png │ │ │ ├── garlic-content-symbolic.symbolic.png │ │ │ ├── shopping-list-symbolic.symbolic.png │ │ │ ├── spicy-content-symbolic.symbolic.png │ │ │ └── wheat-content-symbolic.symbolic.png │ ├── 24x24 │ │ └── apps │ │ │ ├── dairy-content-symbolic.symbolic.png │ │ │ ├── egg-content-symbolic.symbolic.png │ │ │ ├── garlic-content-symbolic.symbolic.png │ │ │ ├── shopping-list-symbolic.symbolic.png │ │ │ ├── spicy-content-symbolic.symbolic.png │ │ │ └── wheat-content-symbolic.symbolic.png │ ├── 32x32 │ │ └── apps │ │ │ ├── dairy-content-symbolic.symbolic.png │ │ │ ├── egg-content-symbolic.symbolic.png │ │ │ ├── garlic-content-symbolic.symbolic.png │ │ │ ├── shopping-list-symbolic.symbolic.png │ │ │ ├── spicy-content-symbolic.symbolic.png │ │ │ └── wheat-content-symbolic.symbolic.png │ ├── 48x48 │ │ └── apps │ │ │ ├── dairy-content-symbolic.symbolic.png │ │ │ ├── egg-content-symbolic.symbolic.png │ │ │ ├── garlic-content-symbolic.symbolic.png │ │ │ ├── shopping-list-symbolic.symbolic.png │ │ │ ├── spicy-content-symbolic.symbolic.png │ │ │ └── wheat-content-symbolic.symbolic.png │ └── symbolic │ │ └── apps │ │ ├── dairy-content-symbolic.svg │ │ ├── egg-content-symbolic.svg │ │ ├── garlic-content-symbolic.svg │ │ ├── shopping-list-symbolic.svg │ │ ├── spicy-content-symbolic.svg │ │ └── wheat-content-symbolic.svg ├── list_to_c.py ├── main.c ├── menus.ui ├── meson.build ├── org.gnome.Recipes-symbolic.symbolic.png ├── org.gnome.Recipes.png ├── recipe-conflict-dialog.ui ├── recipe-export-dialog.ui ├── recipe-surprise.ui ├── recipe-whats-new-dialog.ui ├── recipes-dark.css ├── recipes-light.css ├── recipes.css ├── recipes.gresource.xml ├── shell-search-provider-dbus-interfaces.xml ├── shopping-list-exporter-dialog.ui ├── surprise.jpg ├── types.c.template └── types.h.template ├── tests ├── id-data │ ├── ids.expected │ └── ids.in ├── ids.c ├── ingredients-data │ ├── valid-1.expected │ ├── valid-1.in │ ├── valid-2.expected │ ├── valid-2.in │ ├── valid-3.expected │ ├── valid-3.in │ ├── valid-4.expected │ └── valid-4.in ├── ingredients-test.c ├── meson.build ├── number-data │ ├── number1.expected │ └── number1.in ├── number.c ├── strv.c ├── unit-data │ ├── unit1.expected │ └── unit1.in └── unit.c └── tools ├── meson.build └── recipe-extract.c /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | subprojects/libgd/ 3 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | build-fedora: 2 | image: fedora:latest 3 | before_script: 4 | - dnf install -y git gcc meson gettext itstool gtk3-devel gnome-autoar-devel gnome-online-accounts-devel gspell-devel libcanberra-devel libsoup-devel rest-devel json-glib-devel diffutils 5 | script: 6 | - meson build 7 | - ninja -C build 8 | - ninja -C build test 9 | 10 | variables: 11 | GIT_SUBMODULE_STRATEGY: normal 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "subprojects/libgd"] 2 | path = subprojects/libgd 3 | url = https://gitlab.gnome.org/GNOME/libgd.git 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/CONTRIBUTING.md -------------------------------------------------------------------------------- /data/appdata/cook-later.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/cook-later.png -------------------------------------------------------------------------------- /data/appdata/cooking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/cooking.png -------------------------------------------------------------------------------- /data/appdata/cuisine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/cuisine.png -------------------------------------------------------------------------------- /data/appdata/cuisines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/cuisines.png -------------------------------------------------------------------------------- /data/appdata/details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/details.png -------------------------------------------------------------------------------- /data/appdata/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/edit.png -------------------------------------------------------------------------------- /data/appdata/osx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/osx.png -------------------------------------------------------------------------------- /data/appdata/recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/appdata/recipes.png -------------------------------------------------------------------------------- /data/chefs.db.h: -------------------------------------------------------------------------------- 1 | #if 0 2 | 3 | N_("I cook a lot, particularly Italian and Indian.") 4 | N_("A Kuala Lumpur native, transplanted to San Francisco. I bake, I cook, I work on GNOME engagement stuff occasionally. Every now and then I travel between North America, Asia and Europe. Follow me @adeliabakes.") 5 | N_("Adrià is originally from Barcelona, Spain.") 6 | N_("Being from Strasbourg, Alexandre is knowledgeable about both Alsatian and French cuisine, but he's not afraid to experiment in other ones as well.") 7 | N_("The nordic cuisine maestro.") 8 | N_("I love to blend and juice.") 9 | N_("He cooks with GTK+") 10 | N_("Elvin lives in Istanbul.") 11 | N_("Erusan is an American who has lived all over the country, loves GNOME, and enjoys cooking — primarily American, Asian, and Indian cuisine.") 12 | N_("Just another chef") 13 | N_("Georges is a vegan samurai, a GNOME contributor, and sometimes both.") 14 | N_("Just another chef") 15 | N_("My name is Fredrik Fyksen. I am from Norway, but live in Denmark. I like food, computers and music. You can read more about me at fyksen.me.") 16 | N_("Ray is a Desktop Software Engineer at Red Hat and vegetarian who occasionally enjoys cooking.") 17 | N_("Dad with a sysadmin problem/hobby") 18 | N_("Just Link.") 19 | N_("Matthias is a manager in the Desktop team at Red Hat. He likes to cook as much as he likes to code.") 20 | N_("Matthew is a vegan and a Computer Science student who loves FOSS.") 21 | N_("I'm cooking from time to time and started to add recipes here.") 22 | N_("Artist, Computer Scientist, Translator.") 23 | N_("I love cooking and learning.") 24 | N_("Another designer who loves to cook") 25 | N_("Computer science student and aspiring software developer.") 26 | N_("https://krourke.org") 27 | N_("GNOME contributor and cook") 28 | N_("Artist, Computer Scientist, Traveller.") 29 | N_("I love cooking. :)") 30 | N_("Aviation, making stuff, in Finland.") 31 | N_("Just another chef") 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /data/icons/16x16/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/16x16/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /data/icons/16x16/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/16x16/org.gnome.Recipes.png -------------------------------------------------------------------------------- /data/icons/24x24/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/24x24/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /data/icons/24x24/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/24x24/org.gnome.Recipes.png -------------------------------------------------------------------------------- /data/icons/32x32/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/32x32/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /data/icons/32x32/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/32x32/org.gnome.Recipes.png -------------------------------------------------------------------------------- /data/icons/48x48/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/48x48/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /data/icons/48x48/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/48x48/org.gnome.Recipes.png -------------------------------------------------------------------------------- /data/icons/512x512/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/512x512/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /data/icons/512x512/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/icons/512x512/org.gnome.Recipes.png -------------------------------------------------------------------------------- /data/images/american.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/american.png -------------------------------------------------------------------------------- /data/images/big-american.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-american.png -------------------------------------------------------------------------------- /data/images/big-chinese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-chinese.png -------------------------------------------------------------------------------- /data/images/big-french.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-french.jpg -------------------------------------------------------------------------------- /data/images/big-indian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-indian.jpg -------------------------------------------------------------------------------- /data/images/big-italian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-italian.png -------------------------------------------------------------------------------- /data/images/big-mediterranean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-mediterranean.png -------------------------------------------------------------------------------- /data/images/big-nordic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-nordic.jpg -------------------------------------------------------------------------------- /data/images/big-turkish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/big-turkish.png -------------------------------------------------------------------------------- /data/images/chinese.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/chinese.png -------------------------------------------------------------------------------- /data/images/french.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/french.jpg -------------------------------------------------------------------------------- /data/images/indian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/indian.jpg -------------------------------------------------------------------------------- /data/images/italian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/italian.png -------------------------------------------------------------------------------- /data/images/mediterranean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/mediterranean.png -------------------------------------------------------------------------------- /data/images/nordic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/nordic.jpg -------------------------------------------------------------------------------- /data/images/turkish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/images/turkish.png -------------------------------------------------------------------------------- /data/org.gnome.Recipes-mime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GNOME Recipes exported data 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /data/org.gnome.Recipes-search-provider.ini: -------------------------------------------------------------------------------- 1 | [Shell Search Provider] 2 | DesktopId=org.gnome.Recipes.desktop 3 | BusName=org.gnome.Recipes 4 | ObjectPath=/org/gnome/Recipes/SearchProvider 5 | Version=2 6 | -------------------------------------------------------------------------------- /data/org.gnome.Recipes.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Recipes 3 | Comment=GNOME cooks unite! 4 | Exec=gnome-recipes %f 5 | # Translators: Do NOT translate or transliterate this text (this is an icon file name)! 6 | Icon=org.gnome.Recipes 7 | Terminal=false 8 | Type=Application 9 | StartupNotify=true 10 | Categories=Utility;GTK;GNOME; 11 | DBusActivatable=true 12 | MimeType=application/vnd.gnome.recipes.export; 13 | -------------------------------------------------------------------------------- /data/org.gnome.Recipes.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=org.gnome.Recipes 3 | Exec=@BINDIR@/gnome-recipes --gapplication-service 4 | -------------------------------------------------------------------------------- /data/picks.db: -------------------------------------------------------------------------------- 1 | [Content] 2 | Todays=R_Sous_vide_by_primulas;R_Rosemary_Scalloped_Potatoes_by_erusan;R_Gingered_Carrot_Soup_by_mleeds;R_Kiwi-Mandarin_Salsa_by_bastian; 3 | Picks=R_Struwen_by_tobias;R_Pineapple_Upside_Down_Cake_with_Hot_Buttered_Rum_Sauce_by_aday;R_Tagliatelle_alla_Romana_by_aday;R_Carbonara_by_ebassi;R_Mantovana_Cake_by_adelia; 4 | Chefs=aday;adelia;adria;afranke;bastian;ebassi;elvin;erusan;feaneron;fyksen;halfline;link;mclasen;mwleeds;primulas;snwh;sri;sylvia;tigert;tobias; 5 | -------------------------------------------------------------------------------- /data/sounds/complete.oga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/data/sounds/complete.oga -------------------------------------------------------------------------------- /flatpak/README.md: -------------------------------------------------------------------------------- 1 | The files in this folder are used to generate nightly Flatpak builds of Recipes, 2 | which are hosted [here](https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-recipes.flatpakref). 3 | 4 | Stable Flatpak builds of Recipes are on [flathub.org](https://git.gnome.org/browse/recipes/plain/flatpak/gnome-recipes.flatpakref). 5 | 6 | -------------------------------------------------------------------------------- /flatpak/build-bundle.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | BUILD_DIR=build 4 | JSON=org.gnome.Recipes.json 5 | REPO=repo 6 | 7 | echo "Removing build dir..." 8 | rm -rf $BUILD_DIR 9 | 10 | echo "Making repository..." 11 | ostree init --mode=archive-z2 --repo=$REPO 12 | 13 | echo "Building with flatpak-builder..." 14 | flatpak-builder --repo=$REPO $BUILD_DIR $JSON 15 | 16 | echo "Creating bundle file..." 17 | flatpak build-bundle $REPO org.gnome.Recipes.x86_64.flatpak org.gnome.Recipes master 18 | 19 | -------------------------------------------------------------------------------- /flatpak/org.gnome.Recipes.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "org.gnome.Recipes", 3 | "runtime": "org.gnome.Platform", 4 | "runtime-version": "master", 5 | "sdk": "org.gnome.Sdk", 6 | "command": "gnome-recipes", 7 | "tags": ["nightly"], 8 | "desktop-file-name-prefix": "(Nightly) ", 9 | "finish-args": [ 10 | "--share=ipc", 11 | "--share=network", 12 | "--socket=wayland", 13 | "--socket=x11", 14 | "--socket=pulseaudio", 15 | "--filesystem=xdg-run/dconf", 16 | "--filesystem=~/.config/dconf:ro", 17 | "--talk-name=ca.desrt.dconf", 18 | "--env=DCONF_USER_CONFIG_DIR=.config/dconf" 19 | ], 20 | "cleanup": [ 21 | "/include", 22 | "/lib/pkgconfig", 23 | "/share/pkgconfig", 24 | "/share/aclocal", 25 | "/man", 26 | "/share/man", 27 | "/share/gtk-doc", 28 | "/share/vala", 29 | "*.la", 30 | "*.a" 31 | ], 32 | "modules": [ 33 | { 34 | "name": "enchant", 35 | "cleanup": [ "/include", "/lib/pkgconfig", "*.la", "/share" ], 36 | "sources": [ 37 | { 38 | "type": "archive", 39 | "url": "https://github.com/AbiWord/enchant/releases/download/v2.2.3/enchant-2.2.3.tar.gz", 40 | "sha256": "abd8e915675cff54c0d4da5029d95c528362266557c61c7149d53fa069b8076d" 41 | } 42 | ] 43 | }, 44 | { 45 | "name": "gspell", 46 | "sources": [ 47 | { 48 | "type": "git", 49 | "url": "https://gitlab.gnome.org/GNOME/gspell.git" 50 | } 51 | ] 52 | }, 53 | { 54 | "name": "gnome-autoar", 55 | "sources": [ 56 | { 57 | "type": "git", 58 | "url": "https://gitlab.gnome.org/GNOME/gnome-autoar.git" 59 | } 60 | ] 61 | }, 62 | { 63 | "name": "rest", 64 | "sources": [ 65 | { 66 | "type": "archive", 67 | "url": "https://download.gnome.org/sources/rest/0.7/rest-0.7.93.tar.xz", 68 | "sha256": "c710644455340a44ddc005c645c466f05c0d779993138ea21a62c6082108b216" 69 | } 70 | ] 71 | }, 72 | { 73 | "name": "gnome-online-accounts", 74 | "config-opts" : [ "--disable-Werror" ], 75 | "sources": [ 76 | { 77 | "type": "git", 78 | "url": "https://gitlab.gnome.org/GNOME/gnome-online-accounts.git" 79 | } 80 | ] 81 | }, 82 | { 83 | "name": "recipes", 84 | "buildsystem": "meson", 85 | "builddir": true, 86 | "sources": [ 87 | { 88 | "type": "git", 89 | "url": "https://gitlab.gnome.org/GNOME/recipes.git" 90 | } 91 | ] 92 | } 93 | ] 94 | } 95 | -------------------------------------------------------------------------------- /help/C/add-recipe-description.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | How to add a recipe description and dietary restrictions. 13 | 14 | 15 | Paul Cutler 16 | pcutler@gnome.org 17 | 2017 18 | 19 | 20 | 21 | 22 | 23 | 24 | Add a Description 25 | 26 |

Press the New Recipe in the upper left corner of 27 | Recipes. In the Description section, 28 | use the text box to describe the recipe in detail.

29 |

Below the Description field you can select a checkbox if the 30 | recipe meets any dietary restrictions. 31 | The dietary restrictions will help for searching recipes later. 32 |

33 | 34 |

Gluten-free: Select for recipes that 35 | do not include wheat or related grains.

36 |

Vegetarian: Select for recipes 37 | that only include vegetables and do not include meat, poultry 38 | or seafood. Vegetarian recipes may include dairy or eggs.

39 |

Nut-free: Select for recipes that do not 40 | include any nuts.

41 |

Milk-free: Select for recipes that do not 42 | include dairy products, such as milk or cheese.

43 |

Vegan: Recipes that do not include any product 44 | from an animal. This includes meat, dairy, eggs and more.

45 |
46 | 47 |
48 | -------------------------------------------------------------------------------- /help/C/add-recipe-details.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Add recipe name, serving size, cooking and preparation time, and more. 13 | 14 | 15 | 16 | Paul Cutler 17 | pcutler@gnome.org 18 | 2017 19 | 20 | 21 | 22 | 23 | Add Recipe Details 24 |

Press the New Recipe in the upper left corner of 25 | Recipes and include the following information about your 26 | recipe in the Details section. The recipe name 27 | and serving size is required and all other fields are optional. 28 | It is helpful to fill as many fields as possible to help when searching 29 | Recipes.

30 | 31 |

Name Your Recipe: Enter the name of the recipe in 32 | the text box.

33 |
34 |

Serves: Enter a number or press the 35 | + button to enter how many servings the recipe 36 | will make.

37 |
38 |

Preparation Time: From the drop down box, choose 39 | how long it takes to prepare the ingredients prior to cooking.

40 |
41 |

Cooking Time: From the drop down box, choose 42 | how long it takes to cook the recipe.

43 |
44 |

Cuisine: From the drop down box, choose the type of 45 | food or the region from where the recipe comes from. You can also 46 | enter the type of cuisine if it is not included in the list.

47 |
48 |

Meal: From the drop down box, choose what type 49 | of meal the recipe makes. Examples include breakfast or dinner; or 50 | types of food such as pasta or cocktails. You can also enter the type 51 | of meal if it is not included in the list.

52 |
53 |

Season: From the drop down box, choose from 54 | the season or holiday that the recipe is typically associated with. 55 | You can also enter the season or holiday if it is not included 56 | in the list.

57 |
58 |

Spiciness: From the drop down menu, choose 59 | how spicy the recipe is.

60 |
61 |
62 |
63 | -------------------------------------------------------------------------------- /help/C/add-recipe-ingredients.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | How to add ingredients and lists. 13 | 14 | 15 | Paul Cutler 16 | pcutler@gnome.org 17 | 2017 18 | 19 | 20 | 21 | 22 | Add Ingredients 23 |

You can add the ingredients and create lists for the recipe. Lists are 24 | used for recipes that have different parts, such as a cake that has 25 | an ingredient list for the cake and an ingredient list for the frosting. 26 | To create a list:

27 | 28 |

Press the New Recipe in the upper left corner of 29 | Recipes.

30 |
31 |

Press the Add List button in the 32 | Ingredients section.

33 |
34 |

Enter the name of the list, such as cake, in the 35 | Name of the List text box.

36 |
37 |

Repeat this step for as many lists as you may need.

38 |
39 |
40 |

To add ingredients to a recipe or to a list:

41 | 42 |

Press the + button.

43 |
44 |

Choose the ingredient from the list or enter 45 | the ingredient in the Search box.

46 |
47 |

Press the Add button to add the ingredient to the 48 | list or click Amount to how much of the ingredient is 49 | needed.

50 |
51 |

In the Amount drop down box you can enter the 52 | quantity needed and then press Add. Or you can enter the 53 | amount and choose the measurement from the list and then press the 54 | Add button.

55 |
56 | 57 |

Repeat these steps until all ingredients have been added to the 58 | list or recipe. 59 |

60 |
61 |
62 |

Recipes does not currently support the ability 63 | to convert between metric units and imperial units.

64 | 65 |
66 | -------------------------------------------------------------------------------- /help/C/add-recipe.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | Learn how to add your own recipe. 9 | 10 | 11 | Paul Cutler 12 | pcutler@gnome.org 13 | 2017 14 | 15 | 16 | 17 | 18 | Add a Recipe 19 | 20 |

If you are new to Recipes, these topics will help you to 21 | add the following categories to a recipe.

22 | 23 | 24 |
25 | -------------------------------------------------------------------------------- /help/C/chef.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | How to add your personal information to recipes. 12 | 13 | 14 | Paul Cutler 15 | pcutler@gnome.org 16 | 2017 17 | 18 | 19 | Andre Klapper 20 | ak-47@gmx.net 21 | 2019 22 | 23 | 24 | 25 | 26 | Add Chef Information 27 | 28 |

You can add your personal information including your full name, short name 29 | and a photo to Recipes. This will create a chef profile that is 30 | used when you create a recipe. This will also help to search for recipes you 31 | have created or to share recipes with friends and family. 32 | To add your chef information: 33 |

34 | 35 | 36 | 37 |

Press the menu button in the top-right corner of the window. 38 |

39 |
40 | 41 |

Select Chef Information. 42 |

43 |
44 | 45 |

Enter your full name in the Name.. text box. 46 |

47 |
48 | 49 |

Enter your first name or nickname in the Short Name.. 50 | text box. 51 |

52 |
53 | 54 |

Press the camera icon and select an image to add as your personal 55 | photo and then press Open. 56 |

57 |
58 | 59 |

Press the Save button to finish entering your chef 60 | information. 61 |

62 |
63 |
64 |
65 | -------------------------------------------------------------------------------- /help/C/common-problems.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | Solutions to common problems with Recipes. 9 | 10 | 11 | Paul Cutler 12 | pcutler@gnome.org 13 | 2017 14 | 15 | 16 | 17 | 18 | Common Problems 19 | 20 |
21 | Editing Your Recipes 22 |

If you have change the login or user ID you use to log into your computer, 23 | and you can no longer edit the recipes you have created, you will need 24 | to update the Recipes database.

25 | 26 | 27 |

You must have the dconf-editor package installed. 28 | Be very careful editing application data in dconf-editor. 29 | By editing an application's settings, you may cause that application to 30 | stop working correctly.

31 |
32 | 33 |

To update Recipes to use the old user to allow you to edit 34 | your recipes:

35 | 36 | 37 |

Open dconf-editor.

38 |
39 | 40 |

Select org gnome recipes 41 | user.

42 |
43 | 44 |

In the Custom value field, enter the old user ID.

45 |
46 | 47 |

Close dconf-editor.

48 |
49 | 50 |

Open Recipes. You will now be able to open and edit 51 | recipes you have created.

52 |
53 |
54 |
55 | 56 |
57 | Remove or Edit Included Recipes 58 |

You can only remove or edit the recipes you create, not the recipes 59 | included.

60 |
61 |
62 | -------------------------------------------------------------------------------- /help/C/contribute.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | How to share your recipes with the GNOME community. 10 | 11 | 12 | Paul Cutler 13 | pcutler@gnome.org 14 | 2017 15 | 16 | 17 | 18 | 19 | Contribute Recipes 20 | 21 |

You can share your recipe with the Recipes developers 22 | who may include your recipe in the Recipes application. 23 | Recipes you share should be of your own creation. To send your recipe: 24 |

25 | 26 | 27 |

Open the recipe you want to share. 28 |

29 |
30 | 31 |

Press the Share button. 32 |

33 |
34 | 35 |

If you would like to share multiple recipes, press the 36 | Add More button in the top-right window and open another 37 | recipe and then press Share again. 38 |

39 |
40 | 41 |

Press the Share button in the upper-right corner. 42 |

43 |
44 | 45 |

Select Contribute to Recipes in the bottom-right 46 | corner.

47 |
48 | 49 |

Choose the email application from the list you want to use to email 50 | the recipe and press the Select button. 51 |

52 |
53 | 54 |

Your email application will open and a new email message will 55 | be composed. Recipes will have included the recipe as an 56 | attachment and the Subject and To: 57 | line will be automatically filled out for you. 58 |

59 |
60 | 61 |

Press Send to email your recipe to the Recipe 62 | developers who will review your recipe for possible inclusion. 63 |

64 |
65 |
66 | 67 |
68 | -------------------------------------------------------------------------------- /help/C/cooking.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | Use hands-free mode or timers to help you cook. 10 | 11 | 12 | Paul Cutler 13 | pcutler@gnome.org 14 | 2017 15 | 16 | 17 | 18 | 19 | Start Cooking 20 | 21 |

Recipes features a hands-free mode to help you with recipe 22 | directions when you want to cook a recipe. Hands-free mode makes it 23 | easy to view the steps to make a recipe, including starting timers 24 | or seeing photos of each step, if they were included in the recipe.

25 | 26 |

To start cooking with hands-free mode:

27 | 28 | 29 |

Open the recipe you want to cook. 30 |

31 |
32 | 33 |

Press the Start Cooking button in the top right corner. 34 |

35 |
36 | 37 |

Recipes will change to full screen mode, also known as 38 | hands-free mode and display the first step to cook the recipe. 39 |

40 |
41 | 42 |

To move to the next step of the recipe, press any key on the 43 | keyboard. 44 |

45 |
46 | 47 |

To move to the previous step, press the left arrow key on the 48 | keyboard. 49 |

50 |
51 | 52 |

To start a timer, press the Start button or 53 | Spacebar. Once you have 54 | started a timer, you can press Pause to pause the timer 55 | or Reset to re-start the timer from the beginning. You can 56 | have multiple timers running and the names of the step associated 57 | with each timer will be shown in the upper left corner of 58 | Recipes. When the timer is done, your computer 59 | will beep and Time is up! will be shown. 60 |

61 |

When a timer is running, the name of the timer will be shown 62 | in the upper left corner of hands-free mode. You can move to the next 63 | steps while a timer is running.

64 |
65 | 66 |

To move to the next step of the recipe, press any key on the 67 | keyboard. 68 |

69 |
70 | 71 |

When you have completed all the steps or to exit hands-free mode at 72 | any time, press the Escape key or press the x button 73 | in the top-right corner.

74 |
75 |
76 |
77 | -------------------------------------------------------------------------------- /help/C/images/Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/Recipes.png -------------------------------------------------------------------------------- /help/C/images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/down.png -------------------------------------------------------------------------------- /help/C/images/love.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/love.png -------------------------------------------------------------------------------- /help/C/images/rotate-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/rotate-left.png -------------------------------------------------------------------------------- /help/C/images/rotate-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/rotate-right.png -------------------------------------------------------------------------------- /help/C/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/search.png -------------------------------------------------------------------------------- /help/C/images/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/star.png -------------------------------------------------------------------------------- /help/C/images/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/help/C/images/trash.png -------------------------------------------------------------------------------- /help/C/index.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | Recipes 8 | 9 | 10 | Paul Cutler 11 | pcutler@gnome.org 12 | 2017 13 | 14 | 15 | A recipe manager to help you cook. 16 | 17 | 18 | 19 | <media type="image" mime="image/png" its:translate="no" src="images/Recipes.png"/> 20 | Recipes 21 | 22 | 23 |

Recipes is an easy to use application that will help you 24 | discover what to cook today, tomorrow, the rest of the week, and for 25 | special occasions.

26 | 27 |
28 | Managing Recipes 29 | 30 |
31 | 32 |
33 | Cooking 34 |
35 | 36 |
37 | Printing and Sharing 38 | 39 |
40 | 41 |
42 | Common Problems 43 |
44 | 45 |
46 | -------------------------------------------------------------------------------- /help/C/legal.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 |

This work is licensed under a 5 | Creative Commons 6 | Attribution-ShareAlike 4.0 International license.

7 | 8 |

As a special exception, the copyright holders give you permission to copy, 9 | modify, and distribute the example code contained in this documentation under 10 | the terms of your choosing, without restriction.

11 | 12 |
13 | -------------------------------------------------------------------------------- /help/C/notes.page: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | How to add notes to a recipe or make it a favorite. 9 | 10 | 11 | Paul Cutler 12 | pcutler@gnome.org 13 | 2017 14 | 15 | 16 | 17 | 18 | Add Notes 19 | 20 |
21 | Add a Note to a Recipe. 22 |

You can add personal notes to any recipe. You may want to make a note 23 | how you changed the recipe, or if a recipe needed to be cooked shorter 24 | or longer, or if it became a favorite of a friend or family member. 25 | To add a note to a recipe:

26 | 27 | 28 |

Open a recipe.

29 |
30 | 31 |

Press the Notes button in the 32 | lower-left corner.

33 |
34 | 35 |

Enter your notes in the text box.

36 |
37 | 38 |

Press the Notes button again 39 | lower-left corner when finished.

40 |
41 |
42 |

Your note will now be displayed below the recipe description and 43 | above the recipe directions.

44 |
45 | 46 |
47 | Make a recipe a favorite. 48 |

You can make a recipe a favorite. To favorite a recipe:

49 | 50 | 51 |

Open a recipe.

52 |
53 | 54 |

Press the Add to Favorites 55 | 57 | Add to Favorites button. 58 |

59 |
60 |
61 |

To remove from favorites, press the Add to Favorites 62 | button again. 63 |

64 |
65 |
66 | -------------------------------------------------------------------------------- /help/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically. 2 | cs 3 | de 4 | es 5 | fr 6 | ko 7 | pl 8 | sv 9 | uk 10 | -------------------------------------------------------------------------------- /help/ko/ko.po: -------------------------------------------------------------------------------- 1 | # Korean translation for recipes. 2 | # Copyright (C) 2017 recipes's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the recipes package. 4 | # Seong-ho Cho , 2017. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: recipes master\n" 9 | "POT-Creation-Date: 2017-03-19 06:43+0000\n" 10 | "PO-Revision-Date: 2017-03-19 20:13+0900\n" 11 | "Last-Translator: Seong-ho Cho \n" 12 | "Language-Team: Korean \n" 13 | "Language: ko\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | "X-Generator: Poedit 1.8.7\n" 19 | 20 | #. Put one translator per line, in the form NAME , YEAR1, YEAR2 21 | msgctxt "_" 22 | msgid "translator-credits" 23 | msgstr "조성호 , 2017" 24 | 25 | #. (itstool) path: page/title 26 | #: C/index.page:11 27 | msgid "Recipes" 28 | msgstr "요리" 29 | 30 | #. (itstool) path: page/p 31 | #: C/index.page:13 32 | msgid "Recipes will be documented here." 33 | msgstr "요리 문서 내용은 여기에 들어갑니다." 34 | -------------------------------------------------------------------------------- /help/meson.build: -------------------------------------------------------------------------------- 1 | gnome.yelp('org.gnome.Recipes', 2 | sources: ['add-recipe-description.page', 3 | 'add-recipe-details.page', 4 | 'add-recipe-directions.page', 5 | 'add-recipe-images.page', 6 | 'add-recipe-ingredients.page', 7 | 'add-recipe.page', 8 | 'chef.page', 9 | 'common-problems.page', 10 | 'contribute.page', 11 | 'cooking.page', 12 | 'find-recipe.page', 13 | 'index.page', 14 | 'legal.xml', 15 | 'notes.page', 16 | 'share.page', 17 | 'shop.page'], 18 | media: ['images/down.png', 19 | 'images/love.png', 20 | 'images/Recipes.png', 21 | 'images/rotate-left.png', 22 | 'images/rotate-right.png', 23 | 'images/search.png', 24 | 'images/star.png', 25 | 'images/trash.png']) 26 | -------------------------------------------------------------------------------- /make-pot: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # This script extracts the typical xgettext invokation out of 4 | # po/Makefile.in.in, in order for it to be available as a shell 5 | # command without the need to autogen first. This is needed for 6 | # translation tools such as the damn lies website. 7 | # 8 | # Call this from your checkout directory, like this: 9 | # 10 | # ./make-pot 11 | # 12 | # to generate po/gnome-recipes.pot, and like this: 13 | # 14 | # ./make-pot data 15 | # 16 | # Various things can be passed in by environment variables, which 17 | # are heavily inspired by the variables used in po/Makefile.in.in: 18 | # 19 | # SED - path to the sed binary 20 | # XGETTEXT - path of the xgettext binary 21 | # top_srcdir - the location of the GTK+ checkout 22 | # srcdir - the directory where POTFILES.in is located (defaults to 23 | # $top_srcdir/po or $top_srcdir/po-properties) 24 | # GETTEXT_PACKAGE - the gettext domain, used for naming the resulting 25 | # .pot file (defaults to gtk40 or gtk40-properties) 26 | # XGETTEXT_KEYWORDS - --keyword arguments to pass to xgettext 27 | 28 | 29 | SED="${SED:-sed}" 30 | XGETTEXT="${XGETTEXT:-xgettext}" 31 | top_srcdir="${top_srcdir:-.}" 32 | 33 | if test "$1" = "data"; then 34 | srcdir="${srcdir:-$top_srcdir/po-data}" 35 | GETTEXT_PACKAGE="${GETTEXT_PACKAGE:-gnome-recipes-data}" 36 | XGETTEXT_KEYWORDS="${XGETTEXT_KEYWORDS:- --keyword --keyword=N_ }" 37 | else 38 | srcdir="${srcdir:-$top_srcdir/po}" 39 | GETTEXT_PACKAGE="${GETTEXT_PACKAGE:-gnome-recipes}" 40 | XGETTEXT_KEYWORDS="${XGETTEXT_KEYWORDS:- --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=gettext --keyword=ngettext:1,2 --keyword=g_dngettext:2,3 }" 41 | fi 42 | 43 | $SED -e 's/^\(.*\)$/ N_("\1"),/' $top_srcdir/data/ingredients.list > $top_srcdir/src/ingredients.inc 44 | $SED -e 's/^\(.*\)$/ N_("no \1"),/' $top_srcdir/data/ingredients.list > $top_srcdir/src/no-ingredients.inc 45 | $SED -e 's/^\(.*\)$/ N_("\1"),/' $top_srcdir/data/segments.list > $top_srcdir/src/segments.inc 46 | 47 | $XGETTEXT --default-domain="$GETTEXT_PACKAGE" \ 48 | --directory="$top_srcdir" \ 49 | --add-comments \ 50 | $XGETTEXT_KEYWORDS \ 51 | --from-code=utf-8 \ 52 | --flag=g_dngettext:2:pass-c-format \ 53 | --flag=g_strdup_printf:1:c-format \ 54 | --flag=g_string_printf:2:c-format \ 55 | --flag=g_string_append_printf:2:c-format \ 56 | --flag=g_error_new:3:c-format \ 57 | --flag=g_set_error:4:c-format \ 58 | --flag=g_markup_printf_escaped:1:c-format \ 59 | --flag=g_log:3:c-format \ 60 | --flag=g_print:1:c-format \ 61 | --flag=g_printerr:1:c-format \ 62 | --flag=g_printf:1:c-format \ 63 | --flag=g_fprintf:2:c-format \ 64 | --flag=g_sprintf:2:c-format \ 65 | --flag=g_snprintf:3:c-format \ 66 | --flag=g_scanner_error:2:c-format \ 67 | --flag=g_scanner_warn:2:c-format \ 68 | --flag=gtk_message_dialog_format_secondary_markup:2:c-format \ 69 | --flag=gtk_message_dialog_format_secondary_text:2:c-format \ 70 | --flag=gtk_message_dialog_new:5:c-format \ 71 | --flag=gtk_message_dialog_new_with_markup:5:c-format \ 72 | --files-from="$srcdir/POTFILES.in" \ 73 | && test ! -f "$GETTEXT_PACKAGE.po" \ 74 | || ( rm -f "$srcdir/$GETTEXT_PACKAGE.pot" \ 75 | && mv "$GETTEXT_PACKAGE.po" "$srcdir/$GETTEXT_PACKAGE.pot" ) 76 | 77 | -------------------------------------------------------------------------------- /make_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test -n "$srcdir" || srcdir=$1 3 | test -n "$srcdir" || srcdir=. 4 | 5 | cd $srcdir 6 | 7 | VERSION=$(git describe --abbrev=0) 8 | NAME="gnome-recipes-$VERSION" 9 | 10 | echo "Updating submodules…" 11 | git submodule update --init 12 | 13 | echo "Creating git tree archive…" 14 | git archive --prefix="${NAME}/" --format=tar HEAD > main.tar 15 | 16 | cd subprojects/libgd 17 | 18 | git archive --prefix="${NAME}/subprojects/libgd/" --format=tar HEAD > libgd.tar 19 | 20 | cd ../.. 21 | 22 | rm -f "${NAME}.tar" 23 | 24 | tar -Af "${NAME}.tar" main.tar 25 | tar -Af "${NAME}.tar" subprojects/libgd/libgd.tar 26 | 27 | rm -f main.tar 28 | rm -f subprojects/libgd/libgd.tar 29 | 30 | echo "Compressing archive…" 31 | xz -f "${NAME}.tar" 32 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('autoar', type: 'combo', choices: ['auto', 'yes', 'no'], value: 'auto', description: 'Use gnome-autoar') 2 | option('gspell', type: 'combo', choices: ['auto', 'yes', 'no'], value: 'auto', description: 'Use gspell') 3 | option('canberra', type: 'combo', choices: ['auto', 'yes', 'no'], value: 'auto', description: 'Use libcanberra') 4 | -------------------------------------------------------------------------------- /meson_post_install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import subprocess 5 | 6 | prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local') 7 | datadir = os.path.join(prefix, 'share') 8 | 9 | # Packaging tools define DESTDIR and this isn't needed for them 10 | if 'DESTDIR' not in os.environ: 11 | print('Updating icon cache...') 12 | subprocess.call(['gtk-update-icon-cache', '-qtf', 13 | os.path.join(datadir, 'icons', 'hicolor')]) 14 | 15 | print('Updating desktop database...') 16 | subprocess.call(['update-desktop-database', '-q', 17 | os.path.join(datadir, 'applications')]) 18 | 19 | print('Compiling GSettings schemas...') 20 | subprocess.call(['glib-compile-schemas', 21 | os.path.join(datadir, 'glib-2.0', 'schemas')]) 22 | -------------------------------------------------------------------------------- /osx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleGetInfoString 6 | Recipes 7 | CFBundleExecutable 8 | gnome-recipes.sh 9 | CFBundleIdentifier 10 | org.gnome.Recipes 11 | CFBundleName 12 | Recipes 13 | CFBundleIconFile 14 | org.gnome.Recipes.icns 15 | CFBundleShortVersionString 16 | 0.18.0 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundlePackageType 20 | APPL 21 | IFMajorVersion 22 | 0 23 | IFMinorVersion 24 | 1 25 | 26 | 27 | -------------------------------------------------------------------------------- /osx/README.md: -------------------------------------------------------------------------------- 1 | The materials in this folder can be used to build a dmg of Recipes on OS X. 2 | 3 | The steps I've followed are: 4 | 5 | * Use the [GTK-OSX](https://wiki.gnome.org/Projects/GTK+/OSX/Building) jhbuild setup to build GTK+ 6 | * Switch to the GNOME 3.24 moduleset and build a newer gtk+-3 and gnome-autoar 7 | * Build recipes, configuring it with --disable-gspell and --disable-canberra (I couldn't get those to build) 8 | * Install [gtk-mac-bundler](https://wiki.gnome.org/Projects/GTK+/OSX/Bundling) 9 | * Run ```gtk-mac-bundler ./org.gnome.Recipes.bundle``` in a jhbuild shell. This should produce a Recipes.app folder 10 | * Run ```./build-osx-installer.sh```. If all goes well, this produces a recipes.dmg image. 11 | 12 | Possible complications: 13 | 14 | * The template for the disk image might become too small again, as we are adding more recipes. It can be resized with the OS X disk utility. 15 | -------------------------------------------------------------------------------- /osx/build-osx-installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p mnttmp 4 | rm -f working.dmg 5 | gunzip < template.dmg.gz > working.dmg 6 | hdiutil attach working.dmg -noautoopen -quiet -mountpoint mnttmp 7 | # NOTE: output of hdiutil changes every now and then. 8 | # Verify that this is still working. 9 | DEV=`hdiutil info|tail -1|awk '{print $1}'` 10 | rm -rf mnttmp/Recipes.app 11 | mv ./Recipes.app mnttmp 12 | hdiutil detach ${DEV} 13 | rm -rf mnttmp 14 | rm -f recipes.dmg 15 | hdiutil convert working.dmg -quiet -format UDZO -imagekey zlib-level=9 -o recipes.dmg 16 | rm -f working.dmg 17 | -------------------------------------------------------------------------------- /osx/org.gnome.Recipes.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${env:PREFIX} 5 | 6 | gtk+-3.0 7 | ${project}/gnome-recipes.sh 8 | 9 | 10 | ${project}/Info.plist 11 | 12 | ${prefix}/bin/gnome-recipes 13 | 14 | 15 | ${prefix}/lib/gtk-3.0 16 | 17 | 18 | ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so 19 | 20 | 21 | 22 | ${prefix}/share/locale 23 | 24 | 25 | 26 | ${prefix}/share/locale 27 | 28 | 29 | 30 | 31 | ${prefix}/share/gnome-recipes 32 | 33 | 34 | 35 | ${prefix}/share/themes/Adwaita 36 | 37 | 38 | 39 | ${prefix}/share/glib-2.0/schemas 40 | 41 | 42 | 43 | ${prefix}/share/icons 44 | 45 | 46 | 47 | ${project}/org.gnome.Recipes.icns 48 | 49 | 50 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /osx/org.gnome.Recipes.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/osx/org.gnome.Recipes.icns -------------------------------------------------------------------------------- /osx/template.dmg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/osx/template.dmg.gz -------------------------------------------------------------------------------- /po-data/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically. 2 | ar 3 | cs 4 | de 5 | es 6 | eu 7 | fr 8 | fur 9 | hu 10 | id 11 | nl 12 | pt_BR 13 | sl 14 | sr 15 | sv 16 | uk 17 | zh_CN 18 | -------------------------------------------------------------------------------- /po-data/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | data/chefs.db.h 4 | data/recipes.db.h 5 | -------------------------------------------------------------------------------- /po-data/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files that should *not* be translated. 2 | # Please keep this file sorted alphabetically. 3 | data/org.gnome.Recipes.desktop.in 4 | data/appdata/org.gnome.Recipes.appdata.xml.in 5 | data/org.gnome.Recipes.gschema.xml 6 | src/chef-conflict-dialog.ui 7 | src/gr-category-tile.ui 8 | src/gr-chef-dialog.ui 9 | src/gr-chef-tile.ui 10 | src/gr-cooking-page.ui 11 | src/gr-cooking-view.ui 12 | src/gr-cuisine-page.ui 13 | src/gr-cuisines-page.ui 14 | src/gr-cuisine-tile.ui 15 | src/gr-details-page.ui 16 | src/gr-edit-page.ui 17 | src/gr-image-page.ui 18 | src/gr-image-viewer.ui 19 | src/gr-ingredients-viewer-row.ui 20 | src/gr-ingredients-viewer.ui 21 | src/gr-list-page.ui 22 | src/gr-query-editor.ui 23 | src/gr-recipes-page.ui 24 | src/gr-recipe-tile.ui 25 | src/gr-search-page.ui 26 | src/gr-shopping-page.ui 27 | src/gr-shopping-tile.ui 28 | src/gr-time-widget.ui 29 | src/gr-window.ui 30 | src/menus.ui 31 | src/recipe-conflict-dialog.ui 32 | src/recipe-export-dialog.ui 33 | src/recipe-surprise.ui 34 | src/recipe-whats-new-dialog.ui 35 | src/shopping-list-exporter-dialog.ui 36 | src/gr-about-dialog.c 37 | src/gr-account.c 38 | src/gr-app.c 39 | src/gr-category-tile.c 40 | src/gr-chef.c 41 | src/gr-chef-dialog.c 42 | src/gr-chef-tile.c 43 | src/gr-cooking-page.c 44 | src/gr-cooking-view.c 45 | src/gr-cuisine.c 46 | src/gr-cuisine-page.c 47 | src/gr-cuisines-page.c 48 | src/gr-cuisine-tile.c 49 | src/gr-details-page.c 50 | src/gr-diet.c 51 | src/gr-diet-row.c 52 | src/gr-edit-page.c 53 | src/gr-gourmet-format.c 54 | src/gr-image.c 55 | src/gr-image-page.c 56 | src/gr-image-viewer.c 57 | src/gr-ingredient.c 58 | src/gr-ingredients-list.c 59 | src/gr-ingredients-viewer-row.c 60 | src/gr-list-page.c 61 | src/gr-meal.c 62 | src/gr-number.c 63 | src/gr-query-editor.c 64 | src/gr-recipe.c 65 | src/gr-recipe-exporter.c 66 | src/gr-recipe-formatter.c 67 | src/gr-recipe-importer.c 68 | src/gr-recipe-printer.c 69 | src/gr-recipes-page.c 70 | src/gr-recipe-store.c 71 | src/gr-recipe-tile.c 72 | src/gr-search-page.c 73 | src/gr-season.c 74 | src/gr-shopping-list-exporter.c 75 | src/gr-shopping-list-formatter.c 76 | src/gr-shopping-list-printer.c 77 | src/gr-shopping-page.c 78 | src/gr-shopping-tile.c 79 | src/gr-spice-row.c 80 | src/gr-unit.c 81 | src/gr-utils.c 82 | src/gr-window.c 83 | src/ingredients.inc 84 | src/no-ingredients.inc 85 | -------------------------------------------------------------------------------- /po-data/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext('gnome-recipes-data', preset: 'glib') 2 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically. 2 | ar 3 | ca 4 | cs 5 | de 6 | en_GB 7 | es 8 | eu 9 | fi 10 | fr 11 | fur 12 | hi 13 | hr 14 | hu 15 | id 16 | ka 17 | kab 18 | ko 19 | nb 20 | nl 21 | pl 22 | pt_BR 23 | sk 24 | sr 25 | sl 26 | sv 27 | tr 28 | uk 29 | zh_CN 30 | zh_TW 31 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | data/org.gnome.Recipes.desktop.in 4 | data/appdata/org.gnome.Recipes.appdata.xml.in 5 | data/org.gnome.Recipes.gschema.xml 6 | src/chef-conflict-dialog.ui 7 | src/gr-category-tile.ui 8 | src/gr-chef-dialog.ui 9 | src/gr-chef-tile.ui 10 | src/gr-cooking-page.ui 11 | src/gr-cooking-view.ui 12 | src/gr-cuisine-page.ui 13 | src/gr-cuisines-page.ui 14 | src/gr-cuisine-tile.ui 15 | src/gr-details-page.ui 16 | src/gr-edit-page.ui 17 | src/gr-image-page.ui 18 | src/gr-image-viewer.ui 19 | src/gr-ingredients-viewer-row.ui 20 | src/gr-ingredients-viewer.ui 21 | src/gr-list-page.ui 22 | src/gr-query-editor.ui 23 | src/gr-recipes-page.ui 24 | src/gr-recipe-tile.ui 25 | src/gr-search-page.ui 26 | src/gr-shopping-page.ui 27 | src/gr-shopping-tile.ui 28 | src/gr-time-widget.ui 29 | src/gr-window.ui 30 | src/menus.ui 31 | src/recipe-conflict-dialog.ui 32 | src/recipe-export-dialog.ui 33 | src/recipe-surprise.ui 34 | src/recipe-whats-new-dialog.ui 35 | src/shopping-list-exporter-dialog.ui 36 | src/gr-about-dialog.c 37 | src/gr-account.c 38 | src/gr-app.c 39 | src/gr-category-tile.c 40 | src/gr-chef.c 41 | src/gr-chef-dialog.c 42 | src/gr-chef-tile.c 43 | src/gr-cooking-page.c 44 | src/gr-cooking-view.c 45 | src/gr-cuisine.c 46 | src/gr-cuisine-page.c 47 | src/gr-cuisines-page.c 48 | src/gr-cuisine-tile.c 49 | src/gr-details-page.c 50 | src/gr-diet.c 51 | src/gr-diet-row.c 52 | src/gr-edit-page.c 53 | src/gr-gourmet-format.c 54 | src/gr-image.c 55 | src/gr-image-page.c 56 | src/gr-image-viewer.c 57 | src/gr-ingredient.c 58 | src/gr-ingredients-list.c 59 | src/gr-ingredients-viewer-row.c 60 | src/gr-list-page.c 61 | src/gr-meal.c 62 | src/gr-number.c 63 | src/gr-query-editor.c 64 | src/gr-recipe.c 65 | src/gr-recipe-exporter.c 66 | src/gr-recipe-formatter.c 67 | src/gr-recipe-importer.c 68 | src/gr-recipe-printer.c 69 | src/gr-recipes-page.c 70 | src/gr-recipe-store.c 71 | src/gr-recipe-tile.c 72 | src/gr-search-page.c 73 | src/gr-season.c 74 | src/gr-shopping-list-exporter.c 75 | src/gr-shopping-list-formatter.c 76 | src/gr-shopping-list-printer.c 77 | src/gr-shopping-page.c 78 | src/gr-shopping-tile.c 79 | src/gr-spice-row.c 80 | src/gr-unit.c 81 | src/gr-utils.c 82 | src/gr-window.c 83 | src/ingredients.inc 84 | src/no-ingredients.inc 85 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files that should *not* be translated. 2 | # Please keep this file sorted alphabetically. 3 | data/chefs.db.h 4 | data/recipes.db.h 5 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext('gnome-recipes', preset: 'glib') 2 | -------------------------------------------------------------------------------- /recipes.doap: -------------------------------------------------------------------------------- 1 | 6 | 7 | Recipes 8 | GNOME likes to cook 9 | 10 | An easy to use app that will help you to discover what to cook today, tomorrow, 11 | the rest of the week and for your special occasions. 12 | 13 | C 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Matthias Clasen 22 | 23 | matthiasc 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/built-with-builder-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/built-with-builder-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/category.css: -------------------------------------------------------------------------------- 1 | .tile.view.color-tile0 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #215d9c; } 2 | .tile.view.color-tile1 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #297bcc; } 3 | .tile.view.color-tile2 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #c4a000; } 4 | .tile.view.color-tile3 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #75505b; } 5 | .tile.view.color-tile4 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #cc0000; } 6 | .tile.view.color-tile5 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #4e9a06; } 7 | .tile.view.color-tile6 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #9c29ca; } 8 | .tile.view.color-tile7 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #729fcf; } 9 | .tile.view.color-tile8 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #ac5500; } 10 | .tile.view.color-tile9 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #2944cc; } 11 | .tile.view.color-tile10 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #44cc29; } 12 | .tile.view.color-tile11 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #00cc00; } 13 | .tile.view.color-tile12 { border-bottom-width: 3px; border-bottom-style: solid; border-bottom-color: #a000c4; } 14 | -------------------------------------------------------------------------------- /src/gr-about-dialog.h: -------------------------------------------------------------------------------- 1 | /* gr-about-dialog.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_ABOUT_DIALOG (gr_about_dialog_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrAboutDialog, gr_about_dialog, GR, ABOUT_DIALOG, GtkAboutDialog) 30 | 31 | GrAboutDialog *gr_about_dialog_new (void); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /src/gr-account.h: -------------------------------------------------------------------------------- 1 | /* gr-account.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-chef.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | typedef void (* AccountInformationCallback) (const char *id, 30 | const char *name, 31 | const char *image_path, 32 | gpointer data, 33 | GError *error); 34 | 35 | void gr_account_get_information (GtkWindow *window, 36 | AccountInformationCallback callback, 37 | gpointer data, 38 | GDestroyNotify destroy); 39 | 40 | typedef void (*UserChefCallback) (GrChef *chef, 41 | gpointer data); 42 | 43 | void gr_ensure_user_chef (GtkWindow *window, 44 | UserChefCallback callback, 45 | gpointer data); 46 | 47 | G_END_DECLS 48 | -------------------------------------------------------------------------------- /src/gr-app.h: -------------------------------------------------------------------------------- 1 | /* gr-app.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GR_TYPE_APP (gr_app_get_type()) 27 | 28 | G_DECLARE_FINAL_TYPE (GrApp, gr_app, GR, APP, GtkApplication) 29 | 30 | GrApp *gr_app_new (void); 31 | SoupSession *gr_app_get_soup_session (GrApp *app); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /src/gr-appdata.h: -------------------------------------------------------------------------------- 1 | /* gr-appdata.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | typedef struct { 28 | char *version; 29 | GDateTime *date; 30 | GString *news; 31 | } ReleaseInfo; 32 | 33 | GPtrArray *get_release_info (const char *new_version, 34 | const char *old_version); 35 | 36 | G_END_DECLS 37 | -------------------------------------------------------------------------------- /src/gr-category-tile.h: -------------------------------------------------------------------------------- 1 | /* gr-category-tile.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_CATEGORY_TILE (gr_category_tile_get_type ()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrCategoryTile, gr_category_tile, GR, CATEGORY_TILE, GtkButton) 31 | 32 | GtkWidget *gr_category_tile_new (GrDiets diet); 33 | GtkWidget *gr_category_tile_new_with_label (const char *category, 34 | const char *label); 35 | GrDiets gr_category_tile_get_diet (GrCategoryTile *tile); 36 | const char *gr_category_tile_get_category (GrCategoryTile *tile); 37 | const char *gr_category_tile_get_label (GrCategoryTile *tile); 38 | 39 | G_END_DECLS 40 | -------------------------------------------------------------------------------- /src/gr-category-tile.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 38 | 39 | -------------------------------------------------------------------------------- /src/gr-chef-dialog.h: -------------------------------------------------------------------------------- 1 | /* gr-chef-dialog.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-chef.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_CHEF_DIALOG (gr_chef_dialog_get_type()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrChefDialog, gr_chef_dialog, GR, CHEF_DIALOG, GtkDialog) 32 | 33 | GrChefDialog *gr_chef_dialog_new (GrChef *chef, 34 | gboolean create); 35 | GrChef *gr_chef_dialog_get_chef (GrChefDialog *dialog); 36 | 37 | G_END_DECLS 38 | -------------------------------------------------------------------------------- /src/gr-chef-tile.h: -------------------------------------------------------------------------------- 1 | /* gr-chef-tile.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-chef.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_CHEF_TILE (gr_chef_tile_get_type ()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrChefTile, gr_chef_tile, GR, CHEF_TILE, GtkBox) 31 | 32 | GtkWidget *gr_chef_tile_new (GrChef *chef); 33 | GrChef *gr_chef_tile_get_chef (GrChefTile *tile); 34 | void gr_chef_tile_set_chef (GrChefTile *tile, 35 | GrChef *chef); 36 | 37 | G_END_DECLS 38 | -------------------------------------------------------------------------------- /src/gr-chef-tile.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | 37 | -------------------------------------------------------------------------------- /src/gr-chef.h: -------------------------------------------------------------------------------- 1 | /* gr-chef.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_CHEF (gr_chef_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrChef, gr_chef, GR, CHEF, GObject) 30 | 31 | GrChef *gr_chef_new (void); 32 | const char *gr_chef_get_id (GrChef *chef); 33 | const char *gr_chef_get_name (GrChef *chef); 34 | const char *gr_chef_get_fullname (GrChef *chef); 35 | const char *gr_chef_get_description (GrChef *chef); 36 | const char *gr_chef_get_image (GrChef *chef); 37 | gboolean gr_chef_is_readonly (GrChef *chef); 38 | 39 | const char *gr_chef_get_translated_description (GrChef *chef); 40 | 41 | G_END_DECLS 42 | -------------------------------------------------------------------------------- /src/gr-convert-units.h: -------------------------------------------------------------------------------- 1 | /* gr-chef.h: 2 | * 3 | * Copyright (C) 2016 Paxana Xander 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | 22 | #pragma once 23 | 24 | #include 25 | #include 26 | #include 27 | #include "gr-recipe.h" 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef enum { 32 | GR_TEMPERATURE_UNIT_CELSIUS = 0, 33 | GR_TEMPERATURE_UNIT_FAHRENHEIT = 1, 34 | GR_TEMPERATURE_UNIT_LOCALE = 2 35 | } GrTemperatureUnit; 36 | 37 | typedef enum { 38 | GR_PREFERRED_UNIT_METRIC = 0, 39 | GR_PREFERRED_UNIT_IMPERIAL = 1, 40 | GR_PREFERRED_UNIT_LOCALE = 2 41 | } GrPreferredUnit; 42 | 43 | GrTemperatureUnit gr_convert_get_temperature_unit (void); 44 | GrPreferredUnit gr_convert_get_volume_unit (void); 45 | GrPreferredUnit gr_convert_get_weight_unit (void); 46 | void gr_convert_temp (int *num, int *unit, int user_unit); 47 | void gr_convert_volume (double *amount, GrUnit *unit, GrPreferredUnit user_volume_unit); 48 | void gr_convert_weight (double *amount, GrUnit *unit, GrPreferredUnit user_weight_unit); 49 | void gr_convert_human_readable (double *amount, GrUnit *unit); 50 | void gr_convert_multiple_units (double *amount1, GrUnit *unit1, double *amount2, GrUnit *unit2); 51 | void gr_convert_format_for_display (GString *s, double a1, GrUnit u1, double a2, GrUnit u2); 52 | void gr_convert_format (GString *s, double amount, GrUnit unit); 53 | gboolean gr_parse_units (const char *text, double *amount, GrUnit *unit); 54 | 55 | G_END_DECLS 56 | -------------------------------------------------------------------------------- /src/gr-cooking-page.h: -------------------------------------------------------------------------------- 1 | /* gr-cooking-page.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3. 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_COOKING_PAGE (gr_cooking_page_get_type()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrCookingPage, gr_cooking_page, GR, COOKING_PAGE, GtkBox) 32 | 33 | GrCookingPage *gr_cooking_page_new (void); 34 | void gr_cooking_page_set_recipe (GrCookingPage *page, 35 | GrRecipe *recipe); 36 | void gr_cooking_page_start_cooking (GrCookingPage *page); 37 | void gr_cooking_page_timer_expired (GrCookingPage *page, 38 | int step); 39 | 40 | gboolean gr_cooking_page_handle_event (GrCookingPage *page, 41 | GdkEvent *event); 42 | 43 | void gr_cooking_page_show_notification (GrCookingPage *page, 44 | const char *text, 45 | int step); 46 | 47 | G_END_DECLS 48 | 49 | -------------------------------------------------------------------------------- /src/gr-cooking-view.h: -------------------------------------------------------------------------------- 1 | /* gr-cooking-view.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3. 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_COOKING_VIEW (gr_cooking_view_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrCookingView, gr_cooking_view, GR, COOKING_VIEW, GtkBox) 32 | 33 | GrCookingView *gr_cooking_view_new (void); 34 | void gr_cooking_view_set_data (GrCookingView *view, 35 | const char *recipe_id, 36 | const char *instructions, 37 | GPtrArray *images); 38 | int gr_cooking_view_get_n_steps (GrCookingView *view); 39 | int gr_cooking_view_get_step (GrCookingView *view); 40 | void gr_cooking_view_set_step (GrCookingView *view, 41 | int step); 42 | void gr_cooking_view_start (GrCookingView *view); 43 | void gr_cooking_view_stop (GrCookingView *view, 44 | gboolean stop_timers); 45 | void gr_cooking_view_forward (GrCookingView *view); 46 | void gr_cooking_view_next_step (GrCookingView *view); 47 | void gr_cooking_view_prev_step (GrCookingView *view); 48 | void gr_cooking_view_set_timer_box (GrCookingView *view, 49 | GtkWidget *box); 50 | void gr_cooking_view_timer_expired (GrCookingView *view, 51 | int step); 52 | gboolean gr_cooking_view_has_active_timers (GrCookingView *view); 53 | 54 | G_END_DECLS 55 | 56 | -------------------------------------------------------------------------------- /src/gr-cuisine-page.h: -------------------------------------------------------------------------------- 1 | /* gr-cuisine-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_CUISINE_PAGE (gr_cuisine_page_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrCuisinePage, gr_cuisine_page, GR, CUISINE_PAGE, GtkBox) 30 | 31 | GtkWidget *gr_cuisine_page_new (void); 32 | void gr_cuisine_page_set_cuisine (GrCuisinePage *self, 33 | const char *cuisine); 34 | 35 | G_END_DECLS 36 | -------------------------------------------------------------------------------- /src/gr-cuisine-tile.h: -------------------------------------------------------------------------------- 1 | /* gr-cuisine-tile.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_CUISINE_TILE (gr_cuisine_tile_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrCuisineTile, gr_cuisine_tile, GR, CUISINE_TILE, GtkButton) 30 | 31 | GtkWidget *gr_cuisine_tile_new (const char *cuisine, 32 | gboolean big); 33 | 34 | G_END_DECLS 35 | -------------------------------------------------------------------------------- /src/gr-cuisine-tile.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 60 | 61 | -------------------------------------------------------------------------------- /src/gr-cuisine.h: -------------------------------------------------------------------------------- 1 | /* gr-cuisine.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | const char **gr_cuisine_get_names (int *length); 28 | void gr_cuisine_get_data (const char *name, 29 | const char **title, 30 | const char **full_title, 31 | const char **description); 32 | char *gr_cuisine_get_css (const char *import_url); 33 | 34 | G_END_DECLS 35 | -------------------------------------------------------------------------------- /src/gr-cuisines-page.h: -------------------------------------------------------------------------------- 1 | /* gr-cuisines-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_CUISINES_PAGE (gr_cuisines_page_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrCuisinesPage, gr_cuisines_page, GR, CUISINES_PAGE, GtkBox) 30 | 31 | GtkWidget *gr_cuisines_page_new (void); 32 | 33 | void gr_cuisines_page_refresh (GrCuisinesPage *page); 34 | void gr_cuisines_page_unexpand (GrCuisinesPage *page); 35 | 36 | 37 | G_END_DECLS 38 | -------------------------------------------------------------------------------- /src/gr-details-page.h: -------------------------------------------------------------------------------- 1 | /* gr-details-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_DETAILS_PAGE (gr_details_page_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrDetailsPage, gr_details_page, GR, DETAILS_PAGE, GtkBox) 32 | 33 | GtkWidget *gr_details_page_new (void); 34 | 35 | void gr_details_page_set_recipe (GrDetailsPage *page, 36 | GrRecipe *recipe); 37 | GrRecipe *gr_details_page_get_recipe (GrDetailsPage *page); 38 | void gr_details_page_contribute_recipe (GrDetailsPage *page); 39 | 40 | G_END_DECLS 41 | -------------------------------------------------------------------------------- /src/gr-diet-row.h: -------------------------------------------------------------------------------- 1 | /* gr-diet-row.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_DIET_ROW (gr_diet_row_get_type()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrDietRow, gr_diet_row, GR, DIET_ROW, GtkListBoxRow) 32 | 33 | GrDietRow *gr_diet_row_new (GrDiets diet); 34 | 35 | void gr_diet_row_set_entry (GrDietRow *row, 36 | GdTaggedEntry *entry); 37 | 38 | char * gr_diet_row_get_search_term (GrDietRow *row); 39 | char * gr_diet_row_get_label (GrDietRow *row); 40 | const char *gr_diet_row_get_diet (GrDietRow *row); 41 | 42 | G_END_DECLS 43 | -------------------------------------------------------------------------------- /src/gr-diet-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | -------------------------------------------------------------------------------- /src/gr-diet.h: -------------------------------------------------------------------------------- 1 | /* gr-diet.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | G_BEGIN_DECLS 24 | 25 | typedef enum { /*< flags >*/ 26 | GR_DIET_GLUTEN_FREE = 1, 27 | GR_DIET_NUT_FREE = 2, 28 | GR_DIET_VEGAN = 4, 29 | GR_DIET_VEGETARIAN = 8, 30 | GR_DIET_MILK_FREE = 16, 31 | GR_DIET_HALAL = 32 32 | } GrDiets; 33 | 34 | 35 | const char *gr_diet_get_label (GrDiets diet); 36 | const char *gr_diet_get_description (GrDiets diet); 37 | 38 | G_END_DECLS 39 | -------------------------------------------------------------------------------- /src/gr-edit-page.h: -------------------------------------------------------------------------------- 1 | /* gr-edit-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_EDIT_PAGE (gr_edit_page_get_type ()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrEditPage, gr_edit_page, GR, EDIT_PAGE, GtkBox) 31 | 32 | GtkWidget *gr_edit_page_new (void); 33 | 34 | void gr_edit_page_clear (GrEditPage *page); 35 | void gr_edit_page_edit (GrEditPage *page, 36 | GrRecipe *recipe); 37 | gboolean gr_edit_page_save (GrEditPage *page); 38 | GrRecipe *gr_edit_page_get_recipe (GrEditPage *page); 39 | 40 | G_END_DECLS 41 | -------------------------------------------------------------------------------- /src/gr-gourmet-format.h: -------------------------------------------------------------------------------- 1 | /* gr-gourmet-format.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | GList *gr_gourmet_format_import (GFile *file, 26 | GError **error); 27 | 28 | G_END_DECLS 29 | -------------------------------------------------------------------------------- /src/gr-image-page.h: -------------------------------------------------------------------------------- 1 | /* gr-image-page.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3. 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_IMAGE_PAGE (gr_image_page_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrImagePage, gr_image_page, GR, IMAGE_PAGE, GtkBox) 30 | 31 | GrImagePage *gr_image_page_new (void); 32 | void gr_image_page_set_images (GrImagePage *page, 33 | GPtrArray *images); 34 | 35 | void gr_image_page_show_image (GrImagePage *page, 36 | int idx); 37 | 38 | G_END_DECLS 39 | 40 | -------------------------------------------------------------------------------- /src/gr-image-viewer.h: -------------------------------------------------------------------------------- 1 | /* gr-image-viewer.h 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3. 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_IMAGE_VIEWER (gr_image_viewer_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrImageViewer, gr_image_viewer, GR, IMAGE_VIEWER, GtkBox) 30 | 31 | GrImageViewer *gr_image_viewer_new (void); 32 | void gr_image_viewer_set_images (GrImageViewer *viewer, 33 | GPtrArray *images, 34 | int index); 35 | 36 | GPtrArray *gr_image_viewer_get_images (GrImageViewer *viewer); 37 | void gr_image_viewer_add_image (GrImageViewer *viewer); 38 | void gr_image_viewer_remove_image (GrImageViewer *viewer); 39 | void gr_image_viewer_rotate_image (GrImageViewer *viewer, 40 | int angle); 41 | 42 | void gr_image_viewer_show_image (GrImageViewer *viewer, 43 | int idx); 44 | int gr_image_viewer_get_index (GrImageViewer *viewer); 45 | void gr_image_viewer_persist_changes (GrImageViewer *viewer); 46 | void gr_image_viewer_revert_changes (GrImageViewer *viewer); 47 | 48 | G_END_DECLS 49 | 50 | -------------------------------------------------------------------------------- /src/gr-image.h: -------------------------------------------------------------------------------- 1 | /* gr-images.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_IMAGE (gr_image_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrImage, gr_image, GR, IMAGE, GObject) 31 | 32 | GrImage *gr_image_new (SoupSession *session, 33 | const char *id, 34 | const char *path); 35 | void gr_image_set_id (GrImage *image, 36 | const char *id); 37 | void gr_image_set_path (GrImage *image, 38 | const char *path); 39 | const char *gr_image_get_path (GrImage *image); 40 | char *gr_image_get_cache_path (GrImage *image); 41 | GdkPixbuf *gr_image_load_sync (GrImage *image, 42 | int width, 43 | int height, 44 | gboolean fit); 45 | 46 | typedef void (*GrImageCallback) (GrImage *ri, 47 | GdkPixbuf *pixbuf, 48 | gpointer data); 49 | 50 | void gr_image_load (GrImage *ri, 51 | int width, 52 | int height, 53 | gboolean fit, 54 | GCancellable *cancellable, 55 | GrImageCallback callback, 56 | gpointer data); 57 | 58 | void gr_image_set_pixbuf (GrImage *ri, 59 | GdkPixbuf *pixbuf, 60 | gpointer data); 61 | 62 | GPtrArray *gr_image_array_new (void); 63 | 64 | G_END_DECLS 65 | -------------------------------------------------------------------------------- /src/gr-ingredient-row.h: -------------------------------------------------------------------------------- 1 | /* gr-ingredient-row.h 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_INGREDIENT_ROW (gr_ingredient_row_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrIngredientRow, gr_ingredient_row, GR, INGREDIENT_ROW, GtkListBoxRow) 31 | 32 | GrIngredientRow *gr_ingredient_row_new (const char *ingredient); 33 | 34 | void gr_ingredient_row_set_entry (GrIngredientRow *row, 35 | GdTaggedEntry *entry); 36 | 37 | char * gr_ingredient_row_get_search_term (GrIngredientRow *row); 38 | char * gr_ingredient_row_get_label (GrIngredientRow *row); 39 | const char * gr_ingredient_row_get_ingredient (GrIngredientRow *row); 40 | const char * gr_ingredient_row_get_id (GrIngredientRow *row); 41 | const char * gr_ingredient_row_get_filter_term (GrIngredientRow *row); 42 | 43 | G_END_DECLS 44 | -------------------------------------------------------------------------------- /src/gr-ingredient-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | -------------------------------------------------------------------------------- /src/gr-ingredient.h: -------------------------------------------------------------------------------- 1 | /* gr-ingredient.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | const char **gr_ingredient_get_names (int *length); 28 | const char *gr_ingredient_find (const char *text); 29 | const char *gr_ingredient_get_id (const char *name); 30 | const char *gr_ingredient_get_negation (const char *name); 31 | 32 | G_END_DECLS 33 | -------------------------------------------------------------------------------- /src/gr-ingredients-list.h: -------------------------------------------------------------------------------- 1 | /* gr-ingredients-list.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-unit.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_INGREDIENTS_LIST (gr_ingredients_list_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrIngredientsList, gr_ingredients_list, GR, INGREDIENTS_LIST, GObject) 32 | 33 | GrIngredientsList *gr_ingredients_list_new (const char *text); 34 | 35 | gboolean gr_ingredients_list_validate (const char *text, 36 | GError **error); 37 | char *gr_ingredients_list_scale (GrIngredientsList *ingredients, 38 | int num, 39 | int denom); 40 | char *gr_ingredients_list_scale_unit (GrIngredientsList *ingredients, 41 | const char *segment, 42 | const char *ingredient, 43 | double scale); 44 | char **gr_ingredients_list_get_segments (GrIngredientsList *ingredients); 45 | char **gr_ingredients_list_get_ingredients (GrIngredientsList *ingredients, 46 | const char *segment); 47 | GrUnit gr_ingredients_list_get_unit (GrIngredientsList *list, 48 | const char *segment, 49 | const char *ingredient); 50 | double gr_ingredients_list_get_amount (GrIngredientsList *list, 51 | const char *segment, 52 | const char *ingredient); 53 | 54 | G_END_DECLS 55 | -------------------------------------------------------------------------------- /src/gr-ingredients-viewer-row.h: -------------------------------------------------------------------------------- 1 | /* gr-ingredients-viewer-row.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_INGREDIENTS_VIEWER_ROW (gr_ingredients_viewer_row_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrIngredientsViewerRow, gr_ingredients_viewer_row, GR, INGREDIENTS_VIEWER_ROW, GtkListBoxRow) 30 | 31 | GtkWidget *gr_ingredients_viewer_row_has_error (GrIngredientsViewerRow *row); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /src/gr-ingredients-viewer.h: -------------------------------------------------------------------------------- 1 | /* gr-ingredients-viewer.h 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3. 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_INGREDIENTS_VIEWER (gr_ingredients_viewer_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrIngredientsViewer, gr_ingredients_viewer, GR, INGREDIENTS_VIEWER, GtkBox) 30 | 31 | GtkWidget *gr_ingredients_viewer_has_error (GrIngredientsViewer *viewer); 32 | void gr_ingredients_viewer_set_drag_row (GrIngredientsViewer *viewer, 33 | GtkWidget *row); 34 | 35 | G_END_DECLS 36 | 37 | -------------------------------------------------------------------------------- /src/gr-list-page.h: -------------------------------------------------------------------------------- 1 | /* gr-list-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | #include "gr-chef.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_LIST_PAGE (gr_list_page_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrListPage, gr_list_page, GR, LIST_PAGE, GtkBox) 32 | 33 | GtkWidget *gr_list_page_new (void); 34 | 35 | void gr_list_page_populate_from_diet (GrListPage *self, 36 | GrDiets diet); 37 | void gr_list_page_populate_from_chef (GrListPage *self, 38 | GrChef *chef, 39 | gboolean show_shared); 40 | void gr_list_page_populate_from_season (GrListPage *self, 41 | const char *season); 42 | void gr_list_page_populate_from_favorites (GrListPage *self); 43 | void gr_list_page_populate_from_list (GrListPage *self, 44 | GList *recipes); 45 | void gr_list_page_populate_from_all (GrListPage *self); 46 | void gr_list_page_populate_from_new (GrListPage *self); 47 | void gr_list_page_clear (GrListPage *self); 48 | void gr_list_page_repopulate (GrListPage *self); 49 | void gr_list_page_set_show_shared (GrListPage *self, 50 | gboolean show_shared); 51 | 52 | typedef enum { 53 | SORT_BY_NAME, 54 | SORT_BY_RECENCY 55 | } GrSortKey; 56 | 57 | G_END_DECLS 58 | -------------------------------------------------------------------------------- /src/gr-logging.h: -------------------------------------------------------------------------------- 1 | /* gr-logging.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | GLogWriterOutput gr_log_writer (GLogLevelFlags log_level, 26 | const GLogField *fields, 27 | gsize n_fields, 28 | gpointer user_data); 29 | 30 | void gr_set_verbose_logging (gboolean verbose); 31 | 32 | G_END_DECLS 33 | -------------------------------------------------------------------------------- /src/gr-mail.h: -------------------------------------------------------------------------------- 1 | /* gr-mail.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | void gr_send_mail (GtkWindow *window, 28 | const char *address, 29 | const char *subject, 30 | const char *body, 31 | const char **attachments, 32 | GAsyncReadyCallback callback, 33 | gpointer user_data); 34 | gboolean gr_send_mail_finish (GAsyncResult *result, 35 | GError **error); 36 | 37 | G_END_DECLS 38 | -------------------------------------------------------------------------------- /src/gr-meal-row.h: -------------------------------------------------------------------------------- 1 | /* gr-meal-row.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_MEAL_ROW (gr_meal_row_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrMealRow, gr_meal_row, GR, MEAL_ROW, GtkListBoxRow) 31 | 32 | GrMealRow *gr_meal_row_new (const char *meal); 33 | 34 | void gr_meal_row_set_entry (GrMealRow *row, 35 | GdTaggedEntry *entry); 36 | 37 | const char *gr_meal_row_get_meal (GrMealRow *row); 38 | char * gr_meal_row_get_search_term (GrMealRow *row); 39 | char * gr_meal_row_get_label (GrMealRow *row); 40 | 41 | G_END_DECLS 42 | -------------------------------------------------------------------------------- /src/gr-meal-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | -------------------------------------------------------------------------------- /src/gr-meal.c: -------------------------------------------------------------------------------- 1 | /* gr-meal.c: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | #include 25 | 26 | #include "gr-meal.h" 27 | 28 | 29 | static const char *names[] = { 30 | "entree", 31 | "snacks", 32 | "breakfast", 33 | "side", 34 | "dessert", 35 | "cake", 36 | "drinks", 37 | "pizza", 38 | "pasta", 39 | "salad", 40 | "other", 41 | NULL 42 | }; 43 | 44 | static const char *titles[] = { 45 | N_("Main Course"), 46 | N_("Snacks"), 47 | N_("Breakfast"), 48 | N_("Side Dishes"), 49 | N_("Desserts"), 50 | N_("Cake and Baking"), 51 | N_("Drinks and Cocktails"), 52 | N_("Pizza"), 53 | N_("Pasta"), 54 | N_("Salad"), 55 | N_("Other") 56 | }; 57 | 58 | const char ** 59 | gr_meal_get_names (int *length) 60 | { 61 | if (length) 62 | *length = G_N_ELEMENTS (names) - 1; 63 | 64 | return names; 65 | } 66 | 67 | const char * 68 | gr_meal_get_title (const char *name) 69 | { 70 | int i; 71 | 72 | for (i = 0; i < G_N_ELEMENTS (names); i++) { 73 | if (g_strcmp0 (name, names[i]) == 0) { 74 | return _(titles[i]); 75 | } 76 | } 77 | 78 | return NULL; 79 | } 80 | -------------------------------------------------------------------------------- /src/gr-meal.h: -------------------------------------------------------------------------------- 1 | /* gr-meal.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | const char **gr_meal_get_names (int *length); 28 | const char *gr_meal_get_title (const char *name); 29 | 30 | G_END_DECLS 31 | -------------------------------------------------------------------------------- /src/gr-number.h: -------------------------------------------------------------------------------- 1 | /* gr-number.h 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | gboolean gr_number_parse (double *number, 26 | char **input, 27 | GError **error); 28 | char *gr_number_format (double number); 29 | 30 | 31 | 32 | G_END_DECLS 33 | -------------------------------------------------------------------------------- /src/gr-query-editor.h: -------------------------------------------------------------------------------- 1 | /* gr-query-editor.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_QUERY_EDITOR (gr_query_editor_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrQueryEditor, gr_query_editor, GR, QUERY_EDITOR, GtkSearchBar) 30 | 31 | GrQueryEditor *gr_query_editor_new (void); 32 | 33 | void gr_query_editor_set_query (GrQueryEditor *editor, 34 | const char *query); 35 | const char ** gr_query_editor_get_terms (GrQueryEditor *editor); 36 | void gr_query_editor_set_terms (GrQueryEditor *editor, 37 | const char **query); 38 | 39 | gboolean gr_query_editor_handle_event (GrQueryEditor *editor, 40 | GdkEvent *event); 41 | 42 | G_END_DECLS 43 | -------------------------------------------------------------------------------- /src/gr-recipe-exporter.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-exporter.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_RECIPE_EXPORTER (gr_recipe_exporter_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrRecipeExporter, gr_recipe_exporter, GR, RECIPE_EXPORTER, GObject) 31 | 32 | GrRecipeExporter *gr_recipe_exporter_new (GtkWindow *window); 33 | 34 | void gr_recipe_exporter_export (GrRecipeExporter *exporter, 35 | GrRecipe *recipe); 36 | 37 | void gr_recipe_exporter_contribute (GrRecipeExporter *exporter, 38 | GrRecipe *recipe); 39 | void gr_recipe_exporter_export_all (GrRecipeExporter *exporter, 40 | GFile *file); 41 | 42 | G_END_DECLS 43 | -------------------------------------------------------------------------------- /src/gr-recipe-formatter.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-formatter.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | char *gr_recipe_format (GrRecipe *recipe); 29 | 30 | typedef struct { 31 | char *text; 32 | int image; 33 | guint64 timer; 34 | char *title; 35 | } GrRecipeStep; 36 | 37 | GPtrArray *gr_recipe_parse_instructions (const char *instructions, 38 | gboolean format_for_display); 39 | 40 | G_END_DECLS 41 | -------------------------------------------------------------------------------- /src/gr-recipe-importer.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-importer.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_RECIPE_IMPORTER (gr_recipe_importer_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrRecipeImporter, gr_recipe_importer, GR, RECIPE_IMPORTER, GObject) 31 | 32 | GrRecipeImporter *gr_recipe_importer_new (GtkWindow *window); 33 | 34 | void gr_recipe_importer_import_from (GrRecipeImporter *importer, 35 | GFile *file); 36 | 37 | G_END_DECLS 38 | -------------------------------------------------------------------------------- /src/gr-recipe-printer.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-printer.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_RECIPE_PRINTER (gr_recipe_printer_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrRecipePrinter, gr_recipe_printer, GR, RECIPE_PRINTER, GObject) 31 | 32 | GrRecipePrinter *gr_recipe_printer_new (GtkWindow *window); 33 | 34 | void gr_recipe_printer_print (GrRecipePrinter *printer, 35 | GrRecipe *recipe); 36 | GFile *gr_recipe_printer_get_pdf (GrRecipePrinter *printer, 37 | GrRecipe *recipe); 38 | 39 | G_END_DECLS 40 | -------------------------------------------------------------------------------- /src/gr-recipe-tile.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-tile.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_RECIPE_TILE (gr_recipe_tile_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrRecipeTile, gr_recipe_tile, GR, RECIPE_TILE, GtkButton) 32 | 33 | GtkWidget *gr_recipe_tile_new (GrRecipe *recipe); 34 | GtkWidget *gr_recipe_tile_new_wide (GrRecipe *recipe); 35 | GrRecipe *gr_recipe_tile_get_recipe (GrRecipeTile *tile); 36 | void gr_recipe_tile_set_show_shared (GrRecipeTile *tile, 37 | gboolean show_shared); 38 | 39 | G_END_DECLS 40 | -------------------------------------------------------------------------------- /src/gr-recipe.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | #include "gr-diet.h" 26 | #include "gr-number.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GR_TYPE_RECIPE (gr_recipe_get_type()) 31 | 32 | G_DECLARE_FINAL_TYPE (GrRecipe, gr_recipe, GR, RECIPE, GObject) 33 | 34 | GrRecipe *gr_recipe_new (void); 35 | 36 | const char *gr_recipe_get_id (GrRecipe *recipe); 37 | const char *gr_recipe_get_name (GrRecipe *recipe); 38 | const char *gr_recipe_get_author (GrRecipe *recipe); 39 | const char *gr_recipe_get_description (GrRecipe *recipe); 40 | const char *gr_recipe_get_cuisine (GrRecipe *recipe); 41 | const char *gr_recipe_get_season (GrRecipe *recipe); 42 | const char *gr_recipe_get_category (GrRecipe *recipe); 43 | const char *gr_recipe_get_prep_time (GrRecipe *recipe); 44 | const char *gr_recipe_get_cook_time (GrRecipe *recipe); 45 | GrDiets gr_recipe_get_diets (GrRecipe *recipe); 46 | const char *gr_recipe_get_ingredients (GrRecipe *recipe); 47 | const char *gr_recipe_get_instructions (GrRecipe *recipe); 48 | const char *gr_recipe_get_notes (GrRecipe *recipe); 49 | gboolean gr_recipe_contains_garlic (GrRecipe *recipe); 50 | gboolean gr_recipe_contains_dairy (GrRecipe *recipe); 51 | gboolean gr_recipe_contains_gluten (GrRecipe *recipe); 52 | int gr_recipe_get_spiciness (GrRecipe *recipe); 53 | int gr_recipe_get_default_image (GrRecipe *recipe); 54 | GDateTime *gr_recipe_get_ctime (GrRecipe *recipe); 55 | GDateTime *gr_recipe_get_mtime (GrRecipe *recipe); 56 | gboolean gr_recipe_is_readonly (GrRecipe *recipe); 57 | gboolean gr_recipe_is_contributed (GrRecipe *recipe); 58 | GPtrArray *gr_recipe_get_images (GrRecipe *recipe); 59 | const char *gr_recipe_get_yield_unit (GrRecipe *recipe); 60 | double gr_recipe_get_yield (GrRecipe *recipe); 61 | 62 | const char *gr_recipe_get_translated_name (GrRecipe *recipe); 63 | const char *gr_recipe_get_translated_description (GrRecipe *recipe); 64 | const char *gr_recipe_get_translated_instructions (GrRecipe *recipe); 65 | const char *gr_recipe_get_translated_notes (GrRecipe *recipe); 66 | 67 | gboolean gr_recipe_matches (GrRecipe *recipe, 68 | const char **terms); 69 | 70 | G_END_DECLS 71 | -------------------------------------------------------------------------------- /src/gr-recipes-page.h: -------------------------------------------------------------------------------- 1 | /* gr-recipes-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_RECIPES_PAGE (gr_recipes_page_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrRecipesPage, gr_recipes_page, GR, RECIPES_PAGE, GtkBox) 30 | 31 | GtkWidget *gr_recipes_page_new (void); 32 | 33 | void gr_recipes_page_refresh (GrRecipesPage *page); 34 | void gr_recipes_page_unexpand (GrRecipesPage *page); 35 | 36 | G_END_DECLS 37 | -------------------------------------------------------------------------------- /src/gr-search-page.h: -------------------------------------------------------------------------------- 1 | /* gr-search-page.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_SEARCH_PAGE (gr_search_page_get_type ()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrSearchPage, gr_search_page, GR, SEARCH_PAGE, GtkBox) 30 | 31 | GtkWidget *gr_search_page_new (void); 32 | void gr_search_page_update_search (GrSearchPage *self, 33 | const char **terms); 34 | 35 | G_END_DECLS 36 | -------------------------------------------------------------------------------- /src/gr-season.c: -------------------------------------------------------------------------------- 1 | /* gr-season.c: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | #include 25 | 26 | #include "gr-season.h" 27 | 28 | 29 | static const char *names[] = { 30 | "thanksgiving", 31 | "christmas", 32 | "newyears", 33 | "spring", 34 | "summer", 35 | "fall", 36 | "winter", 37 | NULL 38 | }; 39 | 40 | static const char *titles[] = { 41 | N_("Thanksgiving"), 42 | N_("Christmas"), 43 | N_("New Year’s"), 44 | N_("Spring"), 45 | N_("Summer"), 46 | N_("Fall"), 47 | N_("Winter"), 48 | }; 49 | 50 | const char ** 51 | gr_season_get_names (int *length) 52 | { 53 | if (length) 54 | *length = G_N_ELEMENTS (names) - 1; 55 | 56 | return names; 57 | } 58 | 59 | const char * 60 | gr_season_get_title (const char *name) 61 | { 62 | int i; 63 | 64 | for (i = 0; i < G_N_ELEMENTS (names); i++) { 65 | if (g_strcmp0 (name, names[i]) == 0) { 66 | return _(titles[i]); 67 | } 68 | } 69 | 70 | return NULL; 71 | } 72 | -------------------------------------------------------------------------------- /src/gr-season.h: -------------------------------------------------------------------------------- 1 | /* gr-season.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | const char **gr_season_get_names (int *length); 28 | const char *gr_season_get_title (const char *name); 29 | 30 | G_END_DECLS 31 | -------------------------------------------------------------------------------- /src/gr-settings.c: -------------------------------------------------------------------------------- 1 | /* gr-settings.c: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | 25 | GSettings * 26 | gr_settings_get (void) 27 | { 28 | static GSettings *settings; 29 | 30 | if (settings == NULL) 31 | settings = g_settings_new ("org.gnome.Recipes"); 32 | 33 | return settings; 34 | } 35 | -------------------------------------------------------------------------------- /src/gr-settings.h: -------------------------------------------------------------------------------- 1 | /* gr-settings.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | GSettings *gr_settings_get (void); 28 | 29 | G_END_DECLS 30 | -------------------------------------------------------------------------------- /src/gr-shell-search-provider.h: -------------------------------------------------------------------------------- 1 | /* gr-shell-search-provider.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | #include "gr-recipe-store.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_SHELL_SEARCH_PROVIDER gr_shell_search_provider_get_type() 30 | 31 | G_DECLARE_FINAL_TYPE (GrShellSearchProvider, gr_shell_search_provider, GR, SHELL_SEARCH_PROVIDER, GObject) 32 | 33 | GrShellSearchProvider *gr_shell_search_provider_new (void); 34 | 35 | gboolean gr_shell_search_provider_register (GrShellSearchProvider *self, 36 | GDBusConnection *connection, 37 | GError **error); 38 | void gr_shell_search_provider_unregister (GrShellSearchProvider *self); 39 | 40 | G_END_DECLS 41 | -------------------------------------------------------------------------------- /src/gr-shopping-list-exporter.h: -------------------------------------------------------------------------------- 1 | /* gr-shopping-list-exporter.h: 2 | * 3 | * Copyright (C) 2017 Ekta Nandwani 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | #include "gr-shopping-list-printer.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_SHOPPING_LIST_EXPORTER (gr_shopping_list_exporter_get_type()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrShoppingListExporter, gr_shopping_list_exporter, GR, SHOPPING_LIST_EXPORTER, GObject) 32 | 33 | GrShoppingListExporter *gr_shopping_list_exporter_new (GtkWindow *window); 34 | 35 | void gr_shopping_list_exporter_export (GrShoppingListExporter *exporter, GList *items); 36 | 37 | void done_shopping_in_todoist (GrShoppingListExporter *exporter); 38 | 39 | void do_undo_in_todoist (GrShoppingListExporter *exporter, GList *items); 40 | G_END_DECLS -------------------------------------------------------------------------------- /src/gr-shopping-list-formatter.c: -------------------------------------------------------------------------------- 1 | /* gr-shopping-list-formatter.c: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | #include 25 | 26 | #include "gr-shopping-list-formatter.h" 27 | #include "gr-ingredients-list.h" 28 | #include "gr-image.h" 29 | #include "gr-chef.h" 30 | #include "gr-recipe-store.h" 31 | #include "gr-utils.h" 32 | 33 | char * 34 | gr_shopping_list_format (GList *recipes, 35 | GList *items) 36 | { 37 | GString *s; 38 | GList *l; 39 | 40 | s = g_string_new (""); 41 | 42 | g_string_append_printf (s, "*** %s ***\n", _("Shopping List")); 43 | g_string_append (s, "\n"); 44 | g_string_append_printf (s, "%s\n", _("For the following recipes:")); 45 | for (l = recipes; l; l = l->next) { 46 | GrRecipe *recipe = l->data; 47 | g_string_append_printf (s, "%s\n", gr_recipe_get_translated_name (recipe)); 48 | } 49 | 50 | for (l = items; l; l = l->next) { 51 | ShoppingListItem *item = l->data; 52 | g_string_append (s, "\n"); 53 | g_string_append_printf (s, "%s %s", item->amount, item->name); 54 | } 55 | 56 | return g_string_free (s, FALSE); 57 | } 58 | -------------------------------------------------------------------------------- /src/gr-shopping-list-formatter.h: -------------------------------------------------------------------------------- 1 | /* gr-shopping-list-formatter.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | #include "gr-shopping-list-printer.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | char *gr_shopping_list_format (GList *recipes, 30 | GList *items); 31 | 32 | G_END_DECLS 33 | -------------------------------------------------------------------------------- /src/gr-shopping-list-printer.h: -------------------------------------------------------------------------------- 1 | /* gr-shopping-list-printer.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_SHOPPING_LIST_PRINTER (gr_shopping_list_printer_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrShoppingListPrinter, gr_shopping_list_printer, GR, SHOPPING_LIST_PRINTER, GObject) 31 | 32 | GrShoppingListPrinter *gr_shopping_list_printer_new (GtkWindow *window); 33 | 34 | typedef struct { 35 | char *amount; 36 | char *name; 37 | } ShoppingListItem; 38 | 39 | void gr_shopping_list_printer_print (GrShoppingListPrinter *printer, 40 | GList *recipes, 41 | GList *items); 42 | 43 | G_END_DECLS 44 | -------------------------------------------------------------------------------- /src/gr-shopping-page.h: -------------------------------------------------------------------------------- 1 | /* gr-shopping-page.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include "gr-recipe.h" 25 | #include "gr-chef.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_SHOPPING_PAGE (gr_shopping_page_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrShoppingPage, gr_shopping_page, GR, SHOPPING_PAGE, GtkBox) 32 | 33 | GtkWidget *gr_shopping_page_new (void); 34 | 35 | GList * get_ingredients (GrShoppingPage *page); 36 | 37 | void gr_shopping_page_populate (GrShoppingPage *self); 38 | 39 | gboolean gr_send_mail_finish (GAsyncResult *result, GError **error); 40 | 41 | void item_free (gpointer data); 42 | 43 | G_END_DECLS 44 | -------------------------------------------------------------------------------- /src/gr-shopping-tile.h: -------------------------------------------------------------------------------- 1 | /* gr-recipe-small-tile.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "gr-recipe.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GR_TYPE_SHOPPING_TILE (gr_shopping_tile_get_type ()) 30 | 31 | G_DECLARE_FINAL_TYPE (GrShoppingTile, gr_shopping_tile, GR, SHOPPING_TILE, GtkButton) 32 | 33 | GtkWidget *gr_shopping_tile_new (GrRecipe *recipe, 34 | double yield); 35 | GrRecipe *gr_shopping_tile_get_recipe (GrShoppingTile *tile); 36 | double gr_shopping_tile_get_yield (GrShoppingTile *tile); 37 | void gr_shopping_tile_set_yield (GrShoppingTile *tile, 38 | double yield); 39 | 40 | G_END_DECLS 41 | -------------------------------------------------------------------------------- /src/gr-spice-row.h: -------------------------------------------------------------------------------- 1 | /* gr-spice-row.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GR_TYPE_SPICE_ROW (gr_spice_row_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE (GrSpiceRow, gr_spice_row, GR, SPICE_ROW, GtkListBoxRow) 31 | 32 | GrSpiceRow *gr_spice_row_new (const char *spice, 33 | gboolean less); 34 | 35 | void gr_spice_row_set_entry (GrSpiceRow *row, 36 | GdTaggedEntry *entry); 37 | 38 | const char *gr_spice_row_get_spice (GrSpiceRow *row); 39 | char * gr_spice_row_get_search_term (GrSpiceRow *row); 40 | char * gr_spice_row_get_label (GrSpiceRow *row); 41 | 42 | G_END_DECLS 43 | -------------------------------------------------------------------------------- /src/gr-spice-row.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 33 | 34 | -------------------------------------------------------------------------------- /src/gr-time-widget.h: -------------------------------------------------------------------------------- 1 | /* gr-time-widget.h: 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_TIME_WIDGET (gr_time_widget_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrTimeWidget, gr_time_widget, GR, TIME_WIDGET, GtkOverlay) 30 | 31 | GrTimeWidget * gr_time_widget_new (void); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /src/gr-timer-widget.h: -------------------------------------------------------------------------------- 1 | /* gr-timer-widget.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_TIMER_WIDGET (gr_timer_widget_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrTimerWidget, gr_timer_widget, GR, TIMER_WIDGET, GtkWidget) 30 | 31 | GrTimerWidget * gr_timer_widget_new (void); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /src/gr-timer.h: -------------------------------------------------------------------------------- 1 | /* gr-timer.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GR_TYPE_TIMER (gr_timer_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE (GrTimer, gr_timer, GR, TIMER, GObject) 30 | 31 | GrTimer *gr_timer_new (const char *name); 32 | 33 | const char *gr_timer_get_name (GrTimer *timer); 34 | gboolean gr_timer_get_active (GrTimer *timer); 35 | guint64 gr_timer_get_start_time (GrTimer *timer); 36 | guint64 gr_timer_get_duration (GrTimer *timer); 37 | guint64 gr_timer_get_remaining (GrTimer *timer); 38 | void gr_timer_start (GrTimer *timer); 39 | void gr_timer_stop (GrTimer *timer); 40 | void gr_timer_reset (GrTimer *timer); 41 | 42 | G_END_DECLS 43 | 44 | -------------------------------------------------------------------------------- /src/gr-unit.h: -------------------------------------------------------------------------------- 1 | /* gr-unit.h 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | typedef enum { 26 | GR_UNIT_UNKNOWN, 27 | GR_UNIT_NONE, 28 | GR_UNIT_NUMBER, 29 | GR_UNIT_GRAM, 30 | GR_UNIT_KILOGRAM, 31 | GR_UNIT_POUND, 32 | GR_UNIT_OUNCE, 33 | GR_UNIT_LITER, 34 | GR_UNIT_DECILITER, 35 | GR_UNIT_MILLILITER, 36 | GR_UNIT_FLUID_OUNCE, 37 | GR_UNIT_PINT, 38 | GR_UNIT_QUART, 39 | GR_UNIT_GALLON, 40 | GR_UNIT_CUP, 41 | GR_UNIT_TABLESPOON, 42 | GR_UNIT_TEASPOON, 43 | GR_UNIT_BOX, 44 | GR_UNIT_PACKAGE, 45 | GR_UNIT_GLASS, 46 | GR_UNIT_MILLIMETER, 47 | GR_UNIT_CENTIMETER, 48 | GR_UNIT_METER, 49 | GR_UNIT_STONE, 50 | GR_UNIT_PINCH, 51 | GR_UNIT_BUNCH, 52 | GR_LAST_UNIT = GR_UNIT_BUNCH 53 | } GrUnit; 54 | 55 | typedef enum { 56 | GR_DIMENSION_NONE, 57 | GR_DIMENSION_DISCRETE, 58 | GR_DIMENSION_VOLUME, 59 | GR_DIMENSION_MASS, 60 | GR_DIMENSION_LENGTH 61 | } GrDimension; 62 | 63 | GrUnit gr_unit_parse (char **string, 64 | GError **error); 65 | 66 | const char **gr_unit_get_names (void); 67 | const char *gr_unit_get_name (GrUnit unit); 68 | const char *gr_unit_get_abbreviation (GrUnit unit); 69 | const char *gr_unit_get_display_name (GrUnit unit); 70 | const char *gr_unit_get_plural (GrUnit unit); 71 | GrDimension gr_unit_get_dimension (GrUnit unit); 72 | 73 | G_END_DECLS 74 | 75 | -------------------------------------------------------------------------------- /src/gr-utils.h: -------------------------------------------------------------------------------- 1 | /* gr-utils.h: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | GdkPixbuf *load_pixbuf_fit_size (const char *path, 28 | int width, 29 | int height, 30 | gboolean pad); 31 | GdkPixbuf *load_pixbuf_fill_size (const char *path, 32 | int width, 33 | int height); 34 | 35 | void pixbuf_blur (GdkPixbuf *src, 36 | int radius, 37 | int iterations); 38 | 39 | const char *get_pkg_data_dir (void); 40 | const char *get_user_data_dir (void); 41 | const char *get_user_cache_dir (void); 42 | 43 | void container_remove_all (GtkContainer *container); 44 | 45 | char * date_time_to_string (GDateTime *dt); 46 | GDateTime * date_time_from_string (const char *string); 47 | char * format_date_time_difference (GDateTime *end, GDateTime *start); 48 | 49 | gboolean skip_whitespace (char **input); 50 | gboolean space_or_nul (char p); 51 | 52 | char *translate_multiline_string (const char *s); 53 | 54 | char *generate_id (const char *s, ...); 55 | 56 | void start_recording (void); 57 | void stop_recording (void); 58 | void record_step (const char *blurb); 59 | 60 | gboolean in_flatpak_sandbox (void); 61 | gboolean portal_available (GtkWindow *window, 62 | const char *portal); 63 | 64 | typedef void (*WindowHandleExported) (GtkWindow *window, 65 | const char *handle, 66 | gpointer user_data); 67 | 68 | gboolean 69 | window_export_handle (GtkWindow *window, 70 | WindowHandleExported callback, 71 | gpointer user_data); 72 | 73 | void 74 | window_unexport_handle (GtkWindow *window); 75 | 76 | char *import_image (const char *path); 77 | char *rotate_image (const char *path, 78 | int angle); 79 | void remove_image (const char *path); 80 | 81 | void strv_remove (char ***strv_in, 82 | const char *s); 83 | void strv_prepend (char ***strv_in, 84 | const char *s); 85 | 86 | const char *get_version (void); 87 | -------------------------------------------------------------------------------- /src/help-cursor-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/help-cursor-keys.png -------------------------------------------------------------------------------- /src/help-esc-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/help-esc-key.png -------------------------------------------------------------------------------- /src/help-key-double-press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/help-key-double-press.png -------------------------------------------------------------------------------- /src/help-key-press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/help-key-press.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/dairy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/dairy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/egg-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/egg-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/garlic-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/garlic-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/shopping-list-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/shopping-list-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/spicy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/spicy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/16x16/apps/wheat-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/16x16/apps/wheat-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/dairy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/dairy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/egg-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/egg-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/garlic-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/garlic-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/shopping-list-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/shopping-list-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/spicy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/spicy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/24x24/apps/wheat-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/24x24/apps/wheat-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/dairy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/dairy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/egg-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/egg-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/garlic-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/garlic-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/shopping-list-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/shopping-list-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/spicy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/spicy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/32x32/apps/wheat-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/32x32/apps/wheat-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/dairy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/dairy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/egg-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/egg-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/garlic-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/garlic-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/shopping-list-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/shopping-list-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/spicy-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/spicy-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/48x48/apps/wheat-content-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/icons/48x48/apps/wheat-content-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/icons/symbolic/apps/egg-content-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | image/svg+xml 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/icons/symbolic/apps/spicy-content-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | image/svg+xml 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/list_to_c.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | 6 | ifile = sys.argv[1] 7 | ofile = sys.argv[2] 8 | prefix = sys.argv[3] 9 | 10 | i = open(ifile, 'r', encoding='utf-8') 11 | o = open(ofile, 'w', encoding='utf-8') 12 | 13 | out_templ = '\tN_("{prefix}{line}"),\n' 14 | values = {'prefix': prefix} 15 | for line in i.readlines(): 16 | values['line'] = line.strip() 17 | o.write(out_templ.format(**values)) 18 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | /* main.c: 2 | * 3 | * Copyright (C) 2016 Matthias Clasen 4 | * 5 | * Licensed under the GNU General Public License Version 3 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "gr-app.h" 29 | 30 | int 31 | main (int argc, char *argv[]) 32 | { 33 | g_autoptr (GApplication) app = NULL; 34 | int status; 35 | 36 | gd_ensure_types (); 37 | 38 | setlocale (LC_ALL, ""); 39 | bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); 40 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 41 | textdomain (GETTEXT_PACKAGE); 42 | 43 | bindtextdomain (GETTEXT_PACKAGE "-data", LOCALEDIR); 44 | bind_textdomain_codeset (GETTEXT_PACKAGE "-data", "UTF-8"); 45 | 46 | app = G_APPLICATION (gr_app_new ()); 47 | 48 | status = g_application_run (app, argc, argv); 49 | 50 | return status; 51 | } 52 | -------------------------------------------------------------------------------- /src/org.gnome.Recipes-symbolic.symbolic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/org.gnome.Recipes-symbolic.symbolic.png -------------------------------------------------------------------------------- /src/org.gnome.Recipes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/org.gnome.Recipes.png -------------------------------------------------------------------------------- /src/recipe-conflict-dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 1 6 | 1 7 | 8 | 9 | 1 10 | Cancel 11 | 12 | 13 | 14 | 15 | 1 16 | 0 17 | 1 18 | Rename 19 | 20 | 21 | 22 | 23 | 20 24 | 20 25 | 26 | 27 | 1 28 | A recipe with this name already exists. 29 | 30 | 31 | 32 | 33 | 1 34 | 10 35 | 36 | 37 | 1 38 | Name: 39 | 40 | 41 | 42 | 43 | 1 44 | 1 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | button_same 53 | button_rename 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/recipe-export-dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 1 6 | 0 7 | 1 8 | 420 9 | 280 10 | 11 | 12 | 1 13 | 1 14 | _Add More 15 | 16 | 17 | 18 | 19 | 1 20 | 1 21 | _Share 22 | 23 | 24 | 25 | 26 | 20 27 | 20 28 | 29 | 30 | 1 31 | 32 | 33 | 34 | 35 | 1 36 | never 37 | in 38 | 39 | 40 | 1 41 | none 42 | 43 | 44 | 45 | 46 | 1 47 | 48 | 49 | 50 | 51 | 1 52 | 20 53 | 54 | 55 | 1 56 | Share with a friend 57 | 58 | 59 | 60 | 61 | 1 62 | friend_button 63 | Contribute to the Recipes project 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | button_later 72 | button_now 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/recipe-whats-new-dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 400 6 | 600 7 | 0 8 | What’s New in Recipes 9 | 1 10 | 11 | 12 | 13 | 14 | 1 15 | never 16 | 600 17 | 18 | 19 | 1 20 | 20 21 | 20 22 | vertical 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/recipes-dark.css: -------------------------------------------------------------------------------- 1 | @import url("resource:///org/gnome/Recipes/recipes.css"); 2 | 3 | .note { 4 | background: #535e80; 5 | } 6 | 7 | .note label, 8 | .note image { 9 | color: #eeeeee; 10 | margin: 5px 0 5px 10px; 11 | } 12 | 13 | .note.content { 14 | background: #6f8194; 15 | padding: 10px; 16 | } 17 | 18 | .note:backdrop { 19 | color: #dddddd; 20 | background: #737680; 21 | } 22 | 23 | .note.content:backdrop { 24 | color: #cccccc; 25 | background: #868d94; 26 | } 27 | 28 | row.drag-icon { 29 | background: #232729; 30 | border: 1px solid alpha(white, 0.3); 31 | outline-width: 0; 32 | } 33 | -------------------------------------------------------------------------------- /src/recipes-light.css: -------------------------------------------------------------------------------- 1 | @import url("resource:///org/gnome/Recipes/recipes.css"); 2 | 3 | .note { 4 | background: #8091c4; 5 | } 6 | 7 | .note label, 8 | .note image { 9 | color: white; 10 | margin: 5px 0 5px 10px; 11 | } 12 | 13 | .note.content { 14 | background: #a8c3e1; 15 | padding: 10px; 16 | } 17 | 18 | .note:backdrop { 19 | background: #b1b6c4; 20 | } 21 | 22 | .note.content:backdrop { 23 | background: #cbd6e1; 24 | } 25 | 26 | row.drag-icon { 27 | background: white; 28 | border: 1px solid alpha(black, 0.3); 29 | outline-width: 0; 30 | } 31 | -------------------------------------------------------------------------------- /src/shell-search-provider-dbus-interfaces.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/surprise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/recipes/5b5526abf68c5e4337ba5d97a621af259c998c6d/src/surprise.jpg -------------------------------------------------------------------------------- /src/types.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include "config.h" 3 | #include "types.h" 4 | 5 | /*** END file-header ***/ 6 | 7 | /*** BEGIN file-production ***/ 8 | /* enumerations from "@filename@" */ 9 | /*** END file-production ***/ 10 | 11 | /*** BEGIN value-header ***/ 12 | GType 13 | @enum_name@_get_type (void) 14 | { 15 | static GType etype = 0; 16 | if (G_UNLIKELY(etype == 0)) { 17 | static const G@Type@Value values[] = { 18 | /*** END value-header ***/ 19 | 20 | /*** BEGIN value-production ***/ 21 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 22 | /*** END value-production ***/ 23 | 24 | /*** BEGIN value-tail ***/ 25 | { 0, NULL, NULL } 26 | }; 27 | etype = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); 28 | } 29 | return etype; 30 | } 31 | 32 | /*** END value-tail ***/ 33 | 34 | /*** BEGIN file-tail ***/ 35 | 36 | /*** END file-tail ***/ 37 | 38 | -------------------------------------------------------------------------------- /src/types.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #pragma once 3 | 4 | #include 5 | 6 | G_BEGIN_DECLS 7 | /*** END file-header ***/ 8 | 9 | /*** BEGIN file-production ***/ 10 | 11 | /* enumerations from "@filename@" */ 12 | 13 | #include "@filename@" 14 | 15 | /*** END file-production ***/ 16 | 17 | /*** BEGIN value-header ***/ 18 | GType @enum_name@_get_type (void) G_GNUC_CONST; 19 | #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) 20 | /*** END value-header ***/ 21 | 22 | /*** BEGIN file-tail ***/ 23 | G_END_DECLS 24 | 25 | /*** END file-tail ***/ 26 | ~ 27 | -------------------------------------------------------------------------------- /tests/id-data/ids.expected: -------------------------------------------------------------------------------- 1 | INPUT 'R_ Sylvia's_Bratkartoffeln _by_ sylvia' 2 | 3 | INPUT '2017's greatest «hot» [fish] soup' 4 | OUTPUT 2017_s_greatest_«hot»__fish__soup 5 | 6 | -------------------------------------------------------------------------------- /tests/id-data/ids.in: -------------------------------------------------------------------------------- 1 | R_ Sylvia's_Bratkartoffeln _by_ sylvia 2 | 2017's greatest «hot» [fish] soup 3 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-1.expected: -------------------------------------------------------------------------------- 1 | AMOUNT 1.000000 2 | UNIT 3 | NAME Apple 4 | 5 | AMOUNT 2.000000 6 | UNIT 7 | NAME Banana 8 | 9 | AMOUNT 3.000000 10 | UNIT box 11 | NAME nuts 12 | 13 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-1.in: -------------------------------------------------------------------------------- 1 | 1 apple 2 | 2 banana 3 | 3 box nuts 4 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-2.expected: -------------------------------------------------------------------------------- 1 | AMOUNT 0.500000 2 | UNIT lb 3 | NAME Butter 4 | 5 | AMOUNT 2.500000 6 | UNIT 7 | NAME Egg 8 | 9 | AMOUNT 15.000000 10 | UNIT 11 | NAME Salt 12 | 13 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-2.in: -------------------------------------------------------------------------------- 1 | 1/2 pound butter 2 | 2.5 egg 3 | 15 salt 4 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-3.expected: -------------------------------------------------------------------------------- 1 | AMOUNT 2.123000 2 | UNIT l 3 | NAME Wine 4 | 5 | AMOUNT 0.500000 6 | UNIT g 7 | NAME Nutmeg 8 | 9 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-3.in: -------------------------------------------------------------------------------- 1 | 2.123 l wine 2 | 1/2 g nutmeg 3 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-4.expected: -------------------------------------------------------------------------------- 1 | AMOUNT 1.000000 2 | UNIT g 3 | NAME Salt 4 | 5 | AMOUNT 2.000000 6 | UNIT kg 7 | NAME Salt 8 | 9 | AMOUNT 3.000000 10 | UNIT l 11 | NAME Wine 12 | 13 | AMOUNT 4.000000 14 | UNIT l 15 | NAME Milk 16 | 17 | AMOUNT 5.000000 18 | UNIT l 19 | NAME beer 20 | 21 | AMOUNT 1.000000 22 | UNIT lb 23 | NAME Ground beef 24 | 25 | AMOUNT 2.000000 26 | UNIT lb 27 | NAME Meat 28 | 29 | AMOUNT 0.500000 30 | UNIT box 31 | NAME sticks 32 | 33 | -------------------------------------------------------------------------------- /tests/ingredients-data/valid-4.in: -------------------------------------------------------------------------------- 1 | 1 g salt 2 | 2 kg salt 3 | 3 l wine 4 | 4 liter milk 5 | 5 liter beer 6 | 1 pound ground beef 7 | 2 pound meat 8 | 1/2 box sticks 9 | -------------------------------------------------------------------------------- /tests/meson.build: -------------------------------------------------------------------------------- 1 | tests_inc = [include_directories('../src'), top_inc] 2 | env = environment() 3 | env.set('G_TEST_SRCDIR', meson.current_source_dir()) 4 | env.set('G_TEST_BUILDDIR', meson.current_build_dir()) 5 | env.set('G_DEBUG', 'gc-friendly') 6 | env.set('MALLOC_CHECK_', '2') 7 | # FIXME: Add a meson helper to get a random number 8 | env.set('MALLOC_PERTURB_', '113') # Guaranteed random! 9 | 10 | ingredients = executable('ingredients', 'ingredients-test.c', src_incs, 11 | include_directories : tests_inc, 12 | dependencies: deps) 13 | test('ingredients', ingredients, env : env) 14 | 15 | number = executable('number', 'number.c', 16 | include_directories : tests_inc, 17 | link_with: librecipes, 18 | dependencies: deps) 19 | test('number', number, env : env) 20 | 21 | unit = executable('unit', 'unit.c', 22 | include_directories : tests_inc, 23 | link_with: librecipes, 24 | dependencies: deps) 25 | test('unit', unit, env : env) 26 | 27 | ids = executable('ids', 'ids.c', 28 | include_directories : tests_inc, 29 | link_with: librecipes, 30 | dependencies: deps) 31 | test('ids', ids, env : env) 32 | 33 | strv = executable('strv', 'strv.c', 34 | include_directories : tests_inc, 35 | link_with: librecipes, 36 | dependencies: deps) 37 | test('strv', strv, env : env) 38 | -------------------------------------------------------------------------------- /tests/number-data/number1.in: -------------------------------------------------------------------------------- 1 | # the following are all valid 2 | 123 3 | 123/201 4 | 10.11 5 | -0.001 6 | 1/1 7 | 1/2 8 | 1/3 9 | 2/6 10 | 1/0 11 | -1/1 12 | 1/-1 13 | -3/-4 14 | 15 | # vulgar fractions 16 | ¼ 17 | ½ 18 | ¾ 19 | ⅐ 20 | ⅑ 21 | ⅒ 22 | ⅓ 23 | ⅔ 24 | ⅕ 25 | ⅖ 26 | ⅗ 27 | ⅘ 28 | ⅙ 29 | ⅚ 30 | ⅛ 31 | ⅜ 32 | ⅝ 33 | ⅞ 34 | 35 | # our nice fractions 36 | 1/16 37 | 2/16 38 | 3/16 39 | 4/16 40 | 5/16 41 | 6/16 42 | 7/16 43 | 8/16 44 | 9/16 45 | 10/16 46 | 11/16 47 | 12/16 48 | 13/16 49 | 14/16 50 | 15/16 51 | 1/15 52 | 2/15 53 | 3/15 54 | 4/15 55 | 5/15 56 | 6/15 57 | 7/15 58 | 8/15 59 | 9/15 60 | 10/15 61 | 11/15 62 | 12/15 63 | 13/15 64 | 14/15 65 | 1/12 66 | 2/12 67 | 3/12 68 | 4/12 69 | 5/12 70 | 6/12 71 | 7/12 72 | 8/12 73 | 9/12 74 | 10/12 75 | 11/12 76 | 1/10 77 | 2/10 78 | 3/10 79 | 4/10 80 | 5/10 81 | 6/10 82 | 7/10 83 | 8/10 84 | 9/10 85 | 1/8 86 | 2/8 87 | 3/8 88 | 4/8 89 | 5/8 90 | 6/8 91 | 7/8 92 | 1/6 93 | 2/6 94 | 3/6 95 | 4/6 96 | 5/6 97 | 1/5 98 | 2/5 99 | 3/5 100 | 4/5 101 | 1/4 102 | 2/4 103 | 3/4 104 | 1/3 105 | 2/3 106 | 1/2 107 | 108 | # mixed numbers 109 | 1 1/2 110 | 2 23/47 111 | 1 ¼ 112 | 2 ½ 113 | 1 ½ 114 | 1¼ 115 | 2½ 116 | 117 | # now some invalid ones 118 | 10.11.12 119 | 1/2/3 120 | --2 121 | 10 11.12 122 | 123 | # empty text 124 | 125 | -------------------------------------------------------------------------------- /tests/strv.c: -------------------------------------------------------------------------------- 1 | /* strv.c 2 | * 3 | * Copyright (C) 2017 Matthias Clasen 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more &details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "config.h" 20 | #include 21 | #include 22 | #include 23 | #include "gr-utils.h" 24 | 25 | static void 26 | test_strv_prepend (void) 27 | { 28 | char **strv; 29 | 30 | strv = g_new0 (char *, 3); 31 | strv[0] = g_strdup ("b"); 32 | strv[1] = g_strdup ("c"); 33 | 34 | strv_prepend (&strv, "a"); 35 | 36 | g_assert (g_strv_length (strv) == 3); 37 | g_assert_cmpstr (strv[0], ==, "a"); 38 | g_assert_cmpstr (strv[1], ==, "b"); 39 | g_assert_cmpstr (strv[2], ==, "c"); 40 | 41 | g_strfreev (strv); 42 | 43 | strv = g_new0 (char *, 1); 44 | 45 | strv_prepend (&strv, "a"); 46 | 47 | g_assert (g_strv_length (strv) == 1); 48 | g_assert_cmpstr (strv[0], ==, "a"); 49 | 50 | g_strfreev (strv); 51 | } 52 | 53 | static void 54 | test_strv_remove (void) 55 | { 56 | char **strv; 57 | 58 | strv = g_new0 (char *, 4); 59 | strv[0] = g_strdup ("b"); 60 | strv[1] = g_strdup ("c"); 61 | strv[2] = g_strdup ("b"); 62 | 63 | strv_remove (&strv, "b"); 64 | 65 | g_assert (g_strv_length (strv) == 1); 66 | g_assert_cmpstr (strv[0], ==, "c"); 67 | 68 | strv_remove (&strv, "a"); 69 | 70 | g_assert (g_strv_length (strv) == 1); 71 | g_assert_cmpstr (strv[0], ==, "c"); 72 | 73 | strv_remove (&strv, "c"); 74 | 75 | g_assert (g_strv_length (strv) == 0); 76 | 77 | g_strfreev (strv); 78 | } 79 | 80 | int 81 | main (int argc, char *argv[]) 82 | { 83 | g_test_init (&argc, &argv, NULL); 84 | 85 | g_test_add_func ("/strv/prepend", test_strv_prepend); 86 | g_test_add_func ("/strv/remove", test_strv_remove); 87 | 88 | return g_test_run (); 89 | } 90 | -------------------------------------------------------------------------------- /tests/unit-data/unit1.expected: -------------------------------------------------------------------------------- 1 | INPUT 'gram' 2 | REST '' 3 | UNIT g 4 | NAME gram 5 | ABBREVIATION g 6 | 7 | INPUT 'g' 8 | REST '' 9 | UNIT g 10 | NAME gram 11 | ABBREVIATION g 12 | 13 | INPUT 'kilogram' 14 | REST '' 15 | UNIT kg 16 | NAME kilogram 17 | ABBREVIATION kg 18 | 19 | INPUT 'kg' 20 | REST '' 21 | UNIT kg 22 | NAME kilogram 23 | ABBREVIATION kg 24 | 25 | INPUT 'lb' 26 | REST '' 27 | UNIT lb 28 | NAME pound 29 | ABBREVIATION lb 30 | 31 | INPUT 'pound' 32 | REST '' 33 | UNIT lb 34 | NAME pound 35 | ABBREVIATION lb 36 | 37 | INPUT 'ounce' 38 | REST '' 39 | UNIT oz 40 | NAME ounce 41 | ABBREVIATION oz 42 | 43 | INPUT 'oz' 44 | REST '' 45 | UNIT oz 46 | NAME ounce 47 | ABBREVIATION oz 48 | 49 | INPUT 'liter' 50 | REST '' 51 | UNIT l 52 | NAME liter 53 | ABBREVIATION l 54 | 55 | INPUT 'l' 56 | REST '' 57 | UNIT l 58 | NAME liter 59 | ABBREVIATION l 60 | 61 | INPUT 'deciliter' 62 | REST '' 63 | UNIT dl 64 | NAME deciliter 65 | ABBREVIATION dl 66 | 67 | INPUT 'dl' 68 | REST '' 69 | UNIT dl 70 | NAME deciliter 71 | ABBREVIATION dl 72 | 73 | INPUT 'milliliter' 74 | REST '' 75 | UNIT ml 76 | NAME milliliter 77 | ABBREVIATION ml 78 | 79 | INPUT 'ml' 80 | REST '' 81 | UNIT ml 82 | NAME milliliter 83 | ABBREVIATION ml 84 | 85 | INPUT 'fluid ounce' 86 | REST '' 87 | UNIT fl oz 88 | NAME fluid ounce 89 | ABBREVIATION fl oz 90 | 91 | INPUT 'fl oz' 92 | REST '' 93 | UNIT fl oz 94 | NAME fluid ounce 95 | ABBREVIATION fl oz 96 | 97 | INPUT 'pint' 98 | REST '' 99 | UNIT pt 100 | NAME pint 101 | ABBREVIATION pt 102 | 103 | INPUT 'pt' 104 | REST '' 105 | UNIT pt 106 | NAME pint 107 | ABBREVIATION pt 108 | 109 | INPUT 'quart' 110 | REST '' 111 | UNIT qt 112 | NAME quart 113 | ABBREVIATION qt 114 | 115 | INPUT 'qt' 116 | REST '' 117 | UNIT qt 118 | NAME quart 119 | ABBREVIATION qt 120 | 121 | INPUT 'gallon' 122 | REST '' 123 | UNIT gal 124 | NAME gallon 125 | ABBREVIATION gal 126 | 127 | INPUT 'gal' 128 | REST '' 129 | UNIT gal 130 | NAME gallon 131 | ABBREVIATION gal 132 | 133 | INPUT 'cup' 134 | REST '' 135 | UNIT cup 136 | NAME cup 137 | ABBREVIATION cup 138 | 139 | INPUT 'tablespoon' 140 | REST '' 141 | UNIT tbsp 142 | NAME tablespoon 143 | ABBREVIATION tbsp 144 | 145 | INPUT 'tbsp' 146 | REST '' 147 | UNIT tbsp 148 | NAME tablespoon 149 | ABBREVIATION tbsp 150 | 151 | INPUT 'teaspoon' 152 | REST '' 153 | UNIT tsp 154 | NAME teaspoon 155 | ABBREVIATION tsp 156 | 157 | INPUT 'tsp' 158 | REST '' 159 | UNIT tsp 160 | NAME teaspoon 161 | ABBREVIATION tsp 162 | 163 | INPUT 'box' 164 | REST '' 165 | UNIT box 166 | NAME box 167 | ABBREVIATION box 168 | 169 | INPUT 'package' 170 | REST '' 171 | UNIT pkg 172 | NAME package 173 | ABBREVIATION pkg 174 | 175 | INPUT 'pkg' 176 | REST '' 177 | UNIT pkg 178 | NAME package 179 | ABBREVIATION pkg 180 | 181 | -------------------------------------------------------------------------------- /tests/unit-data/unit1.in: -------------------------------------------------------------------------------- 1 | gram 2 | g 3 | kilogram 4 | kg 5 | lb 6 | pound 7 | ounce 8 | oz 9 | liter 10 | l 11 | deciliter 12 | dl 13 | milliliter 14 | ml 15 | fluid ounce 16 | fl oz 17 | pint 18 | pt 19 | quart 20 | qt 21 | gallon 22 | gal 23 | cup 24 | tablespoon 25 | tbsp 26 | teaspoon 27 | tsp 28 | box 29 | package 30 | pkg 31 | -------------------------------------------------------------------------------- /tools/meson.build: -------------------------------------------------------------------------------- 1 | recipe_extract = executable('recipe-extract', 'recipe-extract.c', 2 | include_directories : top_inc, 3 | dependencies : dependency('glib-2.0', native: true), 4 | native : true) 5 | --------------------------------------------------------------------------------