newmurrineconfigurator/0000755000175000017500000000000010573120736015274 5ustar johnnyjohnnynewmurrineconfigurator/README0000644000175000017500000000141010571026071016143 0ustar johnnyjohnny RUN NEW MURRINE CONFIGURATOR === Run New Murrine Configurator by execute * ./newmurrineconfigurator.py or * python newmurrineconfigurator.py REPORTING BUGS AND SUBMITTING PATCHES === Report new bugs on http://murrine.netsons.org/?q=node/8. Please check for duplicates, *especially* if you are reporting a feature request. Please do *not* add "me too!" or "yes I really want this!" comments to feature requests. Please read http://murrine.netsons.org/?q=project/issues/newmurrineconfigurator&categories=feature prior to adding any kind of flame about missing features or misfeatures. Feel free to send patches too; NMC is relatively small and simple, so if you find a bug or want to add a feature it should be pretty easy. Send me mail, or put the patch in site. newmurrineconfigurator/NEWS0000644000175000017500000000077010574533404016000 0ustar johnnyjohnny1.4 ==== - automatic themes' list sort - add scrollbar color feature 1.3 ===== - add preview feature - fix some bugs 1.2 ===== - add fast save feature - add def value for hilight_ratio and contrast (when not present) 1.1 ====== - add menustyle option (to enable/disable vertical bar in menus) - fix some bugs 1.0 ====== - GUI improved for better interaction - add sort and search capabilities to theme list - add contrast, hilight ratio and gradients options - fix some bugs newmurrineconfigurator/src/0000755000175000017500000000000010573120736016063 5ustar johnnyjohnnynewmurrineconfigurator/src/gtkrcengine.py0000644000175000017500000002615110574534435020750 0ustar johnnyjohnny############################################################################ # Copyright (C) 2007 by Giovanni Bezicheri # # ioannissecundi@gmail.com # # # # This program is free software; you can redistribute it and#or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # 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. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ import sys import os import re import glob import commands class GtkrcEngine: """Manages gtkrc theme files""" def __init__(self): pass def setrc(self, file, theme): self.file = file self.theme = theme gtkrc = open(file, "r") # open file gtkrc self.rcstr = gtkrc.read() # read all content gtkrc.close # isolate murrine config section self.rcstr = re.compile('engine "murrine"[^}]*').search(self.rcstr).group() def writeChanges(self): # read config gtkrc = open(self.file, "r") config = gtkrc.read() gtkrc.close config = re.compile('engine "murrine"[^}]*').sub(self.rcstr, config) # hard write to file gtkrc = open(self.file, "w") config = gtkrc.write(config) gtkrc.close def getRcStyle(self): # return rc style gtkrc = open(self.file, "r") config = gtkrc.read() gtkrc.close config = re.compile('engine "murrine"[^}]*').sub(self.rcstr, config) return config def writeGnome(self): if str(commands.getoutput("gconftool-2 -g /desktop/gnome/interface/gtk_theme")) == self.theme: os.popen("gconftool-2 -u /desktop/gnome/interface/gtk_theme") os.popen("gconftool-2 -s -t string /desktop/gnome/interface/gtk_theme " + self.theme) def writeXfce(self): os.popen("xfce-setting-show ui") def writeGtk2(self): currdir = os.getcwd() os.chdir(os.environ.get("HOME")) # chdir ~ for file in glob.glob('.gtkrc-2.0'): if str(file) == ".gtkrc-2.0": gtkrc2 = open(".gtkrc-2.0", "r") buff = gtkrc2.read() gtkrc2.close() buff = re.compile('include.*gtkrc\"').sub("include \"" + currdir + "/" + self.file + "\"", buff) gtkrc2 = open(".gtkrc-2.0", "w") gtkrc2.write(buff) gtkrc2.close() os.chdir(currdir) def setStyleOpt(self, opt, value): if opt == "glazestyle": self.setGlazeStyle(value) if opt == "roundnessstyle": self.setRoundnessStyle(value) if opt == "menubarstyle": self.setMenubarStyle(value) if opt == "menubaritemsstyle": self.setMenubaritemsStyle(value) if opt == "menuitemsstyle": self.setMenuitemsStyle(value) if opt == "listviewheadersstyle": self.setListviewheadersStyle(value) if opt == "listviewstyle": self.setListviewStyle(value) if opt == "scrollbarstyle": self.setScrollbarStyle(value) if opt == "animation": self.setAnimationsStyle(value) if opt == "gradients": self.setGradientsStyle(value) if opt == "contrast": self.setContrastStyle(value) if opt == "hilight_ratio": self.setHilightRatio(value) if opt == "menustyle": self.setMenuStyle(value) if opt == "scrollbar_color": self.setScrollbarColor(value) def setGlazeStyle(self, value): if re.compile('glazestyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('glazestyle\s*=\s*\d').sub("glazestyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " glazestyle = " + value + "\n " def setRoundnessStyle(self, value): if re.compile('roundness\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('roundness\s*=\s*\d').sub("roundness = " + value, self.rcstr) else: self.rcstr = self.rcstr + " roundness = " + value + "\n " def setMenubarStyle(self, value): if re.compile('menubarstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('menubarstyle\s*=\s*\d').sub("menubarstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " menubarstyle = " + value + "\n " def setMenubaritemsStyle(self, value): if re.compile('menubaritemstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('menubaritemstyle\s*=\s*\d').sub("menubaritemstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " menubaritemstyle = " + value + "\n " def setMenuitemsStyle(self, value): if re.compile('menuitemstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('menuitemstyle\s*=\s*\d').sub("menuitemstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " menuitemstyle = " + value + "\n " def setListviewheadersStyle(self, value): if re.compile('listviewheaderstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('listviewheaderstyle\s*=\s*\d').sub("listviewheaderstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " listviewheaderstyle = " + value + "\n " def setListviewStyle(self, value): if re.compile('listviewstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('listviewstyle\s*=\s*\d').sub("listviewstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " listviewstyle = " + value + "\n " def setScrollbarStyle(self, value): if re.compile('scrollbarstyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('scrollbarstyle\s*=\s*\d').sub("scrollbarstyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " scrollbarstyle = " + value + "\n " def setAnimationsStyle(self, value): if int(value) == 1: bool_value = "TRUE" else: bool_value = "FALSE" if re.compile('animation\s*=\s*(TRUE|FALSE)').search(self.rcstr) != None: self.rcstr = re.compile('animation\s*=\s*(TRUE|FALSE)').sub("animation = " + bool_value, self.rcstr) else: self.rcstr = self.rcstr + " animation = " + bool_value + "\n " def setGradientsStyle(self, value): if int(value) == 1: bool_value = "TRUE" else: bool_value = "FALSE" if re.compile('gradients\s*=\s*(TRUE|FALSE)').search(self.rcstr) != None: self.rcstr = re.compile('gradients\s*=\s*(TRUE|FALSE)').sub("gradients = " + bool_value, self.rcstr) else: self.rcstr = self.rcstr + " gradients = " + bool_value + "\n " def setContrastStyle(self, value): if re.compile('contrast\s*=\s*\d\.\d*').search(self.rcstr) != None: self.rcstr = re.compile('contrast\s*=\s*\d\.\d*').sub("contrast = " + value, self.rcstr) else: self.rcstr = self.rcstr + " contrast = " + value + "\n " def setHilightRatio(self, value): if re.compile('hilight_ratio\s*=\s*\d\.\d*').search(self.rcstr) != None: self.rcstr = re.compile('hilight_ratio\s*=\s*\d\.\d*').sub("hilight_ratio = " + value, self.rcstr) else: self.rcstr = self.rcstr + " hilight_ratio = " + value + "\n " def setMenuStyle(self, value): if re.compile('menustyle\s*=\s*\d').search(self.rcstr) != None: self.rcstr = re.compile('menustyle\s*=\s*\d').sub("menustyle = " + value, self.rcstr) else: self.rcstr = self.rcstr + " menustyle = " + value + "\n " def setScrollbarColor(self, value): if re.compile('scrollbar_color\s*=\s*\".*\"').search(self.rcstr) != None: self.rcstr = re.compile('scrollbar_color\s*=\s*\".*\"').sub("scrollbar_color = " + value, self.rcstr) else: self.rcstr = self.rcstr + " scrollbar_color = " + value + "\n " def getStyleOpt(self, opt): if opt == "glazestyle": return self.getGlazeStyle() if opt == "roundnessstyle": return self.getRoundnessStyle() if opt == "menubarstyle": return self.getMenubarStyle() if opt == "menubaritemsstyle": return self.getMenubaritemsStyle() if opt == "menuitemsstyle": return self.getMenuitemsStyle() if opt == "listviewheadersstyle": return self.getListviewheadersStyle() if opt == "listviewstyle": return self.getListviewStyle() if opt == "scrollbarstyle": return self.getScrollbarStyle() if opt == "animation": return self.getAnimationsStyle() if opt == "gradients": return self.getGradientsStyle() if opt == "contrast": return self.getContrastStyle() if opt == "hilight_ratio": return self.getHilightRatio() if opt == "menustyle": return self.getMenuStyle() if opt == "scrollbar_color": return self.getScrollbarColor() def getGlazeStyle(self): try: return re.compile('glazestyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getRoundnessStyle(self): try: return re.compile('roundness\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getMenubarStyle(self): try: return re.compile('menubarstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getMenubaritemsStyle(self): try: return re.compile('menubaritemstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getMenuitemsStyle(self): try: return re.compile('menuitemstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getListviewheadersStyle(self): try: return re.compile('listviewheaderstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getListviewStyle(self): try: return re.compile('listviewstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getScrollbarStyle(self): try: return re.compile('scrollbarstyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getAnimationsStyle(self): try: if re.compile('animation\s*=\s*(TRUE|FALSE)').search(self.rcstr).group()[-4:] == "TRUE": return 1 else: return 0 except AttributeError: return None def getGradientsStyle(self): try: if re.compile('gradients\s*=\s*(TRUE|FALSE)').search(self.rcstr).group()[-4:] == "TRUE": return 1 else: return 0 except AttributeError: return None def getContrastStyle(self): try: return re.compile('\d\.\d*').findall(re.compile('contrast\s*=\s*\d\.\d*').search(self.rcstr).group())[0] except AttributeError: return None def getHilightRatio(self): try: return re.compile('\d\.\d*').findall(re.compile('hilight_ratio\s*=\s*\d\.\d*').search(self.rcstr).group())[0] except AttributeError: return None def getMenuStyle(self): try: return re.compile('menustyle\s*=\s*\d').search(self.rcstr).group()[-1] except AttributeError: return None def getScrollbarColor(self): try: return re.compile('scrollbar_color\s*=\s*\".*\"').search(self.rcstr).group()[-8:-1] except AttributeError: return Nonenewmurrineconfigurator/src/gtkrcengine.pyc0000644000175000017500000003127610574534435021117 0ustar johnnyjohnnym Ec@sDdkZdkZdkZdkZdkZdfdYZdS(Nt GtkrcEnginecBs[tZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'RS(&sManages gtkrc theme filescCsdS(N((tself((t;/home/johnny/projects/newmurrineconfigurator/gtkrcengine.pyt__init__scCs_||_||_t|d}|i|_|iti di |ii |_dS(Ntrsengine "murrine"[^}]*( tfileRtthemetopentgtkrctreadtrcstrtclosetretcompiletsearchtgroup(RRRR((Rtsetrcs   cCsot|id}|i}|itidi |i |}t|id}|i |}|idS(NRsengine "murrine"[^}]*tw( RRRRR tconfigR R R tsubR twrite(RRR((Rt writeChanges's cCsGt|id}|i}|itidi |i |}|S(NRsengine "murrine"[^}]*( RRRRR RR R R RR (RRR((Rt getRcStyle1s  cCsHttid|ijotidntid|idS(Ns1gconftool-2 -g /desktop/gnome/interface/gtk_themes1gconftool-2 -u /desktop/gnome/interface/gtk_themes<gconftool-2 -s -t string /desktop/gnome/interface/gtk_theme (tstrtcommandst getoutputRRtostpopen(R((Rt writeGnome8scCstiddS(Nsxfce-setting-show ui(RR(R((Rt writeXfce=scCsti}titiidxtidD]}t|djo}t dd}|i }|i tidid|d|id|}t dd}|i||i q5q5Wti|dS( NtHOMEs .gtkrc-2.0Rsinclude.*gtkrc"s include "t/s"R(RtgetcwdtcurrdirtchdirtenvirontgettglobRRRtgtkrc2R tbuffR R R RRR(RR&RR!R'((Rt writeGtk2?s   . cCs|djo|i|n|djo|i|n|djo|i|n|djo|i|n|djo|i|n|djo|i|n|djo|i |n|djo|i |n|d jo|i |n|d jo|i |n|d jo|i |n|d jo|i|n|d jo|i|n|djo|i|ndS(Nt glazestyletroundnessstylet menubarstyletmenubaritemsstyletmenuitemsstyletlistviewheadersstylet listviewstyletscrollbarstylet animationt gradientstcontrastt hilight_ratiot menustyletscrollbar_color(toptRt setGlazeStyletvaluetsetRoundnessStyletsetMenubarStyletsetMenubaritemsStyletsetMenuitemsStyletsetListviewheadersStyletsetListviewStyletsetScrollbarStyletsetAnimationsStyletsetGradientsStyletsetContrastStyletsetHilightRatiot setMenuStyletsetScrollbarColor(RR7R9((Rt setStyleOptLs8              cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsglazestyle\s*=\s*\ds glazestyle = s glazestyle = s (R R RRR tNoneRR9(RR9((RR8is")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsroundness\s*=\s*\ds roundness = s roundness = s (R R RRR RHRR9(RR9((RR:ns")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsmenubarstyle\s*=\s*\dsmenubarstyle = s menubarstyle = s (R R RRR RHRR9(RR9((RR;ss")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsmenubaritemstyle\s*=\s*\dsmenubaritemstyle = s menubaritemstyle = s (R R RRR RHRR9(RR9((RR<xs")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsmenuitemstyle\s*=\s*\dsmenuitemstyle = s menuitemstyle = s (R R RRR RHRR9(RR9((RR=}s")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nslistviewheaderstyle\s*=\s*\dslistviewheaderstyle = s listviewheaderstyle = s (R R RRR RHRR9(RR9((RR>s")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nslistviewstyle\s*=\s*\dslistviewstyle = s listviewstyle = s (R R RRR RHRR9(RR9((RR?s")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsscrollbarstyle\s*=\s*\dsscrollbarstyle = s scrollbarstyle = s (R R RRR RHRR9(RR9((RR@s")cCst|djo d}nd}tidi|idjo)tidi d||i|_n|id|d|_dS(NitTRUEtFALSEsanimation\s*=\s*(TRUE|FALSE)s animation = s animation = s ( tintR9t bool_valueR R RRR RHR(RR9RL((RRAs  ")cCst|djo d}nd}tidi|idjo)tidi d||i|_n|id|d|_dS(NiRIRJsgradients\s*=\s*(TRUE|FALSE)s gradients = s gradients = s ( RKR9RLR R RRR RHR(RR9RL((RRBs  ")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nscontrast\s*=\s*\d\.\d*s contrast = s contrast = s (R R RRR RHRR9(RR9((RRCs")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nshilight_ratio\s*=\s*\d\.\d*shilight_ratio = s hilight_ratio = s (R R RRR RHRR9(RR9((RRDs")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsmenustyle\s*=\s*\ds menustyle = s menustyle = s (R R RRR RHRR9(RR9((RREs")cCsgtidi|idjo)tidid||i|_n|id|d|_dS(Nsscrollbar_color\s*=\s*".*"sscrollbar_color = s scrollbar_color = s (R R RRR RHRR9(RR9((RRFs")cCs~|djo|iSn|djo|iSn|djo|iSn|djo|iSn|djo|iSn|djo|iSn|djo|iSn|djo|i Sn|d jo|i Sn|d jo|i Sn|d jo|i Sn|d jo|i Sn|d jo|iSn|djo|iSndS(NR)R*R+R,R-R.R/R0R1R2R3R4R5R6(R7Rt getGlazeStyletgetRoundnessStyletgetMenubarStyletgetMenubaritemsStyletgetMenuitemsStyletgetListviewheadersStyletgetListviewStyletgetScrollbarStyletgetAnimationsStyletgetGradientsStyletgetContrastStyletgetHilightRatiot getMenuStyletgetScrollbarColor(RR7((Rt getStyleOpts8              cCsEy'tidi|iidSWntj o dSnXdS(Nsglazestyle\s*=\s*\di(R R RRR RtAttributeErrorRH(R((RRMs'cCsEy'tidi|iidSWntj o dSnXdS(Nsroundness\s*=\s*\di(R R RRR RR\RH(R((RRNs'cCsEy'tidi|iidSWntj o dSnXdS(Nsmenubarstyle\s*=\s*\di(R R RRR RR\RH(R((RROs'cCsEy'tidi|iidSWntj o dSnXdS(Nsmenubaritemstyle\s*=\s*\di(R R RRR RR\RH(R((RRPs'cCsEy'tidi|iidSWntj o dSnXdS(Nsmenuitemstyle\s*=\s*\di(R R RRR RR\RH(R((RRQs'cCsEy'tidi|iidSWntj o dSnXdS(Nslistviewheaderstyle\s*=\s*\di(R R RRR RR\RH(R((RRRs'cCsEy'tidi|iidSWntj o dSnXdS(Nslistviewstyle\s*=\s*\di(R R RRR RR\RH(R((RRSs'cCsEy'tidi|iidSWntj o dSnXdS(Nsscrollbarstyle\s*=\s*\di(R R RRR RR\RH(R((RRTs'cCsZy<tidi|iiddjodSndSWntj o dSnXdS(Nsanimation\s*=\s*(TRUE|FALSE)iRIii(R R RRR RR\RH(R((RRUs ,cCsZy<tidi|iiddjodSndSWntj o dSnXdS(Nsgradients\s*=\s*(TRUE|FALSE)iRIii(R R RRR RR\RH(R((RRVs ,cCsWy9tiditidi|iidSWntj o dSnXdS(Ns\d\.\d*scontrast\s*=\s*\d\.\d*i( R R tfindallRRR RR\RH(R((RRW s9cCsWy9tiditidi|iidSWntj o dSnXdS(Ns\d\.\d*shilight_ratio\s*=\s*\d\.\d*i( R R R]RRR RR\RH(R((RRXs9cCsEy'tidi|iidSWntj o dSnXdS(Nsmenustyle\s*=\s*\di(R R RRR RR\RH(R((RRYs'cCsHy*tidi|iidd!SWntj o dSnXdS(Nsscrollbar_color\s*=\s*".*"ii(R R RRR RR\RH(R((RRZs*((t__name__t __module__t__doc__RRRRRRR(RGR8R:R;R<R=R>R?R@RARBRCRDRERFR[RMRNRORPRQRRRSRTRURVRWRXRYRZ(((RRsL                                 (tsysRR R%RR(RRR%RaR R((Rt?s     newmurrineconfigurator/src/newmurrineconfigurator.py0000755000175000017500000002367510574534435023301 0ustar johnnyjohnny#!/usr/bin/env python ############################################################################ # Copyright (C) 2007 by Giovanni Bezicheri # # ioannissecundi@gmail.com # # # # This program is free software; you can redistribute it and#or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # 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. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ import sys import os import support import glob import gobject import gtkrcengine import savedialog import previewdialog import commands try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class MurrineConfigurator: """Murrine configurator class""" def __init__(self): pathname = os.path.dirname(sys.argv[0]) self.WORKDIR = os.path.abspath(pathname) self.currdir = os.getcwd() # load from glade self.gladefile = self.WORKDIR + "/murrine-config.glade" self.glade = gtk.glade.XML(self.gladefile, "appwindow") self.dlg = self.glade.get_widget("appwindow") self.themesScrollbar = self.glade.get_widget("themesScrollbar") self.infoLabel = self.glade.get_widget("infoLabel") self.glazeLabel = self.glade.get_widget("glazeLabel") frame0 = self.glade.get_widget("frame0") self.engine = gtkrcengine.GtkrcEngine() # init and place options lists gui self.selection = None # prec selection in save dialog self.previewShow = False # preview is show or not self.themesView = gtk.TreeView() self.themesView.set_size_request(410, 222) frame0.add(self.themesView) self.themesView.show() self.previewDialog = None self.previewPage = 0 self.optionSelected = None # set position self.dlg.move(self.dlg.get_position()[0] + 180, self.dlg.get_position()[1]) # show all self.dlg.show_all # apply models self.themesScrollbar.connect('value-changed', self.onScroll, self.themesView) self.themesView.connect('scroll-event', self.onScrollEvent) # themes dir = os.chdir(os.environ.get("HOME") + "/.themes") # chdir ~/.themes self.infoLabel.set_text("Here are shown the Murrine placed in " + os.getcwd() + "\nClick on column header to sort themes or type first letters of your\nsearch's target to find it.") self.themesView.set_model(self.makeThemesFileModel()) os.chdir(self.currdir) # restore dir self.initView("", "Themes").connect('toggled', self.onToggle) self.themesView.get_column(1).clicked() # connections connections = {"on_mainWindow_destroy" : gtk.main_quit , "closeDialog" : gtk.main_quit, "saveConfig" : self.saveConfig, "preview" : self.preview} self.glade.signal_autoconnect(connections) # manage groups self.glazeGroup = support.RadioWrapper("glazestyle", ["Flat Hilight","Curved Hilight","Concave style","Top Curved Hilight","Beryl Hilight"],self.glade.get_widget("glazeFlat"), self.engine, self) self.animationGroup = support.RadioWrapper("animation", ["Disable","Enable"],self.glade.get_widget("animationEnable"), self.engine, self) self.menubarGroup = support.RadioWrapper("menubarstyle", ["Flat","Glassy (it follows selected glazestyle)","Gradient","Striped"],self.glade.get_widget("menubarFlat"), self.engine, self) self.menubaritemsGroup = support.RadioWrapper("menubaritemsstyle", ["Menuitem look","Button look"],self.glade.get_widget("menubaritemsMenuitem"), self.engine, self) self.menuitemsGroup = support.RadioWrapper("menuitemsstyle", ["Flat","Glassy (it follows selected glazestyle)", "Striped"],self.glade.get_widget("menuitemsFlat"), self.engine, self) self.listviewheadersGroup = support.RadioWrapper("listviewheadersstyle", ["Flat","Glassy (it follows selected glazestyle)", "Raised"],self.glade.get_widget("listviewHeadersFlat"), self.engine, self) self.listviewGroup = support.RadioWrapper("listviewstyle", ["Nothing (completely flat)","Dotted separators"],self.glade.get_widget("listviewSepMenuitem"), self.engine, self) self.scrollbarGroup = support.RadioWrapper("scrollbarstyle", ["Nothing added","Circles","Handles","Diagonal stripes", "Diagonal stripes and handles","Horizontal stripes","Horizontal stripes and handles"],self.glade.get_widget("scrollbarNothing"), self.engine, self) self.gradientsGroup = support.RadioWrapper("gradients", ["Disable","Enable"],self.glade.get_widget("gradientsEnable"), self.engine, self) # init roundness combo self.roundnessGroup = support.ComboWrapper("roundnessstyle",self.glade.get_widget("roundness"), self.engine, self) # init hilight scale self.hilightGroup = support.ScaleWrapper("hilight_ratio", 1, self.glade.get_widget("hilightRatio"), self.engine) self.contrastGroup = support.ScaleWrapper("contrast", 1, self.glade.get_widget("contrastRatio"), self.engine) # menus vertical bar controls self.menuvbarGroup = support.RadioWrapper("menustyle", ["Disable","Enable"],self.glade.get_widget("verticalbarGroup"), self.engine, self) # color controls self.scrollbarCB = support.colorWrapper( "scrollbar_color", self.glade.get_widget("scrollbarColorButton"), self.engine, self) def onScroll(self, range, view): view.scroll_to_point(0, int(range.get_value())) def onScrollEvent(self, view, event): if event.direction == gtk.gdk.SCROLL_UP: self.themesScrollbar.set_value(self.themesScrollbar.get_value() - 10) else: self.themesScrollbar.set_value(self.themesScrollbar.get_value() + 10) def makeThemesFileModel(self): # makes theme file list model themesFileList = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING) for theme in glob.glob('*Murrina*'): themesFileList.append([False, theme]) self.themesScrollbar.set_range(0, len(themesFileList)*20) return themesFileList def initView(self, caption1 = "", caption2 = ""): self.themesView.set_rules_hint(True) cellToggle = gtk.CellRendererToggle() cellText = gtk.CellRendererText() column1 = gtk.TreeViewColumn("") column1.pack_start(cellToggle, True) column1.set_attributes(cellToggle, active = 0) cellToggle.set_radio(True) self.themesView.get_selection().set_mode(gtk.SELECTION_NONE) column1.set_clickable(True) column2 = gtk.TreeViewColumn(caption2) column2.pack_end(cellText, True) column2.set_attributes(cellText, text = 1) column1.set_clickable(False) self.themesView.set_enable_search(True) self.themesView.set_search_column(1) # sorting column2.set_sort_column_id(1) column2.set_sort_order(gtk.SORT_ASCENDING) column2.set_sort_indicator(True) # append columns self.themesView.append_column(column1) self.themesView.append_column(column2) return cellToggle def resetToggle(self, model, path, iter, n): if int(n) != int(path[0]): model.set_value(iter, 0, False) def onToggle(self, object, path): self.themesView.get_model().set_value(self.themesView.get_model().get_iter(path), 0, True) iter = self.themesView.get_model().get_iter("0") self.themesView.get_model().foreach(self.resetToggle, path) self.optionSelected = str(self.themesView.get_model().get_value(self.themesView.get_model().get_iter(path), 1)) # working theme self.engine.setrc(os.environ.get("HOME") + "/.themes/" + self.optionSelected + "/gtk-2.0/gtkrc", self.optionSelected) self.glazeGroup.initStatus() self.menubarGroup.initStatus() self.menubaritemsGroup.initStatus() self.menuitemsGroup.initStatus() self.animationGroup.initStatus() self.listviewheadersGroup.initStatus() self.listviewGroup.initStatus() self.scrollbarGroup.initStatus() self.roundnessGroup.initStatus() self.gradientsGroup.initStatus() self.contrastGroup.initStatus() self.hilightGroup.initStatus() self.menuvbarGroup.initStatus() self.scrollbarCB.initStatus() def writeProperties(self): self.glazeGroup.writeProperty() self.menubarGroup.writeProperty() self.menubaritemsGroup.writeProperty() self.menuitemsGroup.writeProperty() self.animationGroup.writeProperty() self.listviewheadersGroup.writeProperty() self.listviewGroup.writeProperty() self.scrollbarGroup.writeProperty() self.roundnessGroup.writeProperty() self.gradientsGroup.writeProperty() self.contrastGroup.writeProperty() self.hilightGroup.writeProperty() self.menuvbarGroup.writeProperty() self.scrollbarCB.writeProperty() def saveConfig(self, widget): self.writeProperties() savedialog.SaveDialog(self, self.optionSelected, self.engine) # save dialog def preview(self, widget): if self.optionSelected != None: if self.previewShow == False: self.writeProperties() self.previewDialog = previewdialog.PreviewDialog(self.dlg, self.engine.getRcStyle(), self, self.previewPage) # preview dialog self.previewShow = True else: self.previewPage = self.previewDialog.getCurrPage() self.previewDialog.closeDialog(None) self.previewShow = False def updatePreview(self): if self.previewShow == True: page = self.previewDialog.getCurrPage() self.previewDialog.closeDialog(None) self.writeProperties() style = self.dlg.get_style() self.previewDialog = previewdialog.PreviewDialog(self.dlg, self.engine.getRcStyle(), self, page) # preview dialog self.dlg.set_style(style) if __name__ == "__main__": configurator = MurrineConfigurator() gtk.main()newmurrineconfigurator/src/previewdialog.py0000644000000000000000000000765710574534435020425 0ustar rootroot############################################################################ # Copyright (C) 2007 by Giovanni Bezicheri # # ioannissecundi@gmail.com # # # # This program is free software; you can redistribute it and#or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # 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. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ import sys import os import support import gobject try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class PreviewDialog: """a dialog to show previews""" def __init__(self, widget, style, mainwnd, tab = 0): # parse style pathname = os.path.dirname(sys.argv[0]) self.WORKDIR = os.path.abspath(pathname) # load from glade self.gladefile = self.WORKDIR + "/preview.glade" self.glade = gtk.glade.XML(self.gladefile, "previewDialog") self.dlg = self.glade.get_widget("previewDialog") self.view = self.glade.get_widget("treeview") self.viewscrollbar = self.glade.get_widget("vscrollbar") self.notebook = self.glade.get_widget("notebook") self.treeviewLabel = self.glade.get_widget("treeviewLabel") self.dlg.reset_rc_styles() gtk.rc_parse_string(style) self.dlg.modify_style(self.dlg.get_modifier_style()) # set position self.dlg.move(20, 20) self.dlg.move(widget.get_position()[0] - 430, widget.get_position()[1]) # connections self.dlg.show_all() # init widgets self.initView() self.view.set_model(self.makeModel()) self.viewscrollbar.connect('value-changed', self.onScroll, self.view) self.view.connect('scroll-event', self.onScrollEvent) self.notebook.set_current_page(tab) self.treeviewLabel.set_markup("In the bottom window you can see a typical series of\nwidget displayed with " + mainwnd.optionSelected + " theme.\n") def closeDialog(self, widget): self.dlg.destroy() def getCurrPage(self): return self.notebook.get_current_page() def initView(self): self.view.set_rules_hint(True) cellText = gtk.CellRendererText() column1 = gtk.TreeViewColumn("Column1") column1.pack_start(cellText, True) column1.set_attributes(cellText, text = 0) column1.set_clickable(False) column2 = gtk.TreeViewColumn("Column2") column2.pack_end(cellText, True) column2.set_attributes(cellText, text = 1) column2.set_clickable(False) # append columns self.view.append_column(column1) self.view.append_column(column2) def makeModel(self): # makes an example model list = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) for n in range(50): list.append(["item " + str(n), "item " + str(n)]) self.viewscrollbar.set_range(0, len(list)*25) return list def onScroll(self, range, view): view.scroll_to_point(0, int(range.get_value())) def onScrollEvent(self, view, event): if event.direction == gtk.gdk.SCROLL_UP: self.viewscrollbar.set_value(self.viewscrollbar.get_value() - 10) else: self.viewscrollbar.set_value(self.viewscrollbar.get_value() + 10)newmurrineconfigurator/src/previewdialog.pyc0000644000000000000000000000713010574534435020552 0ustar rootrootm Ec@sdkZdkZdkZdkZydkZeidWnnXydkZdkZWneidnXdfdYZ dS(Ns2.0it PreviewDialogcBsPtZdZddZdZdZdZdZdZdZ RS( sa dialog to show previewsicCstiitid}tii||_|id|_ t i i |i d|_ |i i d|_|i i d|_|i i d|_|i i d|_|i i d|_|iit i||ii|ii|iidd|ii|idd |id |ii|i|ii|i|iid |i |i|iid |i!|ii"||ii$d |i&ddS(Nis/preview.gladet previewDialogttreeviewt vscrollbartnotebookt treeviewLabeliiis value-changeds scroll-eventsNIn the bottom window you can see a typical series of widget displayed with s theme. ('tostpathtdirnametsystargvtpathnametabspathtselftWORKDIRt gladefiletgtktgladetXMLt get_widgettdlgtviewt viewscrollbarRRtreset_rc_stylestrc_parse_stringtstylet modify_styletget_modifier_styletmovetwidgett get_positiontshow_alltinitViewt set_modelt makeModeltconnecttonScrollt onScrollEventtset_current_pagettabt set_markuptmainwndtoptionSelected(R RRR)R'R ((t=/home/johnny/projects/newmurrineconfigurator/previewdialog.pyt__init__'s*  +  cCs|iidS(N(R Rtdestroy(R R((R+t closeDialogCscCs |iiS(N(R Rtget_current_page(R ((R+t getCurrPageEscCs|iitti}tid}|i |t|i |dd|i t tid}|i|t|i |dd|i t |ii||ii|dS(NtColumn1ttextitColumn2i(R Rtset_rules_hinttTrueRtCellRendererTexttcellTexttTreeViewColumntcolumn1t pack_starttset_attributest set_clickabletFalsetcolumn2tpack_endt append_column(R R7R9R>((R+R Gs   cCswtititi}x;tdD]-}|idt|dt|gq%W|i i dt |d|S(Ni2sitem ii( Rt ListStoretgobjectt TYPE_STRINGtlisttrangetntappendtstrR Rt set_rangetlen(R RDRF((R+R"Us  +cCs |idt|idS(Ni(Rtscroll_to_pointtintREt get_value(R RER((R+R$\scCsX|itiijo!|ii|iidn|ii|iiddS(Ni ( teventt directionRtgdkt SCROLL_UPR Rt set_valueRM(R RRN((R+R%^s!( t__name__t __module__t__doc__R,R.R0R R"R$R%(((R+R%s       ( R RtsupportRBtpygtktrequireRt gtk.gladetexitR(RRVRRWR RBR((R+t?s       newmurrineconfigurator/src/savedialog.py0000644000175000017500000000661710574534435020573 0ustar johnnyjohnny############################################################################ # Copyright (C) 2007 by Giovanni Bezicheri # # ioannissecundi@gmail.com # # # # This program is free software; you can redistribute it and#or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # 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. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ import sys import gtkrcengine import os import support try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class SaveDialog: """a dialog to save config changes""" def __init__(self, caller, theme, rcEngine): self.theme = theme self.engine = rcEngine self.caller = caller if self.caller.selection == None: pathname = os.path.dirname(sys.argv[0]) self.WORKDIR = os.path.abspath(pathname) # load from glade self.gladefile = self.WORKDIR + "/savedialog.glade" self.glade = gtk.glade.XML(self.gladefile, "saveDialog") self.dlg = self.glade.get_widget("saveDialog") # connections connections = {"on_mainWindow_destroy" : gtk.main_quit , "closeDialog" : self.closeDialog, "accept" : self.onAccept} self.glade.signal_autoconnect(connections) # init widgets self.label1 = self.glade.get_widget("label1") self.frame1 = self.glade.get_widget("frame1") self.dlg.set_title("Configuration for " + self.theme + " done!") self.label1.set_markup("Now you can choose the theme into the your theme manager to load your new configuration.\n\nWould you like to use " + self.theme + " now?") self.themesEngineView = support.RoundTreeMetaView("Desktop Environment", None) self.themesEngineView.set_size_request(517, 133) self.frame1.add(self.themesEngineView) self.themesEngineView.set_model(support.makeModel(["Gnome", "Xfce", "None - ~/.gtkrc"], ["Gnome", "Xfce", "None - ~/.gtkrc"])) self.themesEngineView.show() self.dlg.show_all else: self.save(self.caller.selection) def closeDialog(self, widget): self.dlg.destroy() def onAccept(self, widget): self.save(str(self.themesEngineView.getOptionSelected())) self.closeDialog(widget) def save(self, option): if self.caller.selection == None: self.caller.selection = str(self.themesEngineView.getOptionSelected()) self.engine.writeChanges() if option == "Gnome": self.engine.writeGnome() elif option == "Xfce": self.engine.writeXfce() else: self.engine.writeGtk2()newmurrineconfigurator/src/savedialog.pyc0000644000175000017500000000533310574534435020730 0ustar johnnyjohnnym ]Ec@sdkZdkZdkZdkZydkZeidWnnXydkZdkZWneidnXdfdYZ dS(Ns2.0it SaveDialogcBs2tZdZdZdZdZdZRS(sa dialog to save config changescCs||_||_||_|iidjotii t i d}tii ||_|id|_tii|id|_|iid|_hdti<d|i<d|i<}|ii||iid|_|iid|_|iid |id |iid |id tid d|_ |i i!dd|ii"|i |i i#ti$dddgdddg|i i%|ii&n|i'|iidS(Nis/savedialog.gladet saveDialogton_mainWindow_destroyt closeDialogtaccepttlabel1tframe1sConfiguration for s done!ssNow you can choose the theme into the your theme manager to load your new configuration. Would you like to use s now?sDesktop EnvironmentiitGnometXfcesNone - ~/.gtkrc((tthemetselftrcEnginetenginetcallert selectiontNonetostpathtdirnametsystargvtpathnametabspathtWORKDIRt gladefiletgtktgladetXMLt get_widgettdlgt main_quitRtonAcceptt connectionstsignal_autoconnectRRt set_titlet set_markuptsupporttRoundTreeMetaViewtthemesEngineViewtset_size_requesttaddt set_modelt makeModeltshowtshow_alltsave(R R R R R R((t:/home/johnny/projects/newmurrineconfigurator/savedialog.pyt__init__'s,   *. cCs|iidS(N(R Rtdestroy(R twidget((R.RDscCs-|it|ii|i|dS(N(R R-tstrR&tgetOptionSelectedRR1(R R1((R.RFscCs|iidjot|ii|i_n|ii|djo|ii n,|djo|ii n|ii dS(NRR( R R RRR2R&R3R t writeChangestoptiont writeGnomet writeXfcet writeGtk2(R R5((R.R-Is   (t__name__t __module__t__doc__R/RRR-(((R.R%s    ( Rt gtkrcengineRR$tpygtktrequireRt gtk.gladetexitR(RR<R$RR=RR((R.t?s       newmurrineconfigurator/src/support.py0000644000175000017500000001666410574534435020174 0ustar johnnyjohnny############################################################################ # Copyright (C) 2007 by Giovanni Bezicheri # # ioannissecundi@gmail.com # # # # This program is free software; you can redistribute it and#or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # 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. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ import sys import os import gobject try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class RoundTreeMetaView(gtk.TreeView): """Generic window to select options""" def initView(self): self.set_rules_hint(True) cellToggle = gtk.CellRendererToggle() cellText = gtk.CellRendererText() column1 = gtk.TreeViewColumn("") column1.pack_start(cellToggle, True) column1.set_attributes(cellToggle, active = 0) cellToggle.set_radio(True) self.get_selection().set_mode(gtk.SELECTION_NONE) column1.set_clickable(True) column2 = gtk.TreeViewColumn(self.caption1) column2.pack_end(cellText, True) column2.set_attributes(cellText, text = 1) if self.caption2 != None: column3 = gtk.TreeViewColumn(self.caption2) column3.pack_end(cellText, True) column3.set_attributes(cellText, text = 2) self.append_column(column1) self.append_column(column2) if self.caption2 != None: self.append_column(column3) return cellToggle def resetToggle(self, model, path, iter, n): if int(n) != int(path[0]): model.set_value(iter, 0, False) def onToggle(self, object, path): self.get_model().set_value(self.get_model().get_iter(path), 0, True) iter = self.get_model().get_iter("0") self.get_model().foreach(self.resetToggle, path) self.optionSelected = str(self.get_model().get_value(self.get_model().get_iter(path), 1)) def initControl(self): self.initView().connect('toggled', self.onToggle) def __init__(self, caption1 = "Value", caption2 = "Description"): gtk.TreeView.__init__(self) self.caption1 = caption1 self.caption2 = caption2 self.initControl() def resetAll(self, model, path, iter): model.set_value(iter, 0, False) def getOptionSelected(self): return self.optionSelected def initStatus(self, value): self.get_model().foreach(self.resetAll) if value == None: pass else: self.get_model().set_value(self.get_model().get_iter_from_string(str(value)), 0, True) class RoundTreeView(RoundTreeMetaView): """Window with specific behaviour""" def __init__(self, rcEngine, property, caption1 = "Value", caption2 = "Description"): RoundTreeMetaView.__init__(self, caption1, caption2) self.property = property self.caption1 = caption1 self.caption2 = caption2 self.rcEngine = rcEngine def onToggle(self, object, path): RoundTreeMetaView.onToggle(self, object, path) self.rcEngine.setStyleOpt(self.property, path) def initControl(self): self.initView().connect('toggled', self.onToggle) def initStatus(self): opt = self.rcEngine.getStyleOpt(self.property) RoundTreeMetaView.initStatus(self, opt) def makeModel(ordOptList, values = None): list = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING) n = 0 for opt in ordOptList: if values != None: list.append([False, str(values[n]), str(opt)]) else: list.append([False, str(n), str(opt)]) n = n + 1 return list class RadioWrapper: """a wrapper to manage init and control of radio buttons' groups""" def __init__(self, property, values, master, engine, mainwnd): self.engine = engine self.property = property self.master = master self.values = values self.activeRadio = None self.config = False self.mainwnd = mainwnd for b in master.get_group(): b.connect("toggled", self.onToggle, b.get_label()) # connects radio def onToggle(self, button, data): self.activeRadio = data # keep active radio label if self.config: self.master.set_inconsistent(False) self.mainwnd.updatePreview() # update preview def writeProperty(self): # find match property value and write it if self.activeRadio != None: n = 0 for i in self.values: if str(i) == str(self.activeRadio): self.engine.setStyleOpt(self.property, str(n)) return n = n + 1 def initStatus(self): try: self.master.set_inconsistent(False) self.checkMatches(self.engine.getStyleOpt(self.property)).set_active(True) except: self.master.set_inconsistent(True) self.config = True def checkMatches(self, pvalue): # ret button by property value for b in self.master.get_group(): if str(b.get_label()) == str(self.values[int(pvalue)]): return b class ComboWrapper: """a wrapper to manage init and control of combo groups""" def __init__(self, property, master, engine, mainwnd): self.engine = engine self.property = property self.master = master self.mainwnd = mainwnd self.config = False self.master.connect("changed", self.onChange) def writeProperty(self): if self.master.get_active() != -1: self.engine.setStyleOpt(self.property, str(self.master.get_active())) def initStatus(self): try: self.master.set_active(int(self.engine.getStyleOpt(self.property))) except: pass self.config = True def onChange(self, value): if self.config: self.mainwnd.updatePreview() # update preview class ScaleWrapper: """a wrapper to manage init and control of scale groups""" def __init__(self, property, defvalue, master, engine): self.engine = engine self.property = property self.master = master self.defvalue = defvalue def initStatus(self): try: self.master.set_value(float(self.engine.getStyleOpt(self.property))) except: self.master.set_value(float(self.defvalue)) # if the option isn't present set to def value def writeProperty(self): self.engine.setStyleOpt(self.property, str(self.master.get_value())) class colorWrapper: """a wrapper to manage init and control of color button""" def __init__(self, property, master, engine, mainwnd): self.engine = engine self.property = property self.master = master self.config = False self.mainwnd = mainwnd self.master.connect("color-set", self.onChange) def initStatus(self): try: self.master.set_color(gtk.gdk.color_parse(self.engine.getStyleOpt(self.property))) except: self.master.set_sensitive(False) # if the option isn't present set to def value self.config = True def writeProperty(self): self.engine.setStyleOpt(self.property, '"' + gtk.color_selection_palette_to_string([self.master.get_color()]) + '"') def onChange(self, button): if self.config: self.mainwnd.updatePreview() # update preview newmurrineconfigurator/src/support.pyc0000644000175000017500000002157510574534435020334 0ustar johnnyjohnnym +Ec@sdkZdkZdkZydkZeidWnnXydkZdkZWneidnXdeifdYZ de fdYZ ddZ dfd YZ d fd YZd fd YZdfdYZdS(Ns2.0itRoundTreeMetaViewcBs\tZdZdZdZdZdZdddZdZd Z d Z RS( s Generic window to select optionscCsD|itti}ti}tid}|i |t|i |dd|i t|i iti|itti|i}|i|t|i |dd|idjo9ti|i}|i|t|i |ddn|i||i||idjo|i|n|S(Nttactiveittextii(tselftset_rules_hinttTruetgtktCellRendererTogglet cellToggletCellRendererTexttcellTexttTreeViewColumntcolumn1t pack_starttset_attributest set_radiot get_selectiontset_modetSELECTION_NONEt set_clickabletcaption1tcolumn2tpack_endtcaption2tNonetcolumn3t append_column(RR R R RR((t7/home/johnny/projects/newmurrineconfigurator/support.pytinitView&s*       cCs8t|t|djo|i|dtndS(Ni(tinttntpathtmodelt set_valuetitertFalse(RR!R R#R((Rt resetToggle<scCs|ii|ii|dt|iid}|ii|i|t |ii |ii|d|_ dS(Nit0i( Rt get_modelR"tget_iterR RR#tforeachR%tstrt get_valuetoptionSelected(RtobjectR R#((RtonToggle?s(cCs|iid|idS(Nttoggled(RRtconnectR.(R((Rt initControlDstValuet DescriptioncCs0tii|||_||_|idS(N(RtTreeViewt__init__RRRR1(RRR((RR5Fs  cCs|i|dtdS(Ni(R!R"R#R$(RR!R R#((RtresetAllKscCs|iS(N(RR,(R((RtgetOptionSelectedMscCsY|ii|i|djon/|ii|iit|dt dS(Ni( RR'R)R6tvalueRR"tget_iter_from_stringR*R(RR8((Rt initStatusOs ( t__name__t __module__t__doc__RR%R.R1R5R6R7R:(((RR$s       t RoundTreeViewcBs8tZdZdddZdZdZdZRS(sWindow with specific behaviourR2R3cCs;ti|||||_||_||_||_dS(N(RR5RRRtpropertytrcEngine(RR@R?RR((RR5Xs    cCs-ti||||ii|i|dS(N(RR.RR-R R@t setStyleOptR?(RR-R ((RR.^scCs|iid|idS(NR/(RRR0R.(R((RR1ascCs)|ii|i}ti||dS(N(RR@t getStyleOptR?toptRR:(RRC((RR:cs(R;R<R=R5R.R1R:(((RR>Vs   cCstitititi}d}xq|D]i}|djo*|i t t ||t |gn#|i t t |t |g|d}q+W|S(Nii(Rt ListStoretgobjectt TYPE_BOOLEANt TYPE_STRINGtlistRt ordOptListRCtvaluesRtappendR$R*(RIRJRCRHR((Rt makeModelgs *"t RadioWrappercBs;tZdZdZdZdZdZdZRS(s=a wrapper to manage init and control of radio buttons' groupscCsv||_||_||_||_d|_t|_||_ x0|i D]"}|i d|i |iqLWdS(NR/(tengineRR?tmasterRJRt activeRadioR$tconfigtmainwndt get_grouptbR0R.t get_label(RR?RJRORNRRRT((RR5ts        cCs8||_|io!|iit|iindS(N( tdataRRPRQROtset_inconsistentR$RRt updatePreview(RtbuttonRV((RR.~s  cCs||idjohd}x_|iD]P}t|t|ijo$|ii|i t|dSn|d}q WndS(Nii( RRPRRRJtiR*RNRAR?(RRZR((Rt writePropertys cCs`y9|iit|i|ii|iit Wn|iit nXt |_ dS(N( RRORWR$t checkMatchesRNRBR?t set_activeRRQ(R((RR:s )cCsRxK|iiD]:}t|it|it|jo|SqqWdS(N( RRORSRTR*RURJRtpvalue(RR^RT((RR\s,(R;R<R=R5R.R[R:R\(((RRMrs   t ComboWrappercBs2tZdZdZdZdZdZRS(s4a wrapper to manage init and control of combo groupscCsG||_||_||_||_t|_|iid|idS(Ntchanged( RNRR?RORRR$RQR0tonChange(RR?RORNRR((RR5s      cCsC|iidjo)|ii|it|iindS(Ni(RROt get_activeRNRAR?R*(R((RR[scCs@y)|iit|ii|iWnnXt|_dS(N( RROR]RRNRBR?RRQ(R((RR:s )cCs|io|iindS(N(RRQRRRX(RR8((RRas (R;R<R=R5R[R:Ra(((RR_s    t ScaleWrappercBs)tZdZdZdZdZRS(s4a wrapper to manage init and control of scale groupscCs(||_||_||_||_dS(N(RNRR?ROtdefvalue(RR?RdRORN((RR5s   cCsPy)|iit|ii|iWn |iit|inXdS(N(RROR"tfloatRNRBR?Rd(R((RR:s)cCs)|ii|it|iidS(N(RRNRAR?R*ROR+(R((RR[s(R;R<R=R5R:R[(((RRcs   t colorWrappercBs2tZdZdZdZdZdZRS(s4a wrapper to manage init and control of color buttoncCsG||_||_||_t|_||_|iid|idS(Ns color-set( RNRR?ROR$RQRRR0Ra(RR?RORNRR((RR5s      cCsVy/|iitii|ii|iWn|ii t nXt |_ dS(N( RROt set_colorRtgdkt color_parseRNRBR?t set_sensitiveR$RRQ(R((RR:s /cCs7|ii|idti|iigddS(Nt"(RRNRAR?Rt!color_selection_palette_to_stringROt get_color(R((RR[scCs|io|iindS(N(RRQRRRX(RRY((RRas (R;R<R=R5R:R[Ra(((RRfs    (tsystosREtpygtktrequireRt gtk.gladetexitR4RR>RRLRMR_RcRf( RfRMRRpRnR_RLR>RRERcRo((Rt?s&      2 'newmurrineconfigurator/src/murrine-config.glade0000644000175000017500000022032310574534435022015 0ustar johnnyjohnny True New Murrine Configurator False GTK_WIN_POS_CENTER murrine-configurator.png True 360 420 True 6 True 3 3 True 235 20 True Select the <b>Murrina</b> you want to configure. True 10 12 574 58 True 0 0 HERE 13 38 True 0 GTK_SHADOW_IN 0 0 9 14 100 22 201 True GDK_STRUCTURE_MASK | GDK_SCROLL_MASK 0 0 100 1 10 10 426 125 False True _Theme True tab False False True 370 150 True 0 GTK_SHADOW_IN True 12 True 98 20 True Flat Hilight True 20 104 20 True Curved Hilight True glazeFlat 57 106 20 True Concave style True glazeFlat 95 137 20 True Top Curved Hilight True glazeFlat 211 20 100 20 True Beryl Hilight True glazeFlat 211 57 True Select the style of the <b>glaze</b> True label_item 10 12 643 175 True 0 GTK_SHADOW_IN True 12 True 300 50 True 0 1 GTK_SHADOW_NONE True 0 1 0 0 5 5 275 28 True GTK_RESIZE_QUEUE 1 1 False Squared Theme (Support concave style) Old Default Style (Support concave style) Little Bit of Roundness Clearlooks/Ubuntulooks-Looking Roundness More Roundness Good Roundness Incredible Roundness Huge Roundness Most Roundness True 0 0 Choose the amount of <b>roundness</b> of your theme: True label_item 15 296 60 True 0 GTK_SHADOW_IN True 12 275 43 True 0 0 2 0 7 0 2 True Select the level of <b>hilight ratio</b> True label_item 85 285 60 True 0 GTK_SHADOW_IN True 12 275 43 True 0 0 9 -1 7 0 2 True Select the level of <b>contrast</b> True label_item 335 85 285 60 True 0 GTK_SHADOW_IN True 12 True 81 20 True Enable True 15 100 20 True Disable True gradientsEnable 102 15 True Enable or disable <b>gradients</b> on all widgets True label_item 335 5 True <b>Roundness</b>, <b>Hilight Ratio</b>, <b>Gradients</b> and <b>Contrast</b> True label_item 10 181 235 92 True 0 GTK_SHADOW_IN True 12 True 100 20 True Enable True 23 100 20 True Disable True animationEnable 103 23 True Enable or disable <b>animation</b> True label_item 390 12 1 False True _General Look True tab 1 False False tab True True 0 GTK_SHADOW_IN 10 504 370 110 True True 0 GTK_SHADOW_IN True 12 True 98 20 True Flat True 20 228 20 True Glassy (it follows selected glazestyle) True menubarFlat 57 98 20 True Gradient True menubarFlat 238 20 100 20 True Striped True menubarFlat 238 57 True Change style of the <b>menubar</b> True label_item 10 12 242 110 True 0 GTK_SHADOW_IN True 12 True 117 20 True Menuitem look True 20 98 20 True Button look True menubaritemsMenuitem 118 20 True Change look of <b>menubar items</b> True label_item 400 12 370 116 True True 0 GTK_SHADOW_IN True 12 True 98 20 True Flat True 20 228 20 True Glassy (it follows selected glazestyle) True menuitemsFlat 57 100 20 True Striped True menuitemsFlat 238 20 True Change look of <b>menuitems</b> True label_item 10 140 242 110 True 0 GTK_SHADOW_IN True 12 True 100 20 True Enable True 23 100 20 True Disable True verticalbarGroup 103 23 True Enable or disable <b>vertical bar in menus</b> True label_item 400 146 3 False True _Menu style True tab 3 False False tab True 403 109 True 0 GTK_SHADOW_IN True 12 True 117 20 True Flat True 20 238 20 True Glassy (it follows selected glazestyle) True listviewHeadersFlat 57 100 20 True Raised True listviewHeadersFlat 272 20 True Change look of <b>listview headers</b> True label_item 10 12 320 80 True 0 GTK_SHADOW_IN True 12 True 168 20 True Nothing (completely flat) True 20 130 20 True Dotted separators True listviewSepMenuitem 170 20 True Change separators of <b>listviews</b> True label_item 10 135 5 False True 2 _ListView style True tab 5 False False tab tab True 444 202 True 0 GTK_SHADOW_IN True 12 True 117 20 True Nothing added True 20 104 20 True Circles True scrollbarNothing 60 106 20 True Handles True scrollbarNothing 100 137 20 True Diagonal stripes True scrollbarNothing 140 197 20 True Diagonal stripes and handles True scrollbarNothing 211 20 209 20 True Horizontal stripes True scrollbarNothing 211 60 206 20 True Horizontal stripes and handles True scrollbarNothing 211 100 True Enable extra features on <b>scrollbars</b> True label_item 10 12 329 105 True 0 GTK_SHADOW_IN True 12 True 160 20 True Select the color of scrollbar: 16 100 34 True #000000000000 165 9 True Select scrollbar <b>color</b> True label_item 10 227 8 False True _Scrollbar style True tab 8 False False tab 38 True 100 30 True _Chiudi True 570 3 100 30 True _Salva True 454 3 10 29 True 672 5 100 30 True _Preview True 10 3 1 5 False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK 5 #ffffffffffff True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK gtk-help True True True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK gtk-cancel True True True True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK gtk-ok True True newmurrineconfigurator/src/preview.glade0000644000000000000000000007101210574534435017653 0ustar rootroot 439 435 5 Preview False True False False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK 2 388 340 True True 318 189 True 0 GTK_SHADOW_IN 0 0 9 187 110 True 15 145 20 163 True 0 0 100 1 10 10 332 171 348 36 True 0 0 LABEL 12 12 317 86 True 0 GTK_SHADOW_IN True 12 True 100 20 True checkbutton True 10 100 20 True checkbutton True 125 10 100 20 True radiobutton True 38 100 20 True radiobutton True radiobutton1 125 38 True Some choices True label_item 15 47 100 32 True button 15 345 100 32 True button 232 345 False True _Preview1 True True tab False False True 350 36 True 0 0 A preview of a typical window that make use of menus, text entries and combo box. True 12 12 218 32 True True _File True True True gtk-new True True True gtk-open True True True gtk-save True True True gtk-save-as True True True True gtk-quit True True True _Edit True True True gtk-cut True True True gtk-copy True True True gtk-paste True True True gtk-delete True True True _View True True _Help True True True gtk-about True True 11 49 292 33 True 0 0 A typical combo box. You can click and make your choice to look more your style selections. 14 100 168 29 True item1 item2 item3 item4 item5 item6 item7 item8 item9 15 135 271 33 True 0 0 And now some text entries to insert text or values, often present in each window. 15 179 331 111 True 0 GTK_SHADOW_IN True 12 True 100 23 True 42 14 107 23 True 200 14 266 23 True 42 51 43 20 True text1: 14 43 20 True text2: 156 14 41 20 True text3: 51 True Text entries label_item 17 216 1 False True _Preview2 True True tab 1 False False 1 1 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK GTK_BUTTONBOX_END False GTK_PACK_END newmurrineconfigurator/src/savedialog.glade0000644000175000017500000000750510574534435021214 0ustar johnnyjohnny True 5 False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK 2 True 517 48 True 0 0 True True 10 517 133 True 0 GTK_SHADOW_IN 0 0 10 49 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK GTK_BUTTONBOX_END True _Annulla True True _OK True 1 False GTK_PACK_END newmurrineconfigurator/src/murrine-configurator.png0000644000175000017500000000361310573115767022765 0ustar johnnyjohnnyPNG  IHDR szzsBIT|dtEXtSoftwarewww.inkscape.org<IDATXkl[gb886M&mvrt`m'X&M !B q '|@lMl#JYRYi&mtiq{˹I:]@Hu{s}^4M9,f/[ά;vPm@ 09*b&۟m;jw1ur 4}>vSۇUzx]3$]s7 ^em{1yWm+^Y ]Gyɰj~nB/aUP,Q=q&D?t}hO'UkSAZXk _atέB$m8yl)nhs6gI D{݌mG0LoS:1QM0tv py\Rܶ)wdo6Se3U:μN"ϾCk^ %֬yTS=K'|ґnor8~-Jx]KnmzR*FhM՗vZDL*CI~kݞSyE3ynA\_[)?QZbw)شxJ\˵.rjp58T P%fzc`(*FwξGs+"Y&5?˽GuDMv@C.|Ld#&66^:}lqEJ(M <1F ЉATey`HRzouF%x??O)5 &%HLNĬD] ŏ#HB*@sE$66B"oF $ <%X%%m۰9lHoDy SF+HD~7.d*TCU5BWje-=]8\\C3257&"`Q@ʷp IEQV׉\Vfg(ߔ3ȺF]/^7G阰%k-;l0|ze+F3Хmg Gft{{nf ǘ:\Rԥ*BCl?V0`Jb066TU@k܏#eɄ/GAŬ]B0 lY8LwNc,kgx(@ab&S3( FJ(g @bLd}uX"a-ׯ+Teg#q#jΡ\M."]3 [@ H+'@Fo!p/ab'n#R}0E:rsS* $$-Im13ykoDg -i"(73s7Q'%I YLU#7!Df{6F**vhk#={Юj"5**bO|X@F(ǹ*yTV2QY@+B G,aQ "DJjCy {#ftDaqh" kaidX8Ȼ3SijTⳖ3)/>l>oG?[E\`zyъVׅ0PA8cMiz,5d_ 1`ip'>ti"+ny0:Lq!j0ji G~[ڲ5Sw<#*Dm9@ڀ?ů3B,_3lbρÙNE[t@/-wIENDB`newmurrineconfigurator/src/murrine-configurator.desktop0000644000175000017500000000144010573116014023630 0ustar johnnyjohnny[Desktop Entry] Encoding=UTF-8 Name=New Murrine Configurator Name[de]=Murrine Einstellungen Name[en_CA]=Murrine Configurator Name[en_GB]=Murrine Configurator Name[fr]=Configurateur de murrine Name[it]=Configuratore di Murrine Comment=Configure the themes based on the Murrine Engine Comment[de]=Einstellungseditor für Themen basierend auf der Murrine Engine Comment[en_CA]=Configure the themes based on the Murrine Engine Comment[en_GB]=Configure the themes based on the Murrine Engine Comment[fr]=Configurer les thèmes basés sur le moteur Murrine Comment[it]=Configura i temi basati sull'engine Murrine Exec=/usr/share/nmc/newmurrineconfigurator.py Icon=murrine-configurator.png Terminal=false Type=Application StartupNotify=true Categories=GNOME;X-XFCE;GTK;Application;Settings;DesktopSettings; newmurrineconfigurator/AUTHORS0000644000175000017500000000005610571025226016341 0ustar johnnyjohnnyGiovanni Bezicheri newmurrineconfigurator/COPYING0000644000175000017500000004313110571024670016327 0ustar johnnyjohnny GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. newmurrineconfigurator/install.sh0000755000175000017500000000460310573120157017301 0ustar johnnyjohnny#!/bin/bash # License GPL # By Cimi & Tome & TheLeashedHare function check_root { ROOT_UID=0 E_NONROOT=67 if [ "$UID" -ne "$ROOT_UID" ] then echo "This script requires root permissions. Please login as root or launch \"sudo ./install.sh\"" exit $E_NONROOT fi } function usage { echo "Usage: ./install.sh [OPTION]" echo "Install New Murrine Configurator. It automatically detect previous installations and upgrade them." echo "" echo "Options:" echo "--prefix Select the path where install the program. Default: /usr." echo "--uninstall Uninstall Murrine Configurator." echo "--help Print this help screen." } function check_install { if [ -z "$1" ]; then echo "No prefix given, assuming installation in /usr.." PREFIX="/usr" else PREFIX=$1 echo "Files will be installed under ${PREFIX}..." fi sleep 1 if [ ! -d ${PREFIX}/bin ] then echo "Error: ${PREFIX}/bin doesn't exist." exit 1 fi } function installation { echo "Installing files under $PREFIX..." sleep 1 install -m0644 src/murrine-configurator.png ${PREFIX}/share/pixmaps install -m0644 src/murrine-configurator.desktop ${PREFIX}/share/applications mkdir ${PREFIX}/share/nmc install -m0644 src/*.glade ${PREFIX}/share/nmc install -m0644 src/*.py* ${PREFIX}/share/nmc install -m0755 src/newmurrineconfigurator.py ${PREFIX}/share/nmc if [ ! -e previous_installation.log ] then echo "$PREFIX" > previous_installation.log echo "New Murrine Configurator successefully installed." else echo "" echo "Detected precedent installation! Running uninstall" sleep 1 uninstall echo "" installation fi } function uninstall { if [ ! -e previous_installation.log ] then echo "New Murrine Configurator seems not to be installed. Anyway uninstall process will continue..." sleep 2 else UNINSTALL_PREFIX=`cat previous_installation.log` fi echo "Running uninstall..." sleep 1 rm -rf ${UNINSTALL_PREFIX}/share/pixmaps/murrine-configurator.png rm -rf ${UNINSTALL_PREFIX}/share/applications/murrine-configurator.desktop rm -rf ${UNINSTALL_PREFIX}/share/nmc rm -rf previous_installation.log echo "New Murrine Configurator successefully uninstalled." sleep 1 } ### Startup ### check_root if [ "$1" = "-h" -o "$1" = "--help" ]; then usage exit 0 elif [ "$1" = "--prefix" ]; then PREFIX=$2 elif [ "$1" = "--uninstall" ]; then uninstall exit 0 fi check_install $PREFIX installation