#!/usr/bin/env python3
from gi.repository import Gtk,Gdk
from config_note import Config
from gi.repository import GdkPixbuf

config_note = Config()
path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds"
pathIcon = "/usr/share/cinnamon/applets/[email protected]/icons/"



aboutdialog = Gtk.AboutDialog()
aboutdialog.set_name("Gnome TuboNote Extension")
aboutdialog.set_version("V 2.0")
aboutdialog.set_comments("Thank you for using this extension, please reporting bugs in")
aboutdialog.set_website("https://github.com/iksws/GnomeTurboNoteExtension")
aboutdialog.set_website_label("GitHub")
aboutdialog.set_authors(["iksws <*****@*****.**>"])
aboutdialog.set_copyright(".Exe Design 2014")
with open ("/usr/share/cinnamon/applets/[email protected]/COPYING", "r") as myfile:
	data=myfile.read()
aboutdialog.set_license(data)
aboutdialog.set_program_name("Gnome TurboNote Extension")
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("/usr/share/cinnamon/applets/[email protected]/icons/turbo.png",60,60)
aboutdialog.set_logo(pixbuf)
aboutdialog.run()
aboutdialog.destroy()


#self.set_icon_from_file("/home/" + config_note.getOwner() + "/.local/share/cinnamon/applets/[email protected]/icons/turbo.png")
#donatebt.connect("clicked", self.on_button_clickedDonate)
Example #2
0
import SocketServer
from array import array
import sqlite3
from datetime import datetime
import re
import time
import cStringIO
from subprocess import call
import threading
from config_note import Config
import base64


OVERRIDE_NO_ACTIONS = True

config_note = Config()
path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds/"
path_icon = "/usr/share/cinnamon/applets/[email protected]/icons/"
path_tmp = "/usr/share/cinnamon/applets/[email protected]/tmp/"
path_attached = "/usr/share/cinnamon/applets/[email protected]/attacheds/"

caixa = 1
titulo = ""
ipsender = ""
msg_rec = ""
imganexada = "1"   
hoje = ""
hojefile = ""
datanameanexo = ""

logging.basicConfig(level=logging.DEBUG, format='%(name)s: %(message)s',)
    def __init__(self, argv, nome, conteudo, ipsender, img_atach, new_img):
        Gtk.Window.__init__(self, title="")
        config_note = Config()
        path_icon = "/usr/share/cinnamon/applets/[email protected]/icons/"
        path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds/"
        path_attached = "/usr/share/cinnamon/applets/[email protected]/attacheds/"
        #convert
        lista_anexos = []
        lista_nome = os.listdir(path_attached)

        for l in range(len(lista_nome)):
            lista_dir = os.listdir(path_attached + lista_nome[l] + "/")
            if lista_dir:
                for d in range(len(lista_dir)):
                    lista_dir_files = os.listdir(path_attached +
                                                 lista_nome[l] + "/" +
                                                 lista_dir[d] + "/")
                    if lista_dir_files:
                        files = ""
                        for f in range(len(lista_dir_files)):
                            if f == 0:
                                if (lista_dir_files[f].split(".")[1] == 'wmf'):
                                    command1 = "cd  " + path_attached + lista_nome[
                                        l] + "/" + lista_dir[
                                            d] + "/; convert " + lista_dir_files[
                                                f] + " " + lista_dir_files[
                                                    f][:-4] + ".png"
                                    os.system(command1)
                                    command2 = "cd  " + path_attached + lista_nome[
                                        l] + "/" + lista_dir[
                                            d] + "/; rm -f " + lista_dir_files[
                                                f]
                                    os.system(command2)
                                    files = lista_dir_files[f][:-4] + ".png"
                                else:
                                    files = (lista_dir_files[f])
                            else:
                                if (lista_dir_files[f].split(".")[1] == 'wmf'):
                                    command1 = "cd  " + path_attached + lista_nome[
                                        l] + "/" + lista_dir[
                                            d] + "/; convert " + lista_dir_files[
                                                f] + " " + lista_dir_files[
                                                    f][:-4] + ".png"
                                    os.system(command1)
                                    command2 = "cd  " + path_attached + lista_nome[
                                        l] + "/" + lista_dir[
                                            d] + "/; rm -f " + lista_dir_files[
                                                f]
                                    os.system(command2)
                                    files = files + (" | " +
                                                     lista_dir_files[f][:-4] +
                                                     ".png")
                                else:
                                    files = files + (" | " +
                                                     lista_dir_files[f])
                        lista_anexos.append(
                            [lista_nome[l],
                             stringToDate(lista_dir[d]), files])

        fullconteudo = conteudo
        tipo = ""
        if nome.find("=") == 1:
            nome = nome[2:]

            if img_atach != "None":
                lista_nome = os.listdir(img_atach)
                if lista_nome[0].find("png") != -1 or lista_nome[0].find(
                        "jpg"
                ) != -1 or lista_nome[0].find("jpeg") != -1 or lista_nome[
                        0].find("wmf") != -1 or lista_nome[0].find(
                            "gif") != -1 or lista_nome[0].find("bmp") != -1:
                    tipo = "img"
                else:
                    tipo = "att"

            data = [
                nome, fullconteudo, ipsender, tipo, img_atach + lista_nome[0]
            ]

            call([
                "python", path + "caixa.py", "" + data[0] + "",
                "" + data[2] + "", "" + data[1] + "", "" + data[2] + "",
                "" + data[3] + "", "" + data[4] + "", "" + new_img + ""
            ])
            os.kill(os.getpid(), signal.SIGQUIT)

        else:
            if img_atach != "None":
                lista_nome = os.listdir(img_atach)
                if lista_nome[0].find("png") != -1 or lista_nome[0].find(
                        "jpg"
                ) != -1 or lista_nome[0].find("jpeg") != -1 or lista_nome[
                        0].find("wmf") != -1 or lista_nome[0].find(
                            "gif") != -1 or lista_nome[0].find("bmp") != -1:
                    tipo = "img"
                else:
                    tipo = "att"
            data = [
                nome, fullconteudo, ipsender, tipo, img_atach + lista_nome[0]
            ]

            call([
                "python", path + "caixa.py", "" + data[0] + "",
                "" + data[2] + "", "" + data[1] + "" + "", "" + data[2] + "",
                "" + data[3] + "", "" + data[4] + "", "" + new_img + ""
            ])
            os.kill(os.getpid(), signal.SIGQUIT)
#!/usr/bin/env python
#by [email protected]

from gi.repository import Gtk,Gdk
from gi.repository import GdkPixbuf
from gi.repository import Pango
import sys,os
import sqlite3
from subprocess import call
from config_note import Config
import socket

config_note = Config()
path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds/"
path_icon = "/usr/share/cinnamon/applets/[email protected]/icons/"
path_attached = "/usr/share/cinnamon/applets/[email protected]/attacheds/"

lista_contatos = []
pixbuf1 = GdkPixbuf.Pixbuf.new_from_file(path_icon + "avatar-default-symbolic"  + config_note.getColor() + ".svg")
connb = sqlite3.connect(path + 'turbo.db')
a = connb.cursor()
a.execute("SELECT nome,ip FROM contacts order by nome asc")
rows =  a.fetchall()
for contacts in rows:
   lista_contatos.append([pixbuf1,contacts[0],contacts[1]])
connb.close()

ip_sender = ""

def assignNewValueToIp(v):
    global ip_sender
Example #5
0
#!/usr/bin/env python
#by [email protected]

from gi.repository import Gtk, Gdk
from gi.repository import GdkPixbuf
from gi.repository import Pango
import sys, os
import sqlite3
from subprocess import call
from config_note import Config
import socket

config_note = Config()
path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds/"
path_icon = "/usr/share/cinnamon/applets/[email protected]/icons/"
path_attached = "/usr/share/cinnamon/applets/[email protected]/attacheds/"

lista_contatos = []
pixbuf1 = GdkPixbuf.Pixbuf.new_from_file(path_icon +
                                         "avatar-default-symbolic" +
                                         config_note.getColor() + ".svg")
connb = sqlite3.connect(path + 'turbo.db')
a = connb.cursor()
a.execute("SELECT nome,ip FROM contacts order by nome asc")
rows = a.fetchall()
for contacts in rows:
    lista_contatos.append([pixbuf1, contacts[0], contacts[1]])
connb.close()

ip_sender = ""
#!/usr/bin/env python
#by [email protected] 

from gi.repository import Gtk,Gdk
from gi.repository import GdkPixbuf
import sys,os
import sqlite3
from subprocess import call
from config_note import Config
import socket

config_note = Config()
path = "/usr/share/cinnamon/applets/[email protected]/turbonote-adds/"
path_icon = "/usr/share/cinnamon/applets/[email protected]/icons/"
path_attached = "/usr/share/cinnamon/applets/[email protected]/attacheds/"

lista_contatos = []
pixbuf1 = GdkPixbuf.Pixbuf.new_from_file(path_icon + "avatar-default-symbolic"  + config_note.getColor() + ".svg")
connb = sqlite3.connect(path + 'turbo.db')
a = connb.cursor()
a.execute("SELECT nome,ip FROM contacts order by nome asc")
rows =  a.fetchall()
for contacts in rows:
   lista_contatos.append([pixbuf1,contacts[0],contacts[1]])
connb.close()

ip_sender = ""
nome_sender = ""
stay = ""
titulo = ""
att = ""