[Debian-islamic-commits] [hijra] 01/05: Imported Upstream version 0.4.1

أحمد المحمودي (Ahmed El-Mahmoudy) aelmahmoudy at users.sourceforge.net
Thu Oct 12 15:36:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

aelmahmoudy-guest pushed a commit to branch master
in repository hijra.

commit cbae3bac1f452e45239fc8df5f7fcde581c6fb4b
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
Date:   Thu Oct 12 15:15:46 2017 +0200

    Imported Upstream version 0.4.1
---
 HijriApplet                                 | 966 ++++++++++++++++------------
 HijriCal.py                                 |   2 +-
 LICENSE-ar.txt                              | 138 ----
 LICENSE-en                                  | 222 -------
 gnome-shell-extension/metadata.json         | 188 +++++-
 hijra-autostart.desktop                     |   3 +-
 hijra.py                                    |   2 +-
 hijra.spec                                  | 175 +++--
 setup.py                                    |   2 +-
 terminal/hijri                              | 286 ++++++++
 terminal/hijri.1.gz                         | Bin 0 -> 581 bytes
 "terminal/\331\207\330\254\330\261\331\212" | 213 ++++++
 waqf2-ar.pdf                                | Bin 0 -> 69252 bytes
 13 files changed, 1373 insertions(+), 824 deletions(-)

diff --git a/HijriApplet b/HijriApplet
index cd28f18..d879fc0 100755
--- a/HijriApplet
+++ b/HijriApplet
@@ -1,5 +1,6 @@
-#! /usr/bin/env python
+#!/usr/bin/python2
 # -*- coding: utf-8 -*-
+# -*- Mode: Python; py-indent-offset: 4 -*-
 """
 Hijri Tray Applet for GNOME (also works with KDE)
 Copyright (c) 2006-2011 Muayyad Saleh Alsadi<alsadi at gmail.com>
@@ -29,434 +30,599 @@ The algorith itself is not here, it's in another file called hijra.py
 # TODO: Implement configuration, ie. allow direction change, and setting first way of week
 
 import sys, os, os.path, time, re
-import pango, gobject, gtk
+import gi
+gi.require_version("Gtk", "3.0")
+from gi.repository import GObject, Gtk, Gdk
 
 import sys
 
-no_notify=False
+no_notify = True
 
-try: import pynotify
-except ImportError: no_notify=True
+try:
+    from gi.repository import require_version
+    require_version('Notify', '0.7')
+    from gi.repository import Notify as pynotify
+except ImportError:
+    no_notify=True
 
 from HijriCal import HijriCal
-cal=HijriCal()
-
-week_days=[ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ]
-months=[
+cal = HijriCal()
+
+Colors = [[(Gdk.Color(red=60909, green=60909, blue=60909),
+            Gdk.Color(red=11822, green=13364, blue=13878),
+            '#edededededed', '#2e2e34343636'),
+           (Gdk.Color(red=19018, green=37008, blue=55769),
+            Gdk.Color(red=65535, green=65535, blue=65535),
+            '#4a4a9090d9d9', 'wheat'),
+           (Gdk.Color(red=62708, green=62708, blue=62194),
+            Gdk.Color(red=42919, green=43947, blue=42919),
+            '#f4f4f4f4f2f2', '#a7a7ababa7a7')], 
+          [(Gdk.Color(red=11822, green=13364, blue=13878),
+           Gdk.Color(red=60909, green=60909, blue=60909),
+           '#2e2e34343636', '#edededededed'),
+          (Gdk.Color(red=65535, green=65535, blue=65535),
+           Gdk.Color(red=19018, green=37008, blue=55769),
+           '#ffffffffffff', '#4a4a9090d9d9'),
+          (Gdk.Color(red=60909, green=60909, blue=60909),
+            Gdk.Color(red=11822, green=13364, blue=13878),
+            '#edededededed', '#2e2e34343636')]]
+
+week_days = [ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ]
+months = [
   "محرم","صفر","ربيع الأول","ربيع الثاني",
   "جمادى الأولى","جمادى الثانية","رجب","شعبان",
   "رمضان","شوال","ذو القعدة","ذو الحجة"
   ]
-gmonths=[
-  "كانون ثاني", "شباط", "آذار", "نيسان",
-  "أيار", "حزيران","تموز","آب",
-  "أيلول", "تشرين أول", "تشرين ثاني", "كانون أول"
+gmonths = [
+  "كانون ثاني ( يناير )", "شباط ( فبراير )", "آذار ( مارس )", "نيسان ( أبريل )",
+  "أيار ( مايو )", "حزيران ( يونيو )","تموز ( يوليو )","آب ( أغسطس )",
+  "أيلول ( سبتمبر )", "تشرين أول ( أكتوبر )", "تشرين ثاني ( نوفمبر )", "كانون أول ( ديسمبر )"
   ]
 
 def wday_index(i):
-  ws=cal.get_week_start()
-  if (cal.get_direction()==1): return (i+ws) % 7
-  else: return ((6-i)+ws) % 7
+    ws = cal.get_week_start()
+    if (cal.get_direction() == 1):
+        return (i+ws) % 7
+    else:
+        return ((6-i)+ws) % 7
 
 def wday_from_index(i):
-  ws=cal.get_week_start()
-  if (cal.get_direction()==1): return (7+i-ws) % 7
-  else: return (6+ws-i)%7
+    ws = cal.get_week_start()
+    if (cal.get_direction() == 1):
+        return (7+i-ws) % 7
+    else:
+        return (6+ws-i)%7
 
 def guess_data_dir():
-  d=os.path.dirname(__file__)
-  dd=os.path.join(d, '..', 'share', 'hijra', 'hijra-data')
-  if os.path.isdir(dd): return dd
-  dd=os.path.join(d, 'hijra-data')
-  return dd
+    d = os.path.dirname(__file__)
+    dd = os.path.join(d, '..', 'share', 'hijra', 'hijra-data')
+    if os.path.isdir(dd):
+        return dd
+    dd = os.path.join(d, 'hijra-data')
+    return dd
 
 # Update icon file
 def update_icon_file(day,mth):
-  svg_fn = os.path.join(guess_data_dir(), "cal-template.svg")
-  if not os.path.isfile(svg_fn): return None
-  out_fn = os.path.expanduser('~/.hijra-icon.svg')
-  day_re = re.compile(r"""<!--// DAY STARTS HERE //-->(\d+)<!--// DAY ENDS HERE //-->""", re.M)
-  mth_re = re.compile(r"""<!--// MONTH STARTS HERE //-->(\d+)<!--// MONTH ENDS HERE //-->""", re.M)
-  svg_text = open(svg_fn, 'rt').read()
-  svg_text, n = mth_re.subn("%02d" % mth, svg_text)
-  svg_text, n = day_re.subn("%02d" % day, svg_text)
-  try: open(out_fn, 'wt+').write(svg_text)
-  except: return None
-  return out_fn
-
-
-class CalAbout(gtk.AboutDialog):
-  def __init__(self):
-    gtk.AboutDialog.__init__(self)
-    self.set_default_response(gtk.RESPONSE_CLOSE)
-    self.connect('delete-event', lambda w, *a: w.hide() or True)
-    self.connect('response', lambda w, *a: w.hide() or True)
-    try: self.set_program_name("Hijra")
-    except AttributeError: pass
-    self.set_name("Hijra")
-    #self.set_version(version)
-    self.set_copyright("Copyright (c) 2006-2008 Muayyad Saleh Alsadi <alsadi at gmail.com>")
-    self.set_comments("Hijri Islamic Calendar")
-    self.set_license("""
-      Released under terms on Waqf Public License.
-      This program is free software; you can redistribute it and/or modify
-      it under the terms of the latest version Waqf Public License as
-      published by Ojuba.org.
-
-      This program is distributed in the hope that it will be useful,
-      but WITHOUT ANY WARRANTY; without even the implied warranty of
-      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-      The Latest version of the license can be found on
-      "http://www.ojuba.org/wiki/waqf/license"
-
-""")
-    self.set_website("http://hijra.ojuba.org/")
-    self.set_website_label("http://hijra.ojuba.org")
-    self.set_authors(["Muayyad Saleh Alsadi <alsadi at ojuba.org>"])
-#  self.set_documenters(documenters)
-#  self.set_artists(artists)
-#  self.set_translator_credits(translator_credits)
-#  self.set_logo(logo)
-#  self.set_logo_icon_name(icon_name)
-
-
-class CalButton(gtk.Button):
-  def __init__(self, title=None, tooltip=None, img=None, ico_name=None, img_fn=None, stock=None):
-    gtk.Button.__init__(self)
-    if title: self.set_text(title)
-    if stock: img=gtk.Image(); img.set_from_stock(stock, gtk.ICON_SIZE_SMALL_TOOLBAR)
-    if img_fn: img=gtk.Image(); img.set_from_file(img_fn)
-    if ico_name: img=gtk.Image(); img.set_from_icon_name(ico_name)
-    if img: self.set_image(img)
-    if tooltip: self.set_tooltip_text(tooltip)
-    self.set_focus_on_click(False)
-
-
-class CalWindow(gtk.Window):
-  def __init__(self, cal):
-    self._first_time_show=False
-    self.cal=cal
-    self.about=CalAbout()
-    gtk.Window.__init__(self)
-    self.accel=gtk.AccelGroup()
-    self.add_accel_group(self.accel)
-    self.hide_on_delete()
-    #self.set_size_request(200, 300)
-    self.connect('delete-event', lambda w, *a: w.hide() or True)
-    vb=gtk.VBox(False,0); self.add(vb)
-    hb=gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
-    b=CalButton(tooltip="عام سابق", stock=gtk.STOCK_GOTO_FIRST)
-    hb.pack_start(b,False, False, 0)
-    b.connect('clicked', self.prev_year_cb)
-    b=CalButton(tooltip="شهر سابق", stock=gtk.STOCK_GO_BACK)
-    hb.pack_start(b,False, False, 0)
-    b.connect('clicked', self.prev_month_cb)
-    self.t=gtk.Label("...")
-    self.t.set_justify(gtk.JUSTIFY_CENTER)
-    hb.pack_start(self.t,True, True, 0)
-    b=CalButton(tooltip="شهر تالي", stock=gtk.STOCK_GO_FORWARD)
-    hb.pack_start(b,False, False, 0)
-    b.connect('clicked', self.next_month_cb)
-    b=CalButton(tooltip="عام تالي", stock=gtk.STOCK_GOTO_LAST)
-    hb.pack_start(b,False, False, 0)
-    b.connect('clicked', self.next_year_cb)
-    
-    hb=gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
-    grid = gtk.Table(7,6,True)
-    vb.pack_start(grid,True, True, 0)
-    self.fill_grid(grid)
-    
-    hb=gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
-    self.g_e=e=gtk.Entry()
-    e.set_width_chars(6)
-    e.set_tooltip_text("العام الجريجوري")
-    e.connect("activate", self.convert_cb)
-    hb.pack_start(e,False, False, 0)
-    img=gtk.Image(); img.set_from_stock(gtk.STOCK_CONVERT, gtk.ICON_SIZE_MENU)
-    hb.pack_start(img,False, False, 0)
-    self.h_e=e=gtk.Entry()
-    e.set_width_chars(6)
-    e.set_tooltip_text("العام الهجري")
-    hb.pack_start(e,False, False, 0)
-    img=gtk.Image(); img.set_from_stock(gtk.STOCK_JUMP_TO, gtk.ICON_SIZE_MENU)
-    hb.pack_start(img,False, False, 0)
-    e.connect("activate", self.jump_cb)
-    b=CalButton(tooltip="اليوم", stock=gtk.STOCK_REFRESH)
-    b.connect("clicked", self.today_cb)
-    hb.pack_start(b, False, False, 0)
-    b=CalButton(tooltip="حول", stock=gtk.STOCK_ABOUT)
-    b.connect("clicked", lambda *a: self.about.run())
-    hb.pack_start(b, False, False, 0)
-    
+    svg_fn = os.path.join(guess_data_dir(), "cal-template.svg")
+    if not os.path.isfile(svg_fn): return None
+    out_fn = os.path.expanduser('~/.hijra-icon.svg')
+    day_re = re.compile(r"""<!--// DAY STARTS HERE //-->(\d+)<!--// DAY ENDS HERE //-->""", re.M)
+    mth_re = re.compile(r"""<!--// MONTH STARTS HERE //-->(\d+)<!--// MONTH ENDS HERE //-->""", re.M)
+    svg_text = open(svg_fn, 'rt').read()
+    svg_text, n = mth_re.subn("%02d" % mth, svg_text)
+    svg_text, n = day_re.subn("%02d" % day, svg_text)
+    try:
+        open(out_fn, 'wt+').write(svg_text)
+    except:
+        return None
+    return out_fn
+
+
+class CalAbout(Gtk.AboutDialog):
+    def __init__(self, win):
+        Gtk.AboutDialog.__init__(self, parent = win)
+        self.set_default_response(Gtk.ResponseType.CLOSE)
+        self.connect('delete-event', lambda *a: self.hide())
+        self.connect('response', lambda *a: self.hide())
+        try:
+            self.set_program_name("التقويم الهجري")
+        except AttributeError:
+            pass
+        self.set_name("التقويم الهجري")
+        #self.set_version(version)
+        self.set_copyright("""
+            Copyright (c) 2006-2011 Muayyad Saleh Alsadi <alsadi at gmail.com>
+            Copyright (c) 2011-2017 Ojuba Team <http://ojuba.org>
+            """)
+        self.set_comments("Hijri Islamic Calendar")
+        self.set_license("""
+            Released under terms on Waqf Public License.
+            This program is free software; you can redistribute it and/or modify
+            it under the terms of the latest version Waqf Public License as
+            published by Ojuba.org.
+
+            This program is distributed in the hope that it will be useful,
+            but WITHOUT ANY WARRANTY; without even the implied warranty of
+            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+            The Latest version of the license can be found on
+            "http://www.ojuba.org/wiki/waqf/license"
+
+            """)
+        self.set_website("http://hijra.ojuba.org/")
+        self.set_website_label("http://hijra.ojuba.org")
+        self.set_authors(["Muayyad Saleh Alsadi <alsadi at ojuba.org>"])
+        #  self.set_documenters(documenters)
+        #  self.set_artists(artists)
+        #  self.set_translator_credits(translator_credits)
+        #  self.set_logo(logo)
+        #  self.set_logo_icon_name(icon_name)
+
+
+class CalButton(Gtk.Button):
+    def __init__(self,
+                 title=None,
+                 tooltip=None,
+                 img=None,
+                 ico_name=None,
+                 img_fn=None,
+                 stock=None):
+        Gtk.Button.__init__(self)
+        if title:
+            self.set_text(title)
+        if stock:
+            img = Gtk.Image()
+            img.set_from_stock(stock, Gtk.IconSize.SMALL_TOOLBAR)
+        if img_fn:
+            img = Gtk.Image()
+            img.set_from_file(img_fn)
+        if ico_name:
+            img = Gtk.Image()
+            img.set_from_icon_name(ico_name)
+        if img:
+            self.set_image(img)
+        if tooltip:
+            self.set_tooltip_text(tooltip)
+        self.set_focus_on_click(False)
+
+
+class CalWindow(Gtk.Window):
+    def __init__(self, cal, st):
+        Gtk.Window.__init__(self)
+        self._first_time_show = False
+        self.cal = cal
+        self.st = st
+        self.about = CalAbout(self)
+        self.set_resizable(False)
+        self.set_title("التقويم الهجري")
+        self.set_position(Gtk.WindowPosition.CENTER)
+        self.accel = Gtk.AccelGroup()
+        self.add_accel_group(self.accel)
+        self.hide_on_delete()
+        #self.set_size_request(200, 300)
+        self.connect('delete-event', lambda w, *a: w.hide() or True)
+        vb = Gtk.VBox(False,0); self.add(vb)
+        hb = Gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
+        b = CalButton(tooltip = "عام سابق", stock = Gtk.STOCK_GOTO_FIRST)
+        hb.pack_start(b,False, False, 0)
+        b.connect('clicked', self.prev_year_cb)
+        b = CalButton(tooltip = "شهر سابق", stock = Gtk.STOCK_GO_BACK)
+        hb.pack_start(b,False, False, 0)
+        b.connect('clicked', self.prev_month_cb)
+        self.t = Gtk.Label("...")
+        self.t.set_justify(Gtk.Justification.CENTER)
+        hb.pack_start(self.t, True, True, 0)
+        b = CalButton(tooltip = "شهر تالي", stock  =Gtk.STOCK_GO_FORWARD)
+        hb.pack_start(b,False, False, 0)
+        b.connect('clicked', self.next_month_cb)
+        b = CalButton(tooltip = "عام تالي", stock = Gtk.STOCK_GOTO_LAST)
+        hb.pack_start(b,False, False, 0)
+        b.connect('clicked', self.next_year_cb)
+
+        hb = Gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
+        grid = Gtk.Table(7,6,True)
+        vb.pack_start(grid,True, True, 0)
+        self.fill_grid(grid)
+
+        hb = Gtk.HBox(False,0); vb.pack_start(hb,False, False, 0)
+        self.g_e = e = Gtk.Entry()
+        e.set_width_chars(6)
+        e.set_tooltip_text("العام الجريجوري")
+        e.connect("activate", self.convert_cb)
+        hb.pack_start(e,False, False, 0)
+        img = Gtk.Image()
+        img.set_from_stock(Gtk.STOCK_CONVERT, Gtk.IconSize.MENU)
+        hb.pack_start(img,False, False, 0)
+        
+        self.h_e = e = Gtk.Entry()
+        e.set_width_chars(6)
+        e.set_tooltip_text("العام الهجري")
+        hb.pack_start(e,False, False, 0)
+        img = Gtk.Image()
+        img.set_from_stock(Gtk.STOCK_JUMP_TO, Gtk.IconSize.MENU)
+        hb.pack_start(img,False, False, 0)
+        
+        e.connect("activate", self.jump_cb)
+        b = CalButton(tooltip = "اليوم", stock = Gtk.STOCK_REFRESH)
+        b.connect("clicked", self.today_cb)
+        hb.pack_start(b, False, False, 0)
+        
+        b = CalButton(tooltip = "حول", stock = Gtk.STOCK_ABOUT)
+        b.connect("clicked", lambda *a: self.st.show_hide_cb(True))
+        hb.pack_start(b, False, False, 0)
+
+
+    def fill_grid(self, grid):
+        days_l = [None for i in range(7)]
+        cell = [[None for i in range(7)] for j in range(7)]
+        for i in range(7):
+            days_l[i] = Gtk.Label('...')
+            e = Gtk.EventBox(); e.add(days_l[i])
+            grid.attach(e, i, i+1, 0, 1,
+                        Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND,
+                        Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND,
+                        0, 0)
+        for n in range(42):
+            i = n%7
+            j = n/7
+            cell[j][i] = Gtk.Label("-")
+            cell[j][i].set_alignment(0.5,0.5)
+            cell[j][i].set_justify(Gtk.Justification.CENTER)
+            cell[j][i].set_tooltip_text('')
+
+            e = Gtk.EventBox()
+            e.add(cell[j][i])
+            grid.attach(e, i, i+1, j+1, j+2,
+                      Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND,
+                      Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND,
+                      0, 0)
+        self.cell = cell
+        self.days_l = days_l
     
-  def fill_grid(self, grid):
-    days_l=[None for i in range(7)]
-    cell=[[None for i in range(7)] for j in range(7)]
-    for i in range(7):
-      days_l[i]=gtk.Label('...')
-      e=gtk.EventBox(); e.add(days_l[i])
-      grid.attach(e, i, i+1, 0, 1, gtk.FILL | gtk.EXPAND,gtk.FILL | gtk.EXPAND, 0, 0)
-    for n in range(42):
-      i=n%7; j=n/7;
-      cell[j][i]=gtk.Label("-")
-      cell[j][i].set_alignment(0.5,0.5)
-      cell[j][i].set_justify(gtk.JUSTIFY_CENTER)
-      cell[j][i].set_tooltip_text(None)
-      e=gtk.EventBox(); e.add(cell[j][i])
-      grid.attach(e, i,i+1,j+1,j+2,gtk.FILL | gtk.EXPAND,gtk.FILL | gtk.EXPAND,0,0)
-    self.cell=cell
-    self.days_l=days_l
-    
-  def prev_year_cb(self, *a, **kw):
-    self.cal.goto_hijri_day(self.cal.Y-1, self.cal.M, 1);
-    self.update()
-
-  def next_year_cb(self, *a, **kw):
-    self.cal.goto_hijri_day(self.cal.Y+1, self.cal.M, 1);
-    self.update()
-
-  def prev_month_cb(self, *a, **kw):
-    Y,M,D=self.cal.Y, self.cal.M-1, 1
-    if (M<1): M=12; Y-=1
-    self.cal.goto_hijri_day(Y, M, 1)
-    self.update()
-
-  def next_month_cb(self, *a, **kw):
-    Y,M,D=self.cal.Y, self.cal.M+1, 1
-    if (M>12): M=1; Y+=1
-    self.cal.goto_hijri_day(Y, M, 1)
-    self.update()
-
-  def today_cb(self, *a, **kw):
-    self.cal.goto_today()
-    self.update()
-
-  def convert_cb(self, *a, **kw):
-    try: y=int(self.g_e.get_text())
-    except ValueError: return
-    self.cal.goto_gregorian_day(y,1,1)
-    self.h_e.set_text(str(self.cal.Y))
-    self.update()
-
-  def jump_cb(self, *a, **kw):
-    try: y=int(self.h_e.get_text())
-    except ValueError: return
-    self.cal.goto_hijri_day(y,1,1)
-    self.update()
-
-
-  def get_theme_colors(self):
-    # colors[is_holyday][normal selected inactive]=[fg,bg,fg_s,bg_s]
-    colors=[[[0 for i in 1,2,3,4] for j in 1,2,3] for k in 1,2]
-    for i,s in enumerate((gtk.STATE_NORMAL,gtk.STATE_SELECTED,gtk.STATE_INSENSITIVE)):
-      fg,bg=self.style.fg[s],self.style.bg[s]
-      colors[0][i]=bg,fg,bg.to_string(),fg.to_string()
-      colors[1][i]=fg,bg,fg.to_string(),bg.to_string()
-    self.colors=colors
-    return self.colors
-
-  def update(self):
-    colors=self.get_theme_colors()
-    if (self.cal.Y, self.cal.M)==self.cal.today[0:2]: self.cal.goto_today()
-    self.t.set_text(months[self.cal.M-1]+" "+str(self.cal.Y))
-    self.g_e.set_text(str(self.cal.gy))
-    self.h_e.set_text(str(self.cal.Y))
-    a=self.cal.get_array()
-    b=self.cal.get_g_array()
-    for i in range(7):
-      self.days_l[i].set_text(week_days[wday_index(i)])
-      # colors[is_holyday][normal selected inactive]=[fg,bg,fg_s,bg_s]
-      self.days_l[i].modify_fg(gtk.STATE_NORMAL,colors[1][1][0])
-      self.days_l[i].parent.modify_fg(gtk.STATE_NORMAL,colors[1][1][0])
-      self.days_l[i].parent.modify_bg(gtk.STATE_NORMAL,colors[1][1][1]);
-    holyday_col=wday_from_index((6+self.cal.get_week_start())%7)
-    for j in range(6): self.cell[j][holyday_col].parent.modify_bg(gtk.STATE_NORMAL,colors[1][1][1])
-    for n in range(42):
-      i=n%7; j=n/7;
-      if (a[j][i]):
-        if a[j][i]==self.cal.D: is_selected=0
-        else: is_selected=1
-        if i==holyday_col: is_holyday=1
-        else: is_holyday=0
-        self.cell[j][i].set_markup('<span size="large" weight="bold" foreground="%s" background="%s">%02d</span>\n<span size="small" weight="bold" foreground="grey">%02d/%02d</span>' % (
-          colors[is_holyday][is_selected][2],colors[is_holyday][is_selected][3],
-          a[j][i], b[j][i][0],b[j][i][1]))
-        h_str="%d من %s لعام %d هـ" % (a[j][i], months[self.cal.M-1], self.cal.Y)
-        g_str="%d من %s لعام %d م" % (b[j][i][0], gmonths[b[j][i][1]-1], b[j][i][2])
-        self.cell[j][i].set_tooltip_text("%s\n%s" % (h_str,g_str))
-      else: self.cell[j][i].set_text('-'); self.cell[j][i].set_tooltip_text(None)
-
-
-  def first_time_show(self):
-    self._first_time_show=True
-    if gtk.widget_get_default_direction()==gtk.TEXT_DIR_LTR:
-      self.cal.set_direction(-1) # LTR
-    else:
-      self.cal.set_direction(1) # RTL
-    self.update()
-
-  def show(self):
-    r=super(gtk.Window, self).show()
-    if not self._first_time_show: self.first_time_show()
-    return r
-
-  def show_all(self):
-    r=super(gtk.Window, self).show_all()
-    if not self._first_time_show: self.first_time_show()
-    return r
-
-
-class CalStatusIcon(gtk.StatusIcon):
-  def __init__(self, cal):
-    gtk.StatusIcon.__init__(self)
-    self.cal=cal
-    self.notify=None
-    if not no_notify:
-      pynotify.init('HijriApplet')
-      self.notify=pynotify.Notification("التقويم الهجري")
-
-    Y,M,D,W=self.cal.today
-    yy,mm,dd=self.cal.g_today
-    self.connect ('button-press-event', self.clicked_cb)
-    self.set_title("التقويم الهجري")
-    self.last_d_m="%02d/%02d" % (D,M)
-    self.set_tooltip_text("%s, %d من %s لعام %d" % (week_days[W], D, months[M-1], Y))
-    svg_fn=update_icon_file(D,M)
-    if svg_fn:
-      self.set_from_file(svg_fn)
-      gtk.window_set_default_icon_from_file(svg_fn)
-    else:
-      self.set_from_icon_name("stock_calendar")
-      gtk.window_set_default_icon_name('stock_calendar')
-    self.win=CalWindow(cal)
-    self.set_visible(True)
-    self.setup_popup_menu()
-    self.update_notify()
-    if not '--hidden' in sys.argv: self.win.show_all()
-    else: self.show_notify()
-    gobject.timeout_add(5000, self.update)
-
-  def update_notify(self):
-    if not self.notify: return
-    Y,M,D,W=self.cal.today
-    yy,mm,dd=self.cal.g_today
-    self.notify.set_property('icon-name','gtk-dialog-info')
-    self.notify.set_property('summary', "التقويم الهجري" )
-    self.notify.set_property('body', "%s, %d من %s لعام %d\nالموافق %d من %s لعام %s" % (week_days[W], D, months[M-1], Y,dd,gmonths[mm-1],yy) )
-    #self.notify.set_timeout(5)
+    def prev_year_cb(self, *a, **kw):
+        self.cal.goto_hijri_day(self.cal.Y-1, self.cal.M, 1)
+        self.update()
+
+    def next_year_cb(self, *a, **kw):
+        self.cal.goto_hijri_day(self.cal.Y+1, self.cal.M, 1)
+        self.update()
+
+    def prev_month_cb(self, *a, **kw):
+        Y, M, D = self.cal.Y, self.cal.M-1, 1
+        if (M < 1):
+            M = 12
+            Y -= 1
+        self.cal.goto_hijri_day(Y, M, 1)
+        self.update()
+
+    def next_month_cb(self, *a, **kw):
+        Y, M, D = self.cal.Y, self.cal.M+1, 1
+        if (M > 12):
+            M = 1
+            Y += 1
+        self.cal.goto_hijri_day(Y, M, 1)
+        self.update()
+
+    def today_cb(self, *a, **kw):
+        self.cal.goto_today()
+        self.update()
+
+    def convert_cb(self, *a, **kw):
+        try:
+            y = int(self.g_e.get_text())
+        except ValueError:
+            return
+        self.cal.goto_gregorian_day(y, 1, 1)
+        self.h_e.set_text(str(self.cal.Y))
+        self.update()
+
+    def jump_cb(self, *a, **kw):
+        try:
+            y = int(self.h_e.get_text())
+        except ValueError:
+            return
+        self.cal.goto_hijri_day(y, 1, 1)
+        self.update()
+
+
+    def get_theme_colors(self):
+        # colors[is_holyday][normal selected inactive]=[fg,bg,fg_s,bg_s]
+        self.colors = Colors
+        return self.colors
+        
+        colors = [[[0 for i in 1,2,3,4] for j in 1,2,3] for k in 1,2]
+        m = Gtk.Window.get_style(self)
+        if not m.bg:
+            self.colors = Colors
+            return self.colors
+        for i,s in enumerate((Gtk.StateType.NORMAL,
+                              Gtk.StateType.SELECTED,
+                              Gtk.StateType.INSENSITIVE)):
+            fg, bg = m.fg[s], m.bg[s]
+            colors[0][i] = bg, fg, bg.to_string(), fg.to_string()
+            
+            colors[1][i] = fg, bg, fg.to_string(), bg.to_string()
+        self.colors = colors
+        return self.colors
+
+    def update(self):
+        colors = self.get_theme_colors()
+        if (self.cal.Y, self.cal.M) == self.cal.today[0:2]:
+            self.cal.goto_today()
+        self.t.set_text(months[self.cal.M-1]+" "+str(self.cal.Y))
+        self.g_e.set_text(str(self.cal.gy))
+        self.h_e.set_text(str(self.cal.Y))
+        a = self.cal.get_array()
+        b = self.cal.get_g_array()
+        for i in range(7):
+            self.days_l[i].set_text(week_days[wday_index(i)])
+            # colors[is_holyday][normal selected inactive]=[fg,bg,fg_s,bg_s]
+            self.days_l[i].modify_fg(Gtk.StateType.NORMAL, colors[1][1][0])
+            l = self.days_l[i].get_parent()
+            l.modify_fg(Gtk.StateType.NORMAL, colors[1][1][0])
+            l.modify_bg(Gtk.StateType.NORMAL, colors[1][1][1]);
+        holyday_col = wday_from_index((6+self.cal.get_week_start())%7)
+        for j in range(6):
+            c = self.cell[j][holyday_col].get_parent()
+            c.modify_bg(Gtk.StateType.NORMAL, colors[1][1][1])
+        for n in range(42):
+            i = n%7
+            j = n/7
+            if (a[j][i]):
+                if a[j][i] == self.cal.D:
+                    is_selected = 0
+                else:
+                    is_selected = 1
+                if i == holyday_col:
+                    is_holyday = 1
+                else:
+                    is_holyday = 0
+                self.cell[j][i].set_markup('<span size="large" weight="bold" foreground="%s" background="%s">%02d</span>\n<span size="small" weight="bold" foreground="navy">%02d/%02d</span>' % 
+                                             (colors[is_holyday][is_selected][2],
+                                             colors[is_holyday][is_selected][3],
+                                             a[j][i],
+                                             b[j][i][0],b[j][i][1]))
+                h_str = "%d من %s لعام %d هـ" % (a[j][i],
+                                                 months[self.cal.M-1],
+                                                 self.cal.Y)
+                g_str = "%d من %s لعام %d م" % (b[j][i][0],
+                                                gmonths[b[j][i][1]-1],
+                                                b[j][i][2])
+                self.cell[j][i].set_tooltip_text("%s\n%s" % (h_str,g_str))
+            else:
+                self.cell[j][i].set_text('-')
+                self.cell[j][i].set_tooltip_text('')
+
+
+    def first_time_show(self):
+        self._first_time_show = True
+        # FIXME: what is Gtk.TEXT_DIR_RTL in gtk3 ?
+        #if Gtk.Widget.get_default_direction()==Gtk.TEXT_DIR_LTR:
+        if Gtk.Widget.get_default_direction() == 1:
+            self.cal.set_direction(-1) # LTR
+        else:
+            self.cal.set_direction(1) # RTL
+        self.update()
+
+    def show(self):
+        r = super(Gtk.Window, self).show()
+        if not self._first_time_show:
+            self.first_time_show()
+        return r
+
+    def show_all(self):
+        r = super(Gtk.Window, self).show_all()
+        if not self._first_time_show:
+            self.first_time_show()
+        return r
+
+
+class CalStatusIcon(Gtk.StatusIcon):
+    def __init__(self, cal):
+        Gtk.StatusIcon.__init__(self)
+        self.cal = cal
+        self.notify = None
+        if not no_notify:
+            pynotify.init("التقويم الهجري")
+            self.notify = pynotify.Notification()
+
+        Y, M, D, W = self.cal.today
+        yy, mm, dd = self.cal.g_today
+        self.connect ('button-press-event', self.clicked_cb)
+        self.set_title("التقويم الهجري")
+        self.last_d_m = "%02d/%02d" % (D, M)
+        self.set_tooltip_text("%s, %d من %s لعام %d" % (week_days[W], D, months[M-1], Y))
+        svg_fn = update_icon_file(D, M)
+        if svg_fn:
+            self.set_from_file(svg_fn)
+            Gtk.Window.set_default_icon_from_file(svg_fn)
+        else:
+            self.set_from_icon_name("stock_calendar")
+            Gtk.window_set_default_icon_name('stock_calendar')
+        self.win = CalWindow(cal, self)
+        self.set_visible(True)
+        self.setup_popup_menu()
+        self.update_notify()
+        if not '--hidden' in sys.argv:
+            self.win.show_all()
+        else:
+            self.show_notify()
+        GObject.timeout_add(5000, self.update)
+
+    def update_notify(self):
+        if not self.notify:
+            return
+        Y, M, D, W = self.cal.today
+        yy, mm, dd = self.cal.g_today
+        self.notify.set_property('icon-name','gtk-dialog-info')
+        self.notify.set_property('summary', "التقويم الهجري" )
+        self.notify.set_property('body',
+                                  "%s, %d من %s لعام %d\nالموافق %d من %s لعام %s"
+                                  % (week_days[W],
+                                     D,
+                                     months[M-1],
+                                     Y,
+                                     dd,
+                                     gmonths[mm-1],
+                                     yy))
+        #self.notify.set_timeout(5)
   
-  def show_notify(self):
-    if not self.notify: return
-    self.notify.show()
-
-  def update(self):
-    self.cal.refresh_today()
-    Y,M,D,W=self.cal.today
-    d_m="%02d/%02d" % (D,M)
-    if self.last_d_m == d_m: return True
-    self.update_notify()
-    self.set_tooltip_text("%s, %d من %s لعام %d" % (week_days[W], D, months[M-1], Y))
-    self.last_d_m=d_m
-    svg_fn=update_icon_file(D,M)
-    if svg_fn:
-      self.set_from_file(svg_fn)
-      gtk.window_set_default_icon_from_file(svg_fn)
-      self.win.set_icon_from_file(svg_fn)
-      self.win.about.set_icon_from_file(svg_fn)
-    self.win.update()
-    #self.setup_notify(Y,M,D,W)
-    self.show_notify()
-    return True
-
-  def show_popup_menu(self):
-    self.popup_menu.show_all()
-    if self.win.get_visible(): self.popup_menu.get_children()[0].hide()
-    else: self.popup_menu.get_children()[1].hide()
-    self.popup_menu.popup(None, None, gtk.status_icon_position_menu, 3, gtk.get_current_event_time(), self)
-
-
-  def clicked_cb(self, w, event):
-    # TODO: use defined buttons
-    if event.button == 1:
-      if not self.win.g_e.get_property('visible'):
+    def show_notify(self):
+        if not self.notify:
+            return
+        try:
+            self.notify.show()
+        except:
+            pass
+
+    def update(self):
+        self.cal.refresh_today()
+        Y,M,D,W = self.cal.today
+        d_m = "%02d/%02d" % (D, M)
+        if self.last_d_m == d_m:
+            return True
+        self.update_notify()
+        self.set_tooltip_text("%s, %d من %s لعام %d" % (week_days[W],
+                                                        D,
+                                                        months[M-1],
+                                                        Y))
+        self.last_d_m = d_m
+        svg_fn = update_icon_file(D,M)
+        if svg_fn:
+            self.set_from_file(svg_fn)
+            Gtk.Window.set_default_icon_from_file(svg_fn)
+            self.win.set_icon_from_file(svg_fn)
+            self.win.about.set_icon_from_file(svg_fn)
+        self.win.update()
+        #self.setup_notify(Y,M,D,W)
+        self.show_notify()
+        return True
+
+    def show_popup_menu(self):
+        self.popup_menu.show_all()
+        if self.win.get_visible():
+            self.popup_menu.get_children()[0].hide()
+        else:
+            self.popup_menu.get_children()[1].hide()
+        self.popup_menu.popup(None,
+                              None,
+                              self.position_menu,
+                              self,
+                              3,
+                              Gtk.get_current_event_time())
+
+    def clicked_cb(self, w, event):
+        if event.button == 1:
+            self.show_hide_cb()
+        elif event.button == 2:
+            self.show_notify()
+        elif event.button == 3:
+            self.show_popup_menu()
+  
+    def show_hide_cb(self, about = False, *a):
+        if about or not self.win.g_e.get_property('visible'):
+            self.show_cb()
+        else:
+            self.win.set_property("visible", not self.win.get_property("visible"))
+        if about:
+            self.win.about.run()
+      
+    def show_cb(self, *a):
         self.win.show_all()
-      else:
-        self.win.set_property("visible", not self.win.get_property("visible"))
-    elif event.button == 2: self.show_notify()
-    elif event.button == 3: self.show_popup_menu()
+        self.update()
+
+    def setup_popup_menu(self):
+        self.popup_menu=popup_menu=Gtk.Menu()
+        #i = Gtk.ImageMenuItem("إظهار")
+        #img=Gtk.Image()
+        #img.set_from_stock(Gtk.STOCK_OPEN, Gtk.IconSize.MENU)
+        #i.set_image(img)
+        i = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_OPEN, None)
+        i.connect('activate', self.show_cb)
+        i.set_always_show_image(True)
+        popup_menu.add(i)
+        
+        i = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_CLOSE, None)
+        i.connect('activate', self.win_hide_cb )
+        i.set_always_show_image(True)
+        popup_menu.add(i)
+        
+        i = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_ABOUT, None)
+        i.connect('activate', lambda *a: self.show_hide_cb(True))
+        i.set_always_show_image(True)
+        popup_menu.add(i)
+        
+        i = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_QUIT, None)
+        i.connect('activate', Gtk.main_quit)
+        i.set_always_show_image(True)
+        popup_menu.add(i)
   
-  def show_cb(self, *a):
-    self.win.show_all()
-    self.update()
-
-  def setup_popup_menu(self):
-    self.popup_menu=popup_menu=gtk.Menu()
-    i = gtk.ImageMenuItem("Show")
-    i.connect('activate', self.show_cb)
-    popup_menu.add(i)
-    i = gtk.ImageMenuItem("Hide")
-    i.connect('activate', lambda *args: self.win.hide())
-    popup_menu.add(i)
-    i = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
-    i.connect('activate', lambda *a: self.win.about.run())
-    i.set_always_show_image(True)
-    popup_menu.add(i)
-    i = gtk.ImageMenuItem(gtk.STOCK_QUIT)
-    i.connect('activate', gtk.main_quit)
-    i.set_always_show_image(True)
-    popup_menu.add(i)
-
-bus=None
-st=None
+    def win_hide_cb(self, *w):
+        self.win.hide()
+        self.win.about.hide()
+    
+bus = None
+st = None
 try:
-  import dbus
-  import dbus.service
-  #import gobject # for gobject.MainLoop() if no gtk is to be used
-  from dbus.mainloop.glib import DBusGMainLoop
+    import dbus
+    import dbus.service
+    #import gobject # for GObject.MainLoop() if no gtk is to be used
+    from dbus.mainloop.glib import DBusGMainLoop
 
-  dbus_loop = DBusGMainLoop(set_as_default=True)
-  bus = dbus.SessionBus()
-except ImportError: pass
+    dbus_loop = DBusGMainLoop(set_as_default=True)
+    bus = dbus.SessionBus()
+except ImportError:
+    pass
 
 # use dbus so that, only one Applet is shown
 def init_dbus():
-  global bus_name, bus_object,win
-  if not bus: return
-  class Manager(dbus.service.Object):
-    def __init__(self, bus, path):
-          dbus.service.Object.__init__(self,bus,path)
-
-    @dbus.service.method("org.freedesktop.HijriApplet", in_signature='', out_signature='')
-    def Show(self):
-      st.win.show_all()
-
-    @dbus.service.method("org.freedesktop.HijriApplet", in_signature='', out_signature='s')
-    def Version(self):
-      return "0.1"
-  # values from /usr/include/dbus-1.0/dbus/dbus-shared.h
-  r=bus.request_name('org.freedesktop.HijriApplet', flags=0x4)
-  if r!=1:
-    print "Another process own HijriApplet Service, ask it to show up: "
-    trials=0; appletbus=False
-    while(appletbus==False and trials<20):
-      print ".",
-      try:
-        appletbus=bus.get_object("org.freedesktop.HijriApplet","/Manager"); break
-      except:
-        appletbus=False
-      time.sleep(1); trials+=1
-    print "*"
-    if appletbus: appletbus.Show(dbus_interface='org.freedesktop.HijriApplet')
-    else: print "unable to connect"
-    exit(0)
-  bus_name = dbus.service.BusName("org.freedesktop.HijriApplet", bus)
-  bus_object = Manager(bus, '/Manager')
+    global bus_name, bus_object,win
+    if not bus: return
+    
+    class Manager(dbus.service.Object):
+        def __init__(self, bus, path):
+            dbus.service.Object.__init__(self,bus,path)
+
+        @dbus.service.method("org.freedesktop.HijriApplet",
+                              in_signature = '',
+                              out_signature = '')
+        def Show(self):
+            st.win.show_all()
+
+        @dbus.service.method("org.freedesktop.HijriApplet",
+                              in_signature = '',
+                              out_signature = 's')
+        def Version(self):
+            return "0.1"
+    # values from /usr/include/dbus-1.0/dbus/dbus-shared.h
+    r = bus.request_name('org.freedesktop.HijriApplet', flags = 0x4)
+    if r != 1:
+        print "Another process own HijriApplet Service, ask it to show up: "
+        trials = 0
+        appletbus = False
+        while(appletbus == False and trials < 20):
+            print ".",
+            try:
+                appletbus = bus.get_object("org.freedesktop.HijriApplet","/Manager")
+                break
+            except:
+                appletbus = False
+            time.sleep(1)
+            trials += 1
+        print "*"
+        if appletbus:
+            appletbus.Show(dbus_interface = 'org.freedesktop.HijriApplet')
+        else:
+            print "unable to connect"
+        exit(0)
+    bus_name = dbus.service.BusName("org.freedesktop.HijriApplet", bus)
+    bus_object = Manager(bus, '/Manager')
 
 def main():
-  global st
-  init_dbus()
-  st=CalStatusIcon(cal)
-  gtk.main()
+    global st
+    init_dbus()
+    st=CalStatusIcon(cal)
+    Gtk.main()
 
-main()
+if __name__ == '__main__':
+    main()
diff --git a/HijriCal.py b/HijriCal.py
index 23171dd..e36ccca 100644
--- a/HijriCal.py
+++ b/HijriCal.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/python2
 # -*- coding: utf-8 -*-
 """
 Hijri Islamic High level Calendar API,
diff --git a/LICENSE-ar.txt b/LICENSE-ar.txt
deleted file mode 100644
index 8f8ce80..0000000
--- a/LICENSE-ar.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-   بسم الله الرحمن الرحيم
-
-                                         رخصة "وقف" العامة
-
-                                               مقدمة
-
-   إن نشر أي عمل فكري (برنامج حاسوبي أو كتاب على سبيل المثال لا الحصر) لا يكون بالبيع وإن بدا
-   كذلك بل يكون باتفاقية ضمنية لا قيمة لها لولا مفهوم الملكية الفكرية الذي رسخته القوانين الوضعة
-   التي يفترض أنها وضعت لحفز نشر الأعمال الفكرية النافعة. ترتكز الملكية الفكرية على أن أول مودع
-   العمل (يسمى المالك Owner أو copyright holder وسنشير له في هذه الوثيقة باسم صاحب العمل) يملك
-   الحق في العمل بصورته المعنوية على أي وسيط مادي كان وله حق التصرف في ملكه المزعوم. إن أي
-   استعمال للعمل الفكري دون الإذن المسبق الصريح من مالك العمل يعد مكافئا أخلاقيا لسرقة السفن أو
-   “قرصنة” بنظرهم. هذا الإذن يسمى “رخصة License” وتهدف تلك الرخص غالبا لإعطاء المالك (غالبا
-   الناشر) أفضلية في السوق أمام الناشرين الآخرين من خلال احتكار العمل وذلك بفرض قيود على
-   المستخدمين لا الناشرين. تسمى مثل تلك الأعمال بالأعمال “المملوكة Proprietary”.
-
-   إننا نرى أن هذه الاتفاقيات (الرخص المملوكة) مجحفة جدا لكننا ندرك إن قبول اتفاقية معينة (مثل
-   رخص البرامج المملوكة) وأنت تضمر مسبقا خرقها أمر غير أخلاقي ^1). لهذا فنحن لا نحل المشكلة
-   بمشكلة أخرى بل إننا نقدم البديل.
-
-   نحن لدينا رؤية مختلفة فنحن نقدم أعمالنا الفكرية من برامج حاسوبية وغيرها ابتغاء وجه الله، والتي
-   هي الركيزة الأساسية لهذه الرخصة التي تميزها عن الرخص المملوكة وعلى أي غاية آخرى (مثل نشر العلم
-   النافع أو جني الأرباح) أن تتحقق بوسيلة لا تخالف هذا الهدف الأسمى.
-
-   في قناعتنا - التي لا نلزم أحدا بها والتي لا يضيرك أن لا تشترك معنا فيها - أن الاسلام يحرم
-   وبشكل قطعي حكر العلم والمعرفة والانتاج الفكري على وجه العموم، وهذا التحريم يأتي من عدة أوجه :
-
-     * الحديث النبوي الشريف : “من كتم علما ألجمه الله يوم القيامة بلجام من نار” ^2) وقد جاءت
-       كلمة العلم نكرة عامة فهي تنطبق على كل علم ينتفع الناس به سواء علم ديني أو دنيوي.
-     * أن الإسلام حدد ما يصح أن يكون مملوكا وذلك لا ينطبق على العمل الفكري لأنه ليس عينا محصورا
-       وأغلب شروط البرمجيات المملوكة تقع في بيع الغرر (ذاك أن ما لا يجوز بيعه لا يجوز تملكه) دل
-       عليه ما ورد من النهي عن بيع الغرر في صحيح مسلم (ويدخل فيه مسائل كثيرة غير منحصرة كبيع
-       المعدوم والمجهول وما لا يقدر على تسليمه وما لم يتم ملك البائع عليه) وما ورد عن الأئمة
-       الأربعة من فهمهم لهذا.
-     * لسنا بحاجة لابتداع شيء لنشر العلم لأن الأعمال الفكرية ليست محدثة وأن قرون الخير الأولى
-       نشرت العلم دون تملكها.
-     * حبس المعرفة والعلم عمن يحتاجه هو إضرار بالناس لصالح قلة منهم، وهذا مما نهى عنه الشارع ولا
-       يبرر هكذا فعل إلا من يؤمن بالرأسمالية الذاتية التي تطرفت في تعظيم مصلحة الفرد.
-     * انتفاء مبرر المصلحة إذا وجدت طرق لنشر الأعمال الفكرية والتربح منها دون كتمها.
-     * إن المتمعن في قوانين الملكية الفكرية المختلفة يجد في أنها تتلخص بإعطاء “المالك” المزعوم
-       الحق في تحريم ما أحله الله ليكون ذلك مدخلا له في كسب مادي ولا علاقة لها بتقديم خدمة أو
-       منتج معين.
-     * الغموض الذي يحيط بماهية الشيء المزعوم ملكه تفتح الباب أمام جبات “الأتاوات” حيث تتكسب بعض
-       الشركات من التهديد بخطر المقاضاة حتى على أشياء لا تملكها والقضاء الأمريكي يغص بمثل هذه
-       القضايا.
-
-   فإن كانت الغاية قد بررت الوسيلة لواضعي الدستور الأمريكي حين أقروا مفهوم ”الملكية الفكرية”
-   كحق مكتسب (غير فطري باعترافهم) يخدم ما تؤمن به ثقافتهم من تعظيم المصلحة الذاتية وتقديمها على
-   كل شيء؛ ذاك لا يعنينا في شيء ونحن نؤمن بعدم صلاحية ذلك لعموم البشر، لهذا جاءت رخصة “وقف”
-   العامة (كما غيرها الكثير من رخص التوزيع المضادة لحكر التوزيع)، فهي وضعت لكي تؤكد لمستهلك العمل
-   الفكري أن لا قيد يفرضه صاحب العمل على استخدم منتجه والإفادة منه أو إعادة انتاجه وتوزيعه. أي أن
-   تجعل حقوق الطبع والتوزيع “ممنوحة” أو مرفوعة وليس “محفوظة” (وبالإنجليزية يشار لها باسم copyleft
-   او copy-wrong تهكما على copyright)
-
-   فمعادلة وتفاصيل تركيب الدواء هي عمل فكري، وبرمجية الحاسوب هي عمل فكري وقصيدة الشعر هي عمل
-   فكري. وهي بشكل عام كل فكرة تنفع الناس تصلهم على شكل منتج. وعندما نتكلم عن العمل الفكري فإننا
-   نحدد التعريف بالفكر الذي ينفع الناس نشره ولا نقصد به عموم الفكر فلكل منا خصوصيته وأسراره التي
-   لايشارك بها الاخرين. فأسماء الزبائن وأرقام المناقصات وسياسة الدولة العسكرية أو السياسية ليست
-   أعمالا فكرية.
-
-   وهنا يجدر الوقوف عند مسألتين :
-
-     * الأولى، أن الحق الأدبي للصاحب العمل يبقى للمبتكر الأصلي على كل الأحوال. فلا يجوز لأحد أن
-       يأخذ هذا العمل وينتحله ويدعيه لنفسه.
-     * والثانية، أن لصحاب العمل ولغيره (ممن عندهم الكفاية) الإفادة المادية من العمل كأن يطلب
-       أتعابا أو يتقاضى أجرا عن تحسينه أوتطويره أو أجرا عن تدريسه وهكذا. ولكن ما وراء ذلك فلا يحق
-       له إدعاء ملكيته للفكرة أو العمل في صورته المعنوية ولا يحق له منع الآخرين من اعادة نشرها
-       والاستفادة منها. وهذا لا تناقض مع كون العمل موقوفا لأن الموقوف هو أصل العمل الفكري بصورته
-       المعنوية وليس الوسيط أو الخدمة ^3)
-
-                                              تعريفات
-
-   تكون التعريفات هنا هي المقصودة عند استخدامها في الرخصة :
-
-     * العمل الفكري (أو اختصارا العمل): هو أي عمل فكري نافع غير مادي ولا ملموس ويمكن لمن يتلقاه
-       عمل نسخ منه ونقله إلى آخرين دون أي عبء على من قام بإيصال النسخة اليه.
-     * صاحب العمل : هو الشخص المُبتكِر أو الجهة التي قامت بتطوير وتوفير العمل الفكري (والتي تملك
-       حقوق النسخ عند الجهات الرسمية إن لزم الأمر).
-     * المُنتًفع (المستخدِم): هو الشخص أو الجهة التي ترغب بالانتفاع من العمل الفكري.
-     * رخصة الاستخدام (أو اختصارا الرخصة): هي هذا العقد الذي بين يديك وهو عقد بين صاحب العمل
-       والمنتفع يحق للمنتفع بموجبه وضمن شروطه الاستفادة والانتفاع من العمل. ونظرا لتوفر العمل
-       بشكل مفتوح للجميع فإن قيام المنتفع بالاستفادة من العمل الفكري يعني بالضرورة إقراره
-       وموافقته على كافة شروط الرخصة. فإذا لم يكن المنتفع موافقا على الرخصة تنتفي عنه حقوق الحقوق
-       الممنوحة بموجبها ويصبح أي انتفاع بالعمل غير مشروع ويعرض نفسه للمقاضاة.
-
-                                            بنود الرخصة
-
-   رخصة وقف العامة، يرمز لها اختصارا بـ “وقف”، هي رخصة لتوزيع العمل الفكري (من برمجيات أو مؤلفات
-   مكتوبة أو إنتاج فني على سبيل المثال لا الحصر). تتشابه هذه الرخصه في اهدافها مع رخص البرمجيات
-   الحرة والتوثيق الحر و رخصة الانتاج المشترك. ولكنها تزيد عليها ببعض الجوانب المتعلقة بالهدف من
-   وراء الانتاج و حدود الاستخدام.
-
-   رخصة وقف وكما يقترح الاسم هي إقرار من صاحب العمل بأن هذا العمل هو وقف لله تعالى ويتقصد به نوال
-   رضاه من خلال انتفاع الناس به، أي أن هذا العمل هو صدقة جارية لوجه الله تعالى. وبذلك فإن رخصة
-   وقف تقر بأن للمنتفع -أيا كان جنسه أو لونه أو عقيدته- الحق في الإفادة من العمل وإعادة توزيعه
-   وحتى تطويره ضمن الشروط التالية:
-
-     * أولا - أوجه الاستخدام :
-
-   يحق للمنتفع استخدام العمل ضمن أي غرض فيه منفعة ولايجوز استخدامه فيما يسئ للأخرين أو يخالف
-   مبادئ الإسلام السمحة. مع ملاحظة أن الأعمال التي يغلب الظن أنها الضارة لا يجوز أن توضع تحت هذه
-   الرخصة أصلا.
-
-     * ثانيا - حق التوزيع :
-
-   يحق للمنتفع إعادة توزيع العمل بصورته الأصلية ودون تعديل وتحت شروط رخصة وقف، بالكم الذي يريد مع
-   صون ذكر الحق الأدبي لصاحب العمل.
-
-     * ثالثا - حق التعديل :
-
-   يحق للمنتفع الحصول على النسخة المصدرية للعمل كما ويحق له التعديل عليها بما يناسب احتياجاته
-   وضمن الحدود الموضحة في بند أولا.
-
-     * رابعا - حق توزيع النسخة المُعدّلة :
-
-   يحق للمنتفع إعادة توزيع العمل المعدّل فقط تحت رخصة وقف العامة وعلى أن يذكر أصل العمل المعدل
-   وطبيعة التعديل وأن يكون واضحا بما لايدع مجالا للبس أن هذه النسخة معدلة وليست هي النسخة الأصلية
-   التي انتجها صاحب العمل الأول.
-
-     * خامسا - عدم المسؤلية :
-
-   لا يتحمل صاحب العمل أية مسؤوليه لا قانونية ولا أخلاقية عن حسن أو إساءة استخدام العمل أو
-   الأضرار المباشرة أو غير المباشرة الناتجة عنه إلى أقصى حد يسمح به القانون. وصاحب العمل بهذا لا
-   يقدم أية ضمانة لا ضمنا ولا تصريحا بقدرة المنتج على تحقيق أي غرض.
-
-   المسؤولية الكاملة تقع على عاتق المنتفع والضمانة الوحيدة المقدمة له هي مصدر العمل.
-
-                                              الخلاصة
-
-   استخدام رخصة وقف العامة يساعد في نشر الوعي على خطر مفاهيم الملكية الفكرية. كما ويقدم البديل
-   القانوني وإن كنّا لانؤمن بقانونية تلك الملكيات.
-
-   ^1) انظر http://www.islam-qa.com/ar/ref/454
-   ^2) الحديث صحيح رواه أحمد وأبو داود والترمذي وابن ماجه انظر “رفع المنار بطرق حديث من
-   كتم علماً ألجمه الله بلجام من نار”
-   ^3) مثلا يجوز أخذ أجل على نقل ثمار أرض موقوفة أو عصرها
-
-
diff --git a/LICENSE-en b/LICENSE-en
deleted file mode 100644
index c389e77..0000000
--- a/LICENSE-en
+++ /dev/null
@@ -1,222 +0,0 @@
-   بسم الله الرحمن الرحيم
-
-   In the name of Allah, Most Gracious, Most Merciful
-
-                         "Waqf" General Public License
-
-   This is the informal English translation of Waqf General Public License.
-   Anything but the Arabic version of the license has no value except for
-   convenience of our English speaking users. When we talk about the License
-   we refer to the Arabic version, which is the only one we officially
-   offer, we will try our best to make other translation as accurate as
-   possible but because of the nature of human languages we use one single
-   reference language.
-
-                                    Preamble
-
-   Publishing any intellectual work (including but not limited to books and
-   Computer Software) is not done by selling even if it appeared to be so,
-   but it's about getting an implied license that has no enforcement without
-   the concept of intellectual property granted by man-made laws which was
-   acquired as they claim to promote the publication of science and the
-   useful arts. The concept of the so called “intellectual property” is
-   centered around giving ownership to the first one who register the work
-   (called owner or copyright holder and we will refer to him/her/it as
-   holder) then the holder practice his rights on the work in it's intangible
-   form on any media it's carried, and thus using the intellectual work
-   without explicit prior permission is according to them ethically
-   equivalent to hijacking ships or “piracy” as they call it. This permission
-   is called License and it's aimed to give the holder (usually the
-   publisher) an advantage in the market against other publishers through
-   monopoly on providing that work by imposing restrictions on the users not
-   the publishers. Such works are called “Proprietary”.
-
-   We see that such agreements (proprietary licenses) are evil, but we also
-   acknowledge that making an agreement with a prior intention to violate it
-   is another immoral evil ^1). We don't solve problems with problems, we
-   offer an alternative.
-
-   We have a different vision, we offer our work (like computer software) to
-   please Allah, and this is the pillar of this license which distinguish it
-   from proprietary licenses. Any other intention (like spreading knowledge
-   or getting profits) should be accomplished in ways that does not go
-   against our primary moral aim.
-
-   According to our believes (which we don't enforce on any one, and you may
-   or may not share it with us) that Islam certainly forbids monopoly and
-   concealing knowledge in general, and this comes from:
-
-     * The sound Hadith (saying of prophet Muhammad PBUH): “Who conceal any
-       type of knowledge will be bridle with a bridle of fire on the Day of
-       Resurrection.” ^2)
-     * Islamic Jurisprudence has specified what can be owned, and the rules
-       does not apply to ideas as it's not a bounded tangible object and
-       almost all the terms of proprietary agreements fall in ruling of
-       forbidden Gharar^3) (a kind of fraud that use uncertainty to
-       fool the customers) as we see in Imam Muslim Sahih description of that
-       term {and below that term we classify so many actions like selling
-       negligible objects or unknowns or what can't be delivered or things
-       that are not full owned by the seller} and such view is also shared by
-       the four major scholars.
-     * The laws of Fiqh (Islamic Jurisprudence) have been perfected in the
-       good centuries and no new rulings are allowed to be brought except for
-       newly discovered things and this does not apply ideas as they did
-       exist in the past centuries and Muslims massively spread them without
-       owning them. FYI: Almost all the Islamic literature is freely
-       available on the internet.
-     * Concealing useful knowledge from those who need it impose damage to
-       people for temporal gains to few individuals. This can not be
-       justified by Shari'a (Islamic Law), it's only justified by
-       individualist capitalism ^4)
-     * Even bringing interests to software publishers is not a valid excuse
-       because there are some companies produce and publish software without
-       owning them (proprietary software) and yet they gain profits.
-     * the so call “Intellectual Proprietary” is all about giving owners the
-       right to forbid what Allah had made lawful to gain money, not by
-       providing service nor goods.
-     * The uncertainty and untangable nature of the claimed owned product is
-       the source of “protection money collecting” where some company
-       threaten some smaller company by copyright infringement lawsuit on
-       some purposely ambiguous product which the later can't afford so they
-       go safe and pay.
-
-   If the good intentions made excuses to introduce “intellectual
-   proprietary” by the Machiavellists who wrote the American constitution
-   as an acquired right (at least they admit it's not a natural right), they
-   serve their own way of life which is not international. We don't take
-   that. We have our own high moral standards. We introduce Waqf General
-   Public License to place it among the anti-copyright licenses. This license
-   is designed to grant rights to users not to restrict them, it's uses the
-   concept of copyleft/copy-wrong as opposed to the concept of copyright.
-
-   Computer software, Medicine formula or even poems are considered to be
-   intellectual works and thus can be covered by “Waqf”. An intellectual work
-   is any useful idea that can be delivered or utilized by people. “Waqf” is
-   not meant for ideas in general, but for intellectual work which is
-   beneficial to people if published. As we support protecting privacy for
-   example one shouldn't publish names of his customers, bid prices,
-   government military or political secrets because those are not
-   intellectual works.
-
-   We should clarify two things:
-
-     * First: The favor and ethical rights of the holder are preserved and
-       acknowledged
-     * Second: original author and any other party (if they have the
-       intention and the ability) have the right to get fees on enhancing the
-       work or developing it or to provide paid services or paid courses
-       …etc. but not the work in its intangible form. There is not
-       contradiction between getting fees on services because what is covered
-       by “Waqf” is the source form of the work not the media nor the service
-       (the same way one can take fees on shipping fruits for a charitable
-       Waqf fruit field or make juice)
-
-                                  Definitions
-
-   The following terms would have the corresponding meanings in this license
-
-     * The intellectual work (or The work for short): is any useful
-       intangible intellectual product that can be passed on to others or
-       replicated withno cost imposed on the original author or the one who
-       pass it on before.
-     * The holder: is the creative author or the party which carried the
-       process of developing the work and make it available (and the one who
-       holds the copyrights on the product before the governmental offices).
-     * the licensee or the user: any one or party who uses the work (runs,
-       copies, modifies or otherwise takes benefits provided by the work).
-     * The license: this agreement (the Arabic version of “Waqf”) between the
-       two parties (the holder and the user) covering the usage of the second
-       party on the work provided by the first party. The usage of the
-       product is with accordance to the terms of this license. And because
-       of the intangible nature of the work, this agreement applies by using
-       the product (in any way) without signing the agreement. One do not
-       accept the terms looses the rights given by this license and his/her
-       usage of the work is considered illegal and will be sued.
-
-                                   The Terms
-
-   Waqf General Public license (or “Waqf” for short) covers intellectual
-   works (including but not limited to Software and paper publications,
-   scientific theses, art works) and have many common features with FLOSS
-   licenses. Waf is distinguished with its moral intentions behind the work
-   and usage limits.
-
-   As the name suggests, with “Waqf” ^5) the holder announce his/her work
-   was produced and made available to the public for the sake of Allah aimed
-   to please Allah by providing people with useful works. It's a form of
-   “Sadaqa Jariah” ^6).
-
-   “Waqf” gives users (regardless of their nationality, color, race,
-   religion) the right to benefit from the work with running, copying,
-   redistribution, or even develop and only with according to the following
-
-     * First - Usage :
-
-   The user may use the work for any good purpose and he may not use it to
-   harm others or violate the permissive principles of Islam ^7). Notice
-   that any work that is most likely harmful can't be put under Waqf in the
-   first place.
-
-     * Second - Redistribution :
-
-   The user have the right to redistribute the unmodified work in any
-   quantity to any third party under the terms of this license, acknowledging
-   the favor and ethical rights of the holder to the third party.
-
-     * Third - Modifications :
-
-   The user has the right to get the source form of the work and make
-   modifications enhancing or adopting to the user's needs to the limits
-   given by this license.
-
-     * Fourth - Redistribute modifications:
-
-   The user can redistribute modifications only under this license provided
-   that he points to previous original work (the unmodified work) and its
-   author and the nature of modification clearly to the third party to whom
-   the modified work is presented in a way that no one may reasonably get
-   confused between it and the original unmodified work of the previous
-   author.
-
-     * Fourth - Disclaimer of responsibility :
-
-   The holder does not take any legal nor moral direct or indirect
-   responsibility nor liability on the good or bad usage or damages caused by
-   the work to the farthest level allowed by the law. THIS SOFTWARE IS
-   PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED BY THE HOLDER.
-
-   The entire responsibility is on the user and the only warranty given to
-   him is the source of the work.
-
-                                   Conclusion
-
-   Applying Waqf public license help to spread the awareness of dangers
-   caused by intellectual property. And provide people with a legal
-   alternative even though we don't believe on the validity of such man made
-   laws.
-
-   ^1) http://www.islam-qa.com/ar/ref/454
-   ^2) This is an authentic sound/Sahih as it's narrated by Imam
-   Ahmad, Abu Dawood, AlTirmithi and Ibn Majah. Refer to “Hoisting the
-   Lighthouse : A synopsis of the Various narrations of the Hadith: Whoever
-   conceals knowledge, Allah will bridle him with a bridle of fire” or in
-   Arabic “رفع المنار بطرق حديث من كتم علماً ألجمه الله بلجام من نار”.
-   ^3) Some information about Ghrar is available at
-   http://www.investopedia.com/terms/g/gharar.asp
-   ^4) Although Islamic economy is a kind of liberal capitalism economy
-   but it's regulated with so many moral rulings that guarantee social
-   justice
-   ^5) The name Waqf means to prevent the source or assets from being
-   consumed while giving away for charity the proceeds.
-   ^6) Sadaqa Jariah means sustainable charity which is a kind of charity
-   that continue to be beneficial to people even after the death of the one
-   who give it like giving the fruits of a field but not the field, more over
-   prophet Muhammad PBUH specifically named useful knowledge as a form of
-   that kind of charity.
-   ^7) Some scholars use the term Maqasid Alsharia and summarize them by
-   saying that it aims to protect people rights in religion, lives, sanity,
-   breed, and properties.
-
-
diff --git a/gnome-shell-extension/metadata.json b/gnome-shell-extension/metadata.json
index c2433c0..b3f0481 100644
--- a/gnome-shell-extension/metadata.json
+++ b/gnome-shell-extension/metadata.json
@@ -1,7 +1,191 @@
 {
  "uuid": "HijriApplet at ojuba.org",
- "shell-version": ["3.2", "3.2.0"],
+ "shell-version": ["3.2", "3.4", "3.6", "3.8", "3.10", "3.12", "3.14", "3.16", "3.18", "3.20",
+"3.22.0",
+"3.23.0",
+"3.24.0",
+"3.25.0",
+"3.26.0",
+"3.27.0",
+"3.28.0",
+"3.29.0",
+"3.30.0",
+"3.22.1",
+"3.23.1",
+"3.24.1",
+"3.25.1",
+"3.26.1",
+"3.27.1",
+"3.28.1",
+"3.29.1",
+"3.30.1",
+"3.22.2",
+"3.23.2",
+"3.24.2",
+"3.25.2",
+"3.26.2",
+"3.27.2",
+"3.28.2",
+"3.29.2",
+"3.30.2",
+"3.22.3",
+"3.23.3",
+"3.24.3",
+"3.25.3",
+"3.26.3",
+"3.27.3",
+"3.28.3",
+"3.29.3",
+"3.30.3",
+"3.22.4",
+"3.23.4",
+"3.24.4",
+"3.25.4",
+"3.26.4",
+"3.27.4",
+"3.28.4",
+"3.29.4",
+"3.30.4",
+"3.22.5",
+"3.23.5",
+"3.24.5",
+"3.25.5",
+"3.26.5",
+"3.27.5",
+"3.28.5",
+"3.29.5",
+"3.30.5",
+"3.22.6",
+"3.23.6",
+"3.24.6",
+"3.25.6",
+"3.26.6",
+"3.27.6",
+"3.28.6",
+"3.29.6",
+"3.30.6",
+"3.22.7",
+"3.23.7",
+"3.24.7",
+"3.25.7",
+"3.26.7",
+"3.27.7",
+"3.28.7",
+"3.29.7",
+"3.30.7",
+"3.22.8",
+"3.23.8",
+"3.24.8",
+"3.25.8",
+"3.26.8",
+"3.27.8",
+"3.28.8",
+"3.29.8",
+"3.30.8",
+"3.22.9",
+"3.23.9",
+"3.24.9",
+"3.25.9",
+"3.26.9",
+"3.27.9",
+"3.28.9",
+"3.29.9",
+"3.30.9",
+"3.22.90",
+"3.23.90",
+"3.24.90",
+"3.25.90",
+"3.26.90",
+"3.27.90",
+"3.28.90",
+"3.29.90",
+"3.30.90",
+"3.22.91",
+"3.23.91",
+"3.24.91",
+"3.25.91",
+"3.26.91",
+"3.27.91",
+"3.28.91",
+"3.29.91",
+"3.30.91",
+"3.22.92",
+"3.23.92",
+"3.24.92",
+"3.25.92",
+"3.26.92",
+"3.27.92",
+"3.28.92",
+"3.29.92",
+"3.30.92",
+"3.22.93",
+"3.23.93",
+"3.24.93",
+"3.25.93",
+"3.26.93",
+"3.27.93",
+"3.28.93",
+"3.29.93",
+"3.30.93",
+"3.22.94",
+"3.23.94",
+"3.24.94",
+"3.25.94",
+"3.26.94",
+"3.27.94",
+"3.28.94",
+"3.29.94",
+"3.30.94",
+"3.22.95",
+"3.23.95",
+"3.24.95",
+"3.25.95",
+"3.26.95",
+"3.27.95",
+"3.28.95",
+"3.29.95",
+"3.30.95",
+"3.22.96",
+"3.23.96",
+"3.24.96",
+"3.25.96",
+"3.26.96",
+"3.27.96",
+"3.28.96",
+"3.29.96",
+"3.30.96",
+"3.22.97",
+"3.23.97",
+"3.24.97",
+"3.25.97",
+"3.26.97",
+"3.27.97",
+"3.28.97",
+"3.29.97",
+"3.30.97",
+"3.22.98",
+"3.23.98",
+"3.24.98",
+"3.25.98",
+"3.26.98",
+"3.27.98",
+"3.28.98",
+"3.29.98",
+"3.30.98",
+"3.22.99",
+"3.23.99",
+"3.24.99",
+"3.25.99",
+"3.26.99",
+"3.27.99",
+"3.28.99",
+"3.29.99",
+"3.30.99"
+  ], 
+ 
+ 
+ 
  "name": "HijriApplet",
  "description": "HijriApplet",
- "url": "http://hijra.ojuba.org"
+ "url": "http://ojuba.org"
 }
diff --git a/hijra-autostart.desktop b/hijra-autostart.desktop
index c28b048..f44f93c 100644
--- a/hijra-autostart.desktop
+++ b/hijra-autostart.desktop
@@ -3,11 +3,10 @@ Name=Hijra Applet
 Name[ar]=بريمج هجرة
 Comment=Hijri calendar in system tray icon
 Comment[ar]=بريمج تقويم هجري
-Exec=/usr/bin/HijriApplet --hidden
+Exec=env GDK_BACKEND=x11 /usr/bin/HijriApplet --hidden
 Terminal=false
 Type=Application
 Icon=gnome-calendar
 X-KDE-autostart-after=panel
 StartupNotify=false
 Categories=X-Islamic-Software;Utility;
-
diff --git a/hijra.py b/hijra.py
index 30aee7e..110183a 100644
--- a/hijra.py
+++ b/hijra.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/python2
 # -*- coding: utf-8 -*-
 """
 Hijri Islamic Calendar converting functions,
diff --git a/hijra.spec b/hijra.spec
index ecbc9c1..a709b35 100644
--- a/hijra.spec
+++ b/hijra.spec
@@ -1,96 +1,158 @@
+%global owner ojuba-org
+
 Name: hijra
-Summary: Hijri Islamic Calendar utils in python
-URL: http://hijra.ojuba.org
-Version: 0.2.1
+Summary: Hijri Islamic Calendar
+Summary(ar): التّقويم الهجري الإسلامي
+URL: http://ojuba.org
+Version: 0.4.1
 Release: 1%{?dist}
-Source0: %{name}-%{version}.tar.bz2
-License: Waqf
-Group: System Environment/Base
+Source0: https://github.com/%{owner}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+License: WAQFv2
 BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: python
+Requires: pygobject3 >= 3.0.2
 BuildRequires: gettext
-BuildRequires: python, python-setuptools
-
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
 
 %description
-This is Hijra package from hijra.ojuba.org
-It provides Hijri/Islamic Calendar routines and utils in python
+Hijra provides Hijri/Islamic Calendar routines and utils in python.
+
+%description -l ar
+يقدّم هجرة أدوات التّقويم الهجري الإسلامي في بيثون.
 
-%package python
-Group: System Environment/Base
-Summary: Hijri Islamic Calendar converting functions for python
+%package -n hijri
+Summary: Hijri Terminal
+Summary(ar): هجري الطّرفية
 BuildArch: noarch
-Requires: python, setuptool
-%description python
-This is Hijra package from hijra.ojuba.org
 
+%description -n hijri
+Using all Hijra operations in terminal.
+
+%description -n hijri -l ar
+جميع خصائص برنامج هجرة في الطّرفية.
+
+%package -n python-hijra
+Summary: Hijri functions for python
+Summary(ar): وظائف هجرة لبيثون
+BuildArch: noarch
+Requires: python
+Requires: setuptool
+
+%description -n python-hijra
 Hijri Islamic Calendar converting functions,
-an enhanced algorithm designed by Muayyad Saleh Alsadi<alsadi at gmail.com>
-it can be used to implement apps, gdesklets or karamba ..etc
+an enhanced algorithm designed by Muayyad
+Saleh Alsadi, it can be used to implement apps,
+gdesklets or karamba ..etc
 
-This algorithm is based on integer operations
-which that there is no round errors (given accurate coefficients)
-the accuracy of this algorithm is based on 3 constants (p,q and a)
-where p/q is the full months percentage [ gcd(p,q) must be 1 ]
-currently it's set to 191/360 which mean that there is 191 months
-having 30 days in a span of 360 years, other months are 29 days.
-and a is just a shift.
+%description -n python-hijra -l ar
+الوظائف التّحويلية للتّقويم الهجري الإسلامي بخوارزمية مُحسّنة
+مُصمّمة بواسطة مؤيّد صالح السّعدي، يُمكن استخدامها و غرسها في
+أدوات سطح المكتب مثل كارامبا .. و غيره.
 
 %package applet
-Summary: Hijri Tray Applet for GNOME (also works with KDE)
-Group: System Environment/Base
+Summary: Hijri Tray Applet
+Summary(ar): بريمج هجرة لصينية النّظام
 BuildArch: noarch
-Requires: python, pygtk2, notify-python, desktop-notification-daemon
-Requires: hijra-python
-Requires(post): desktop-file-utils
+Requires: python
+Requires: pygtk2
+Requires: notify-python
+Requires: desktop-notification-daemon
+Requires: python-hijra
+Requires: desktop-file-utils
+
 %description applet
 Hijri Tray Applet for GNOME (also works with KDE)
-That uses Hijra Algorithm by Muayyad Saleh Alsadi<alsadi at gmail.com>
-provided by python-hijra package
+That uses Hijra Algorithm provided by python-hijra.
+
+%description applet -l ar
+بريمج هجرة لصينية النّظام لجنوم (ويعمل أيضًا بكدي)
+باستعمال خوارزمية هجرة من python-hijra.
 
 %package -n gnome-shell-extension-hijra
-Summary: gnome-shell extension to move hijri calendar
-Group: System Environment/Base
+Summary: Hijri Gnome-shell extension
+Summary(ar): امتداد هجرة لجنوم شل
 BuildArch: noarch
 Requires: hijra-applet
+
 %description -n gnome-shell-extension-hijra
+Hijri Tray Applet as GNOME shell extension.
 
+%description -n gnome-shell-extension-hijra -l ar
+بريمج صينية النّظام هجرة كامتداد جنوم شل.
 
 %prep
-%setup -q
+%autosetup -n %{name}-%{version}
+
 %build
+# No thing to Build.
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-%{__python} setup.py install \
-        --root=$RPM_BUILD_ROOT \
+%{__python2} setup.py install \
+        --root=%{buildroot} \
         --optimize=2
-%post applet
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+mkdir %{buildroot}/%{_datadir}/HijriTerminal/
+mkdir -p %{buildroot}%{_mandir}/man1/
+install -m 755 terminal/hijri %{buildroot}/%{_bindir}
+install -m 755 terminal/هجري %{buildroot}/%{_bindir}
+install -m 644 hijra.py %{buildroot}/%{_datadir}/HijriTerminal/hijri.py
+install -m 644 HijriCal.py %{buildroot}/%{_datadir}/HijriTerminal/
+install -m 644 terminal/hijri.1.gz %{buildroot}%{_mandir}/man1
+
+%files -n hijri
+%license waqf2-ar.pdf
+%{_datadir}/HijriTerminal
+%{_bindir}/hijri
+%{_bindir}/هجري
+%{_mandir}/*/hijri.*
+
+%files -n python-hijra
+%license waqf2-ar.pdf
+%{_datadir}/doc/hijra-python/*
+%{python2_sitelib}/*
 
-%files python
-/usr/share/doc/hijra-python/*
-%doc LICENSE-ar.txt LICENSE-en
-%{python_sitelib}/*
 %files applet
-%doc readme-ar.html LICENSE-ar.txt LICENSE-en
-/usr/bin/*
-/usr/share/hijra/*
+%license waqf2-ar.pdf
+%doc readme-ar.html
+%{_bindir}/HijriApplet
+%{_datadir}/hijra/*
 /etc/xdg/autostart/*
 
 %files -n gnome-shell-extension-hijra
-/usr/share/gnome-shell/extensions/HijriApplet at ojuba.org/*
-
+%{_datadir}/gnome-shell/extensions/HijriApplet at ojuba.org/*
 
 %changelog
+* Wed Feb 1 2017 Mosaab Alzoubi <moceap at hotmail.com> - 0.4.1-1
+- Support running under Wayland
+- Fix Hijri errors
+- Fix Python Gi warnings
+
+* Mon Jan 30 2017 Mosaab Alzoubi <moceap at hotmail.com> - 0.4-1
+- Update to 0.4
+- New way to Github
+
+* Thu Jul 23 2015 Mosaab Alzoubi <moceap at hotmail.com> - 0.3.2-2
+- General Revision
+- Use %%license
+- Remove old Group tag
+- Add man pages
+- Add Arabic Summaries and Descriptions
+
+* Fri Feb 28 2014 Mosaab Alzoubi <moceap at hotmail.com> - 0.3.2-1
+- Disable notify.
+
+* Sat Feb 15 2014 Mosaab Alzoubi <moceap at hotmail.com> - 0.3.1-1
+- Almasa Hijri program included into Hijra.
+- Full Rivision.
+- Fixes.
+
+* Sat Jun 2 2012  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.2.2-1
+- port to gtk3, webkit3
+
 * Fri Jan 13 2012  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.2.1-1
 - update for gnome 3.2 support
 
-* Wed Jul 20 2009  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.2.0-1
+* Mon Jul 20 2009  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.2.0-1
 - gnome 3 support
 
 * Sat Feb 14 2009  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.18-1
@@ -112,7 +174,7 @@ rm -rf $RPM_BUILD_ROOT
 * Sat Jan 3 2009  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.13-1
 - add tooltips
 
-* Sat Dec 31 2008  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.12-1
+* Wed Dec 31 2008  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.12-1
 - fix 31 Dec bug
 
 * Sat Dec 20 2008  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.11-2
@@ -130,4 +192,3 @@ rm -rf $RPM_BUILD_ROOT
 
 * Sat Jun 28 2008  Muayyad Saleh AlSadi <alsadi at ojuba.org> - 0.1.8-1
 - Initial packing
-
diff --git a/setup.py b/setup.py
index fb62407..6746902 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/python2
 
 from distutils.core import setup
 from glob import *
diff --git a/terminal/hijri b/terminal/hijri
new file mode 100644
index 0000000..3a867be
--- /dev/null
+++ b/terminal/hijri
@@ -0,0 +1,286 @@
+#! /bin/bash
+# Hijri Terminal 3.2
+# Under Waqf License 
+# By Mosaab Alzoubi (moceap at hotmail.com - facebook.com/moceap)
+# Almasa Project
+# 1436-10-5
+#---------------------------------------------------------------
+#---------------------------------------------------------------
+#----Main-vars--------------------------------------------------
+#---------------------------------------------------------------
+hi_dir="/usr/share/HijriTerminal"
+hi_arg="$@"
+hi_arg1="$1"
+hi_ver="3.2"
+hi_rel="1436-10-5"
+hi_end1="Y,M,D,W=cal.today"
+hi_end2="print Y,M,D"
+hi_header='#! /usr/bin/env python
+"""
+Hijri Terminal '$hi_ver'
+
+Under Waqf License 
+By Mosaab Alzoubi (moceap at hotmail.com - facebook.com/moceap)
+Almasa project
+'$hi_rel'
+"""
+import sys
+from HijriCal import HijriCal
+cal=HijriCal()
+'
+hi_help="~~ Hijri Terminal $hi_ver ~~
+Print Hijri date on terminal .
+
+Usage :
+hijri [options] [args] 
+
+Options :
+No options shows date of this day.
+-y   to show year only.
+-m   to show month only.
+-d   to show day only.
+-g | gregorian to show Hijri date of custom gregorian date.
+-v | --version to show version of program.
+-a | --about to show (about) messege.
+-h | --help to show this messege. 
+Args :
+arabic to show hijri date in Arabic words.
+gui use with arabic arg to display it with GUI.
+gd=<Number> Enter value of custom gregorian day.
+gm=<Number> Enter value of custom gregorian month.
+gy=<Number> Enter value of custom gregorian year.
+gdate=<Date> Enter custom date of these formats : 
+yyyy-mm-dd yyyy*mm*dd yyyy/mm/dd yyyy,mm,dd
+and you can enter less numbers like yyy-m-d .
+Examples : hijri
+hijri -y
+hijri -g gdate=2005-8-9
+hijri gregorian gd=9 gm=7 gy=958"
+hi_about="~~ Hijri Terminal $hi_ver ~~
+
+Under Waqf License 
+By Mosaab Alzoubi (moceap at hotmail.com - facebook.com/moceap)
+Almasa project
+$hi_rel
+
+Hijri Terminal $hi_ver also contain this two parts :
+
+*** Hijri Islamic Calendar converting functions,
+Copyright (c) 2006-2008 Muayyad Saleh Alsadi<alsadi at gmail.com>
+Under Waqf License 
+
+*** Hijri Islamic High level Calendar API,
+Copyright (c) 2006-2008 Muayyad Saleh Alsadi<alsadi at gmail.com>
+Under Waqf License 
+"
+hi_aboutar="~~ هجري الطرفية $hi_ver ~~
+
+منشور تحت بنود رخصة وقف
+بواسطة مصعب حسني الزعبي (moceap at hotmail.com - facebook.com/moceap)
+مشروع ألماسه
+$hi_rel
+
+هجري الطرفية $hi_ver يحتوي أيضاً على الجزئيتين :
+
+1 - دالات التحويل في التقويم الهجري الإسلامي
+منشورة برخصة وقف 2006 - 2008 بواسطة :
+مؤيد صالح السعدي (alsadi at gmail.com)
+
+2 - بيئة التقويم الهجري الإسلامي عالية المستوى
+منشورة برخصة وقف 2006 - 2008 بواسطة :
+مؤيد صالح السعدي (alsadi at gmail.com)
+"
+#---------------------------------------------------------------
+#----Main-dirs--------------------------------------------------
+#---------------------------------------------------------------
+if ( ! [ -e "$HOME/.Hijri Terminal" ] )
+	then
+		mkdir "$HOME/.Hijri Terminal"
+fi
+if ( ! [ -e "$HOME/.Hijri Terminal/hijri.py" ] )
+	then
+		cp "$hi_dir/hijri.py" "$HOME/.Hijri Terminal/hijri.py"
+fi
+if ( ! [ -e "$HOME/.Hijri Terminal/HijriCal.py" ] )
+	then
+		cp "$hi_dir/HijriCal.py" "$HOME/.Hijri Terminal/HijriCal.py"
+fi
+#---------------------------------------------------------------
+#----Args-------------------------------------------------------
+#---------------------------------------------------------------
+case "$hi_arg" in
+*arabic*) arabic="true"
+esac
+case "$hi_arg1" in
+-v|--version) echo "$hi_ver" ; exit ;;
+-a|--about) if [ "$arabic" = "true" ] ; then echo "$hi_aboutar" ; else echo "$hi_about" ; fi ; exit ;;
+-h|--help) echo "$hi_help" ; exit
+esac
+case "$hi_arg1" in
+*-*y*) hi_Y="Y," ; sep="true"
+esac
+case "$hi_arg1" in
+*-*m*) hi_M="M," ; sep="true"
+esac
+case "$hi_arg1" in
+*-*d*) hi_D="D," ; sep="true"
+esac
+case "$hi_arg1" in
+*-*w*) hi_W="W," ; sep="true"
+esac
+case "$hi_arg1" in
+*gregorian* | *-*g*) gregorian="true"
+esac
+case "$hi_arg" in
+*gui*) gui="رسومي"
+esac
+if [ "$sep" = "true" ]
+	then hi_end2="print $hi_Y$hi_M$hi_D$hi_W"
+fi
+#---------------------------------------------------------------
+#----Gregorian-to-Hijri-Converting------------------------------
+#---------------------------------------------------------------
+if [ "$gregorian" = "true" ]
+	then
+		touch "$HOME/.Hijri Terminal/args"
+		echo " " >> "$HOME/.Hijri Terminal/args"
+		for arg in $hi_arg
+			do
+				echo $arg >> "$HOME/.Hijri Terminal/args"
+			done
+		cat "$HOME/.Hijri Terminal/args" | while read Arg
+			do 
+				temp1=`echo $Arg | grep gdate= | sed "s:gdate=::g"`
+				if [ ! "$temp1" = "" ]
+					then echo "$temp1" > "$HOME/.Hijri Terminal/gdate"
+				fi
+				temp2=`echo $Arg | grep gy= | sed "s:gy=::g"`
+				if [ ! "$temp2" = "" ]
+					then
+						echo "$temp2" > "$HOME/.Hijri Terminal/gy"
+				fi
+				temp3=`echo $Arg | grep gm= | sed "s:gm=::g"`
+				if [ ! "$temp3" = "" ]
+					then
+						echo "$temp3" > "$HOME/.Hijri Terminal/gm"
+				fi
+				temp4=`echo $Arg | grep gd= | sed "s:gd=::g"`
+				if [ ! "$temp4" = "" ]
+					then
+						echo "$temp4" > "$HOME/.Hijri Terminal/gd"
+				fi
+			done
+		if [ -e "$HOME/.Hijri Terminal/gdate" ]
+			then gdate=$(cat "$HOME/.Hijri Terminal/gdate")
+			rm "$HOME/.Hijri Terminal/gdate"
+		fi
+		if [ -e "$HOME/.Hijri Terminal/gy" ]
+			then gy=$(cat "$HOME/.Hijri Terminal/gy")
+			rm "$HOME/.Hijri Terminal/gy"
+		fi
+		if [ -e "$HOME/.Hijri Terminal/gm" ]
+			then gm=$(cat "$HOME/.Hijri Terminal/gm")
+			rm "$HOME/.Hijri Terminal/gm"
+		fi
+		if [ -e "$HOME/.Hijri Terminal/gd" ]
+			then gd=$(cat "$HOME/.Hijri Terminal/gd")
+			rm "$HOME/.Hijri Terminal/gd"
+		fi
+		rm "$HOME/.Hijri Terminal/args"
+		if ( ! [ "$gy" = "" ])
+			then gdate1="disable"
+		fi
+		if ( ! [ "$gm" = "" ])
+			then gdate1="disable"
+		fi
+		if ( ! [ "$gd" = "" ])
+			then gdate1="disable"
+		fi
+		if [ "$gdate1" = "disable" ]
+			then
+				if [ ! "$gdate" = "" ]
+					then
+						echo "Error : Use only one way to enter gregorian date."
+						exit
+				fi
+		fi
+		touch "$HOME/.Hijri Terminal/args2"
+		g_date=`echo $gdate | sed "s:-: :g" | sed "s_/_ _g" | sed "s_*_ _g" | sed "s_,_ _g"`
+		n=0
+		for item in $g_date
+			do
+				let "n= $n + 1"
+				if [ $n = 1 ]
+					then g=gy
+				elif [ $n = 2 ]
+					then g=gm
+				elif [ $n = 3 ]
+					then g=gd
+				fi
+				echo "$g=$item" >> "$HOME/.Hijri Terminal/args2"
+			done
+		chmod +x "$HOME/.Hijri Terminal/args2"
+		source "$HOME/.Hijri Terminal/args2"
+		rm "$HOME/.Hijri Terminal/args2"
+		if [ "$gy" = "" ]
+			then echo "Error : Enter all required information to calculate."
+			exit
+		fi
+		if [ "$gm" = "" ]
+			then echo "Error : Enter all required information to calculate."
+			exit
+		fi
+		if [ "$gd" = "" ]
+			then echo "Error : Enter all required information to calculate."
+			exit
+		fi
+		kab1="`echo $gy/4 | bc -ql | cut -d'.' -f2`"
+		kab=`echo $kab1 | cut -c 1,2`
+		kabisa()
+		{
+		if [ $kab -eq 0 ]
+			then max=29
+			else max=28
+		fi
+		}
+		case $gm in
+		1|3|5|7|8|10|12) max=31 ;;
+		4|6|9|11) max=30 ;;
+		2) kabisa ;;
+		*) echo "Error : Month number is not exist." ; exit
+		esac
+		if [ $gd -gt $max ]
+			then echo "Error : Day number is not exist."
+			exit
+		fi
+		if [ $gy -le 623 ]
+			then echo "Error : Year number is not exist."
+			exit
+		fi
+		hi_end1='Y,M,D=cal.goto_gregorian_day('$gy','$gm','$gd')'
+		nday="`date --date $gy-$gm-$gd +%u`"
+fi
+#---------------------------------------------------------------
+#----Generating-and-run-main-program----------------------------
+#---------------------------------------------------------------
+echo "$hi_header
+$hi_end1
+$hi_end2" > "$HOME/.Hijri Terminal/finalapp"
+chmod +x "$HOME/.Hijri Terminal/finalapp"
+out="`"$HOME/.Hijri Terminal/finalapp"`"
+if [ "$arabic" = "true" ] ; then
+	if [ "$gregorian" = "true" ]
+		then هجري معين $out $nday $gui
+		else هجري
+	fi
+	else echo "$out"
+	rm "$HOME/.Hijri Terminal/finalapp"
+fi
+#---------------------------------------------------------------
+#----Allah-all-thanked-to-help-me-to-write-this-program---------
+#----and-I-ask-him-to-make-the-benefit-for-you------------------
+#----allah-can-do-that------------------------------------------
+#---------------------------------------------------------------
+#----With-our-best-wishes---------------------------------------
+#----almasa-project---------------------------------------------
+#---------------------------------------------------------------
diff --git a/terminal/hijri.1.gz b/terminal/hijri.1.gz
new file mode 100644
index 0000000..f99e861
Binary files /dev/null and b/terminal/hijri.1.gz differ
diff --git "a/terminal/\331\207\330\254\330\261\331\212" "b/terminal/\331\207\330\254\330\261\331\212"
new file mode 100755
index 0000000..bc514e8
--- /dev/null
+++ "b/terminal/\331\207\330\254\330\261\331\212"
@@ -0,0 +1,213 @@
+#! /bin/bash
+# Hijri Terminal 3.2
+# Under Waqf License 
+# By Mosaab Alzoubi (moceap at hotmail.com - facebook.com/moceap)
+# Almasa Project
+# 1436-10-5
+#---------------------------------------------------------------
+#---------------------------------------------------------------
+#---------------------------------------------------------------
+ver=$(hijri -v)
+arg="$@"
+arg1="$1"
+arg2="$2"
+arg3="$3"
+arg4="$4"
+arg5="$5"
+about="$(hijri -a arabic)"
+nday=$(date +%u)
+day=$(hijri -d)
+month=$(hijri -m)
+year=$(hijri -y)
+if [ "$arg1" = "معين" ]
+	then
+		nday=$arg5
+		day=$arg4
+		month=$arg3
+		year=$arg2
+		if [ "$day" = "" ] ; then echo "البيانات ناقصة" ; exit ; fi
+		if [ "$month" = "" ] ; then echo "البيانات ناقصة" ; exit ; fi
+		if [ "$year" = "" ] ; then echo "البيانات ناقصة" ; exit ; fi
+		con="`echo "$arg" | grep رسومي`"
+		if [ ! "$con" = "" ] ; then arg1="رسومي" ; fi
+fi
+n="${#year}"
+men="من شهر"
+sana="سنة"
+help="مساعدة ::
+
+لإظهار التاريخ الهجري لهذا اليوم شغل البرنامج بدون أي كلمة بعد الأمر هجري .
+لإظهار التاريخ بشكل رسومي أدخل كلمة رسومي مباشرة بعد الأمر هجري .
+
+لتحويل التاريخ الهجري من النمط الرقمي إلى النمط المكتوب استعمل الصيغة التالية :
+هجري معين <سنة> <شهر> <يوم>
+وإضافة كلمة رسومي في الآخر في حال الرغبة بتفعيل الشكل الرسومي
+مثال ::
+هجري معين 1434 7 22
+النتيجة :
+الثاني و العشرين من شهر رجب سنة أربع وثلاثين وأربعمئة وألف
+
+لإظهار معلومات عن البرنامج أدخل كلمة حول بعد الأمر هجري .
+لإظهار هذه المساعدة اكتب مساعدة بعد الأمر هجري ."
+if [ "$nday" = "1" ] ; then tnday="الإثنين" ; fi
+if [ "$nday" = "2" ] ; then tnday="الثلاثاء" ; fi
+if [ "$nday" = "3" ] ; then tnday="الأربعاء" ; fi
+if [ "$nday" = "4" ] ; then tnday="الخميس" ; fi
+if [ "$nday" = "5" ] ; then tnday="الجمعة" ; fi
+if [ "$nday" = "6" ] ; then tnday="السبت" ; fi
+if [ "$nday" = "7" ] ; then tnday="الأحد" ; fi
+if [ "$day" = "1" ] ; then tday="الأول" ; fi
+if [ "$day" = "2" ] ; then tday="الثاني" ; fi
+if [ "$day" = "3" ] ; then tday="الثالث" ; fi
+if [ "$day" = "4" ] ; then tday="الرابع" ; fi
+if [ "$day" = "5" ] ; then tday="الخامس" ; fi
+if [ "$day" = "6" ] ; then tday="السادس" ; fi
+if [ "$day" = "7" ] ; then tday="السابع" ; fi
+if [ "$day" = "8" ] ; then tday="الثامن" ; fi
+if [ "$day" = "9" ] ; then tday="التاسع" ; fi
+if [ "$day" = "10" ] ; then tday="العاشر" ; fi
+if [ "$day" = "11" ] ; then tday="الحادي عشر" ; fi
+if [ "$day" = "12" ] ; then tday="الثاني عشر" ; fi
+if [ "$day" = "13" ] ; then tday="الثالث عشر" ; fi
+if [ "$day" = "14" ] ; then tday="الرابع عشر" ; fi
+if [ "$day" = "15" ] ; then tday="الخامس عشر" ; fi
+if [ "$day" = "16" ] ; then tday="السادس عشر" ; fi
+if [ "$day" = "17" ] ; then tday="السابع عشر" ; fi
+if [ "$day" = "18" ] ; then tday="الثامن عشر" ; fi
+if [ "$day" = "19" ] ; then tday="التاسع عشر" ; fi
+if [ "$day" = "20" ] ; then tday="العشرين" ; fi
+if [ "$day" = "21" ] ; then tday="الحادي و العشرين" ; fi
+if [ "$day" = "22" ] ; then tday="الثاني و العشرين" ; fi
+if [ "$day" = "23" ] ; then tday="الثالث و العشرين" ; fi
+if [ "$day" = "24" ] ; then tday="الرابع و العشرين" ; fi
+if [ "$day" = "25" ] ; then tday="الخامس و العشرين" ; fi
+if [ "$day" = "26" ] ; then tday="السادس و العشرين" ; fi
+if [ "$day" = "27" ] ; then tday="السابع و العشرين" ; fi
+if [ "$day" = "28" ] ; then tday="الثامن و العشرين" ; fi
+if [ "$day" = "29" ] ; then tday="التاسع و العشرين" ; fi
+if [ "$day" = "30" ] ; then tday="الثلاثين" ; fi
+if [ "$month" = "1" ] ; then tmonth="محرم" ; fi
+if [ "$month" = "2" ] ; then tmonth="صفر" ; fi
+if [ "$month" = "3" ] ; then tmonth="ربيع الأول" ; fi
+if [ "$month" = "4" ] ; then tmonth="ربيع الثاني" ; fi
+if [ "$month" = "5" ] ; then tmonth="جمادى الأولى" ; fi
+if [ "$month" = "6" ] ; then tmonth="جمادى الثانية" ; fi
+if [ "$month" = "7" ] ; then tmonth="رجب" ; fi
+if [ "$month" = "8" ] ; then tmonth="شعبان" ; fi
+if [ "$month" = "9" ] ; then tmonth="رمضان" ; fi
+if [ "$month" = "10" ] ; then tmonth="شوال" ; fi
+if [ "$month" = "11" ] ; then tmonth="ذي القعدة" ; fi
+if [ "$month" = "12" ] ; then tmonth="ذي الحجة" ; fi
+if [ "$n" = "1" ] ; then
+firsty="$year" ; fi
+if [ "$n" = "2" ] ; then
+firsty="`echo $year | cut -c 2`"
+secondy="`echo $year | cut -c 1`"; fi
+if [ "$n" = "3" ] ; then
+firsty="`echo $year | cut -c 3`"
+secondy="`echo $year | cut -c 2`"
+thirdy="`echo $year | cut -c 1`"; fi
+if [ "$n" = "4" ] ; then
+firsty="`echo $year | cut -c 4`"
+secondy="`echo $year | cut -c 3`"
+thirdy="`echo $year | cut -c 2`"
+forthy="`echo $year | cut -c 1`"; fi
+if [ "$n" -gt "4" ] ; then
+echo "عذراً يدعم هذا البرنامج السنوات الهجرية حتى 9999 ويمكن التعديل عليه كونه مفتوح المصدر ، فلا تبخل بتطويره إن رأيت الحاجة لذلك"
+exit ; fi
+bel()
+{
+if [ "$firsty" = "0" ] ; then tfirsty="عشر" ; fi
+if [ "$firsty" = "1" ] ; then tfirsty="أحد عشر" ; fi
+if [ "$firsty" = "2" ] ; then tfirsty="إثني عشر" ; fi
+if [ "$firsty" = "3" ] ; then tfirsty="ثلاث عشر" ; fi
+if [ "$firsty" = "4" ] ; then tfirsty="أربع عشر" ; fi
+if [ "$firsty" = "5" ] ; then tfirsty="خمس عشر" ; fi
+if [ "$firsty" = "6" ] ; then tfirsty="ست عشر" ; fi
+if [ "$firsty" = "7" ] ; then tfirsty="سبع عشر" ; fi
+if [ "$firsty" = "8" ] ; then tfirsty="ثمان عشر" ; fi
+if [ "$firsty" = "9" ] ; then tfirsty="تسع عشر" ; fi
+}
+akthar()
+{
+if [ "$firsty" = "0" ] ; then tfirsty="" ; fi
+if [ "$firsty" = "1" ] ; then tfirsty="واحد" ; fi
+if [ "$firsty" = "2" ] ; then tfirsty="اثنين" ; fi
+if [ "$firsty" = "3" ] ; then tfirsty="ثلاث" ; fi
+if [ "$firsty" = "4" ] ; then tfirsty="أربع" ; fi
+if [ "$firsty" = "5" ] ; then tfirsty="خمس" ; fi
+if [ "$firsty" = "6" ] ; then tfirsty="ست" ; fi
+if [ "$firsty" = "7" ] ; then tfirsty="سبع" ; fi
+if [ "$firsty" = "8" ] ; then tfirsty="ثمان" ; fi
+if [ "$firsty" = "9" ] ; then tfirsty="تسع" ; fi
+}
+if [ "$secondy" = "0" ] ; then tsecondy="" ; fi
+if [ "$secondy" = "1" ] ; then bel ; else akthar ; fi
+if [ "$secondy" = "2" ] ; then tsecondy="وعشرين" ; fi
+if [ "$secondy" = "3" ] ; then tsecondy="وثلاثين" ; fi
+if [ "$secondy" = "4" ] ; then tsecondy="وأربعين" ; fi
+if [ "$secondy" = "5" ] ; then tsecondy="وخمسين" ; fi
+if [ "$secondy" = "6" ] ; then tsecondy="وستين" ; fi
+if [ "$secondy" = "7" ] ; then tsecondy="وسبعين" ; fi
+if [ "$secondy" = "8" ] ; then tsecondy="وثمانين" ; fi
+if [ "$secondy" = "9" ] ; then tsecondy="وتسعين" ; fi
+if [ "$thirdy" = "0" ] ; then thirdy="" ; fi
+if [ "$thirdy" = "1" ] ; then thirdy="ومئة" ; fi
+if [ "$thirdy" = "2" ] ; then thirdy="ومئتين" ; fi
+if [ "$thirdy" = "3" ] ; then thirdy="وثلاثمئة" ; fi
+if [ "$thirdy" = "4" ] ; then thirdy="وأربعمئة" ; fi
+if [ "$thirdy" = "5" ] ; then thirdy="وخمسمئة" ; fi
+if [ "$thirdy" = "6" ] ; then thirdy="وستمئة" ; fi
+if [ "$thirdy" = "7" ] ; then thirdy="وسبعمئة" ; fi
+if [ "$thirdy" = "8" ] ; then thirdy="وثمانمئة" ; fi
+if [ "$thirdy" = "9" ] ; then thirdy="وتسعمئة" ; fi
+if [ "$forthy" = "0" ] ; then forthy="" ; fi
+if [ "$forthy" = "1" ] ; then forthy="وألف" ; fi
+if [ "$forthy" = "2" ] ; then forthy="وألفين" ; fi
+if [ "$forthy" = "3" ] ; then forthy="وثلاث آلاف" ; fi
+if [ "$forthy" = "4" ] ; then forthy="وأربع آلاف" ; fi
+if [ "$forthy" = "5" ] ; then forthy="وخمس آلاف" ; fi
+if [ "$forthy" = "6" ] ; then forthy="وست آلاف" ; fi
+if [ "$forthy" = "7" ] ; then forthy="وسبع آلاف" ; fi
+if [ "$forthy" = "8" ] ; then forthy="وثمان آلاف" ; fi
+if [ "$forthy" = "9" ] ; then forthy="وتسع آلاف" ; fi
+hijridate="`echo $tnday $tday $men $tmonth $sana $tfirsty $tsecondy $thirdy $forthy | sed "s:  : :g" | sed "s:  : :g"`"
+h_gnome()
+{
+zenity --title="هجري $ver" --info --text="$hijridate"
+}
+h_kde()
+{
+kdialog --title="هجري $ver" --msgbox "$hijridate"
+}
+h_gui()
+{
+if test -x "`which zenity 2>/dev/null`"
+    then
+        h_gnome
+elif test -x "`which kdialog 2>/dev/null`"
+    then
+        h_kde
+else echo "لا تتوفر واجهة رسومية مدعومة مثبتة"
+fi
+}
+if [ "$arg1" = "رسومي" ]
+	then h_gui
+elif [ "$arg1" = "حول" ]
+	then echo "$about" ; exit
+elif [ "$arg1" = "مساعدة" ]
+	then echo "$help" ; exit
+elif [ "$arg1" = "--help" ]
+	then echo "$help" ; exit
+elif [ "$arg1" = "مختصر" ]
+	then echo "$day $tmonth $year" ; exit
+	else echo "$hijridate"
+fi
+#---------------------------------------------------------------
+#----Allah-all-thanked-to-help-me-to-write-this-program---------
+#----and-I-ask-him-to-make-the-benefit-for-you------------------
+#----allah-can-do-that------------------------------------------
+#---------------------------------------------------------------
+#----With-our-best-wishes---------------------------------------
+#----almasa-project---------------------------------------------
+#---------------------------------------------------------------
diff --git a/waqf2-ar.pdf b/waqf2-ar.pdf
new file mode 100644
index 0000000..b4a0f47
Binary files /dev/null and b/waqf2-ar.pdf differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-islamic/packages/hijra.git



More information about the Debian-islamic-commits mailing list