diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce974f4e2152b74ac32787ebd8e11b6fd92de5a..6e9928534f68e5453a698e6a87f3c4116e3f288a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. +2.4 (06-May-2018) + +Features: + + * Comment field updated in the quickcal.desktop file + * quickcal.appdata.xml file introduced for software manager description + * quickcal.appdata.xml includes screenshots for the application + * setup.py updated for version numbers and included above file + * quickcal.css introduced for theming + * Files appdata and desktop are renamed to specification + + +2.3 (06-May-2018) + +Features: + + * num script path updated in the quickcal script + + 2.2 (25-Apr-2018) Features: diff --git a/org.gnome.quickcal.appdata.xml b/org.gnome.quickcal.appdata.xml new file mode 100644 index 0000000000000000000000000000000000000000..39610477948d5b800b04dfa3e939864e9171ead6 --- /dev/null +++ b/org.gnome.quickcal.appdata.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<component type="desktop"> + <id>org.gnome.quickcal.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0+</project_license> + <name>Quickcal</name> + <summary>Fast and Easy to use Calculator with support for Filing</summary> + <description> + <p> + Quickcal accepts quick pasting of a large set of numbers, separated with + newlines or spaces or tabs and performs arithmetic / statistical calculations + based on the button or keyboard shortcut pressed. + </p> + <p> + As in other calculators, basic math can be performed too, with the +,-,*,/,%,^ + operators, in between numbers. Setting the scale allows for more decimals to + be displayed. Also, about 65 statistical calculations can be performed by + choosing an option from the more stats list box. + </p> + <p> + Filing and viewing support for history and tallying purpose, at the end of the + day, helpful for shopkeepers and others too. + </p> + <p>Features:</p> + <ul> + <li>Accepts Pasting of a Large Set of Numbers for Calculations</li> + <li>Keyboard Shortcuts for Buttons accelerate it further</li> + <li>No Need for typing Plus Signs for Summing Operations</li> + <li>Filing and Tallying possible at the End of Day or Shift</li> + </ul> + </description> + <url type="homepage">https://git.fosscommunity.in/SRNathan/Quickcal_Calculator</url> + <screenshots> + <screenshot type="default"> + <image>http://screenshots.debian.net/screenshots/000/016/173/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/172/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/171/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/170/large.png</image> + </screenshot> + </screenshots> + <project_group>Nathan</project_group> + <provides> + <binary>quickcal</binary> + </provides> +</component> diff --git a/quickcal.desktop b/org.gnome.quickcal.desktop similarity index 77% rename from quickcal.desktop rename to org.gnome.quickcal.desktop index 6d9c4ee71e2ce1bbbdce3541c37e3266efae398d..a1f3de81fcd4a8e8476209de317edbb47fea4ea3 100644 --- a/quickcal.desktop +++ b/org.gnome.quickcal.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Quickcal Calculator -Comment=Perform arithmetic, statistical calculations +Comment=Fast and Easy to use Calculator with support for Filing Keywords=calculation;arithmetic;calculator;statistical; Exec=quickcal Icon=quickcal diff --git a/quickcal b/quickcal index 668433cc07080073913b0210dd2fde350b653b90..234a0c92317cf7c343d52383972f0967bab78b74 100755 --- a/quickcal +++ b/quickcal @@ -25,6 +25,7 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi.repository import Pango +from gi.repository import Gdk import subprocess import re import os, errno @@ -105,7 +106,7 @@ def fileit(): g.write ('\n' + '\n' + result.get_text()) g.close() - result.set_text("Filed Successfully") + result.set_text("Filed Successfully in quickcal Home Folder") except IOError: result.set_text("Failed Writing to Inputs / Results file") @@ -160,7 +161,7 @@ class Handler: execute_command(dynamic_command) def comboboxtext1_changed(self, comboboxtext): - dynamic_command = " | num " + ourcomboboxtext.get_active_text() + " OFMT=\"%." + str(spinbutton.get_value_as_int()) + "f\"" + dynamic_command = " | /usr/bin/num " + ourcomboboxtext.get_active_text() + " OFMT=\"%." + str(spinbutton.get_value_as_int()) + "f\"" execute_command(dynamic_command) def clearbutton(self, button): @@ -190,7 +191,8 @@ builder.connect_signals(Handler()) window = builder.get_object("window1") textview = builder.get_object("textview1") textbuffer = textview.get_buffer() -textview.modify_font(Pango.FontDescription('Sans-serif 14')) +# textview.modify_font(Pango.FontDescription('Sans-serif 14')) +# textview.override_font(Pango.FontDescription('Sans-serif 14')) ourcomboboxtext = builder.get_object("comboboxtext1") # Following specifies the combo box text values and populates the same @@ -202,9 +204,24 @@ for x in default_text: spinbutton = builder.get_object("spinbutton1") result = builder.get_object("result1") -result.modify_font(Pango.FontDescription('Sans-serif 14')) +# result.modify_font(Pango.FontDescription('Sans-serif 14')) +# result.override_font(Pango.FontDescription('Sans-serif 14')) ouraboutwindow = builder.get_object("aboutdialog1") +# Following sets the fonts for the text based widgets + +# load CSS +style_provider = Gtk.CssProvider() +css = open('/usr/lib/quickcal/quickcal.css') +css_data = css.read() +css.close() +style_provider.load_from_data(bytes(css_data.encode())) +Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),style_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) + +textview.get_style_context().add_class("textview_theme") +result.get_style_context().add_class("result_theme") + + # Following checks / creates the quickcal home folder home=os.environ["HOME"] diff --git a/quickcal.css b/quickcal.css new file mode 100644 index 0000000000000000000000000000000000000000..24d8858abd90f3f38e5feab9897f9cfb02a3e7c0 --- /dev/null +++ b/quickcal.css @@ -0,0 +1,17 @@ +.textview_theme { + background-color: #EDD2A4; + background: #EDD2A4; + color: black; + font-weight: normal; + font-size: 16pt; + font-family: Sans-serif; +} + +.result_theme { + background-color: #EDD2A4; + background: #EDD2A4; + color: black; + font-weight: normal; + font-size: 16pt; + font-family: Sans-serif; +} diff --git a/setup.py b/setup.py index f89eb73aba553a8c2bd539bea139901968ccc92c..8cf775be489a9d89d9cfb4ab3b7fe258dcc62a31 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup setup(name = "quickcal", -version = "2.2", +version = "2.4", description = "fast and easy to use calculator with support for filing", author = "Nathan SR", author_email = "cquickcal@gmail.com", @@ -8,9 +8,11 @@ url = "https://git.fosscommunity.in/SRNathan/Quickcal_Calculator", license='GPLv3', scripts=['quickcal'], data_files = [ ("lib/quickcal", ["quickcal.glade"]), +("lib/quickcal", ["quickcal.css"]), ("share/pixmaps", ["quickcal.png"]), ("share/pixmaps", ["quickcal_small.png"]), ("share/man/man1", ["quickcal.1.gz"]), ("share/man/man1", ["num.1.gz"]), +("share/metainfo", ["org.gnome.quickcal.appdata.xml"]), ("bin", ["num"]), -("share/applications", ["quickcal.desktop"]) ] ) +("share/applications", ["org.gnome.quickcal.desktop"]) ] )