diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce974f4e2152b74ac32787ebd8e11b6fd92de5a..67382dd2498f20ca38e8d19605f79dab2ac4bf97 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 helpman.desktop file + * helpman.appdata.xml file introduced for software manager description + * helpman.appdata.xml includes screenshots for the application + * setup.py updated for version numbers and included above file + * helpman.css introduced for theming + * Files appdata and desktop are renamed to specification + + +2.3 (06-May-2018) + +Features: + + * helpman script updated to load a css file for theming + + 2.2 (25-Apr-2018) Features: diff --git a/helpman b/helpman index 750469655b0eda02034b591402edd5e7921addc6..6744129f247e6f9bd88d92284a3f3d84fa6b8f09 100755 --- a/helpman +++ b/helpman @@ -139,10 +139,10 @@ builder.connect_signals(Handler()) window = builder.get_object("window1") textview = builder.get_object("textview1") textbuffer = textview.get_buffer() -textview.modify_font(Pango.FontDescription('Verdana 14')) +# textview.modify_font(Pango.FontDescription('Verdana 14')) -bgcolor = Gdk.RGBA() -bgcolor.parse('#edd2a4') +# bgcolor = Gdk.RGBA() +# bgcolor.parse('#edd2a4') # fgcolor = Gdk.RGBA() # fgcolor.parse('#AACCFF') @@ -150,21 +150,21 @@ bgcolor.parse('#edd2a4') # crcolor = Gdk.RGBA() # crcolor.parse('#FFFFFF') -textview.override_background_color(Gtk.StateFlags.NORMAL, bgcolor) +# textview.override_background_color(Gtk.StateFlags.NORMAL, bgcolor) # textview.override_color(Gtk.StateFlags.NORMAL, fgcolor) # textview.override_cursor(crcolor, fgcolor) manual_type_cbtext_I = builder.get_object("manual_type_cbtext_1") -manual_type_cbtext_I.modify_font(Pango.FontDescription('Verdana 14')) +# manual_type_cbtext_I.modify_font(Pango.FontDescription('Verdana 14')) manual_type_cbtext_I.grab_focus() starting_with_cbtext_II = builder.get_object("starting_with_cbtext_2") -starting_with_cbtext_II.modify_font(Pango.FontDescription('Verdana 14')) +# starting_with_cbtext_II.modify_font(Pango.FontDescription('Verdana 14')) select_manual_cbtext_III = builder.get_object("select_manual_cbtext_3") -select_manual_cbtext_III.modify_font(Pango.FontDescription('Verdana 14')) +# select_manual_cbtext_III.modify_font(Pango.FontDescription('Verdana 14')) # Following specifies the combo box text values and populates the same @@ -180,10 +180,27 @@ for y in default_textII: starting_with_cbtext_II.append_text(y) result = builder.get_object("result1") -result.modify_font(Pango.FontDescription('Verdana 14')) +# result.modify_font(Pango.FontDescription('Verdana 14')) smentry = builder.get_object("smentry1") -smentry.modify_font(Pango.FontDescription('Verdana 14')) +# smentry.modify_font(Pango.FontDescription('Verdana 14')) + +# Following sets the theme for the widgets + +# load CSS +style_provider = Gtk.CssProvider() +css = open('/usr/lib/helpman/helpman.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") +manual_type_cbtext_I.get_style_context().add_class("font_theme") +starting_with_cbtext_II.get_style_context().add_class("font_theme") +select_manual_cbtext_III.get_style_context().add_class("font_theme") +smentry.get_style_context().add_class("font_theme") ouraboutwindow = builder.get_object("aboutdialog1") window.connect("delete-event", Gtk.main_quit) diff --git a/helpman.css b/helpman.css new file mode 100644 index 0000000000000000000000000000000000000000..208cac49e96c932224f8a8c25a1a08f2972ddff3 --- /dev/null +++ b/helpman.css @@ -0,0 +1,28 @@ +.textview_theme { + background-color: #EDD2A4; + background: #EDD2A4; + color: black; + font-weight: normal; + font-size: 12pt; + font-family: Verdana; +} + +.result_theme { + background-color: #BAE9FF; + background: #BAE9FF; + color: black; + font-weight: normal; + font-size: 12pt; + font-family: Verdana; +} + +.font_theme { + font-weight: normal; + font-size: 12pt; + font-family: Verdana; +} + +.textview_theme:selected { + color: white; + background-color: orange; + } diff --git a/helpman.desktop b/helpman.desktop deleted file mode 100644 index fa37d676987ef681235537fd20fceca03dbca9e1..0000000000000000000000000000000000000000 --- a/helpman.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Helpman Manuals / Guides / Tutorials -Comment=quick & easy access to 4000+ manuals / guides / tutorials -Keywords=manuals;guides;tutorials -Exec=helpman -Icon=helpman -Terminal=false -Type=Application -StartupNotify=true -Categories=GNOME;GTK;Utility; diff --git a/org.gnome.helpman.appdata.xml b/org.gnome.helpman.appdata.xml new file mode 100644 index 0000000000000000000000000000000000000000..306a3ed27dcc2ae0f40169f32c13b0da60755c38 --- /dev/null +++ b/org.gnome.helpman.appdata.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<component type="desktop"> + <id>org.gnome.helpman.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-3.0+</project_license> + <name>Helpman</name> + <summary>Quick and Easy access to 4000+ manuals / guides / tutorials</summary> + <description> + <p> + Helpman provides a classified access to the manuals, installed by user/system + programs, automatically. It also supports typing a program / manual name, in + the Select Manual: text / combo box directly, to display it quickly. Error + Messages will be shown below, if a manual is not found. + </p> + <p> + The Manual Type list box, shows sections 1 to 8, useful for specific display + of a version of the manual. Say for example, if you see, CRON(8) in a manual, + it means the CRON manual in the 8th section. So users should choose + appropriately. + </p> + <p> + Please click the info button for more details. + </p> + <p>Features:</p> + <ul> + <li>Classified and Automatic Updation of New Manuals</li> + <li>GUI Display of Manuals makes back and forth navigation easier</li> + <li>It also makes copying text easier</li> + <li>Direct Searching of Manuals is possible too</li> + </ul> + </description> + <url type="homepage">https://git.fosscommunity.in/SRNathan/Helpman</url> + <screenshots> + <screenshot type="default"> + <image>http://screenshots.debian.net/screenshots/000/016/177/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/176/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/175/large.png</image> + </screenshot> + <screenshot> + <image>http://screenshots.debian.net/screenshots/000/016/174/large.png</image> + </screenshot> + </screenshots> + <project_group>Nathan</project_group> + <provides> + <binary>helpman</binary> + </provides> +</component> diff --git a/setup.py b/setup.py index 257d844f1c01bf6703c6a8a714c6ceab55570928..15fa8cfca1c3aa468f6de1d668fec231d58eccfe 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,17 @@ from setuptools import setup setup(name = "helpman", -version = "2.2", +version = "2.4", description = "quick & easy access to 4000+ manuals / guides / tutorials", author = "Nathan SR", author_email = "cquickcal@gmail.com", url = "https://git.fosscommunity.in/SRNathan/Helpman", license='GPLv3', scripts=['helpman'], -data_files = [ ("lib/helpman", ["helpman.glade"]), +data_files = [ ("lib/helpman", ["helpman.glade"]), +("lib/helpman", ["helpman.css"]), ("share/pixmaps", ["helpman.png"]), ("share/pixmaps", ["helpman_small.png"]), ("share/pixmaps", ["info_24x24.png"]), ("share/man/man1", ["helpman.1.gz"]), -("share/applications", ["helpman.desktop"]) ] ) +("share/metainfo", ["org.gnome.helpman.appdata.xml"]), +("share/applications", ["org.gnome.helpman.desktop"]) ] )