No sé cómo hacer que te salga la palabra correcta, pero yo eso lo tengo desactivado porque me entorpece más que otra cosa, te recomiendo la desactivación. Si alguien sabe cómo activarlo que lo ponga.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menúdata_dir = GLib.get_user_data_dir()
jotty_dir = os.path.join(data_dir, "jotty")
os.chdir(jotty_dir)
from jotty.OpenDialog import OpenDialog
JottyWindow.py
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE
import gettext
from gettext import gettext as _
gettext.textdomain('jotty')
import os
from gi.repository import GLib # pylint: disable=E0611
from gi.repository import Gtk # pylint: disable=E0611
import logging
logger = logging.getLogger('jotty')
from jotty_lib import Window
from jotty.AboutJottyDialog import AboutJottyDialog
from jotty.PreferencesJottyDialog import PreferencesJottyDialog
from jotty.SaveDialog import SaveDialog
from jotty.OpenDialog import OpenDialog
# See jotty_lib.Window.py for more details about how this class works
class JottyWindow(Window):
__gtype_name__ = "JottyWindow"
def finish_initializing(self, builder): # pylint: disable=E1002
"""Set up the main window"""
super(JottyWindow, self).finish_initializing(builder)
self.AboutDialog = AboutJottyDialog
self.PreferencesDialog = PreferencesJottyDialog
# Code for other initialization actions should be added here.
def on_mnu_save_activate(self, widget, data=None):
#def save_file(self, widget, data=None):
print "save"
#get the title from the user
saber = SaveDialog()
result = saber.run()
title = saber.title_text
saber.destroy()
if result != Gtk.ResponseType.OK:
return
#get the string
buff = self.ui.textview1.get_buffer()
start_iter = buff.get_start_iter()
end_iter = buff.get_end_iter()
text = buff.get_text(start_iter, end_iter, True)
#create the filename
data_dir = GLib.get_user_data_dir()
jotty_dir = os.path.join(data_dir, "jotty")
filename = os.path.join(jotty_dir, title)
#write the data
GLib.mkdir_with_parents(jotty_dir, 0o700)
GLib.file_set_contents(filename, text)
#def open_file(self, widget, data=None):
def on_mnu_open_activate(self, widget, data=None):
#get the name of the document to open
opener = OpenDialog()
result = opener.run()
filename = opener.selected_file
#close the dialog, and check whether to proceed
opener.destroy()
if result != Gtk.ResponseType.OK:
return
#try to get the data from the file if it exists
try:
success, text = GLib.file_get_contents(filename)
except Exception:
text = ""
#set the UI to display the string
buff = self.ui.textview1.get_buffer()
buff.set_text(text)
def on_mnu_new_activate(self, widget, data=None):
self.ui.entry1.set_text("Note Title")
buff = self.ui.textview1.get_buffer()
buff.set_text("")
OpenDialog.py
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE
from gi.repository import Gtk # pylint: disable=E0611
from jotty_lib.helpers import get_builder
import gettext
from gettext import gettext as _
gettext.textdomain('jotty')
import os
from quickly.widgets.dictionary_grid import DictionaryGrid
from gi.repository import GLib # pylint: disable=E0611
class OpenDialog(Gtk.Dialog):
__gtype_name__ = "OpenDialog"
def __new__(cls):
"""Special static method that's automatically called by Python when
constructing a new instance of this class.
Returns a fully instantiated OpenDialog object.
"""
builder = get_builder('OpenDialog')
new_object = builder.get_object('open_dialog')
new_object.finish_initializing(builder)
return new_object
def finish_initializing(self, builder):
"""Called when we're finished initializing.
finish_initalizing should be called after parsing the ui definition
and creating a OpenDialog object with it in order to
finish initializing the start of the new OpenDialog
instance.
"""
# Get a reference to the builder and set up the signals.
self.builder = builder
self.ui = builder.get_ui(self)
#get the jotty document names
data_dir = GLib.get_user_data_dir()
jotty_dir = os.path.join(data_dir, "jotty")
filenames = os.listdir(jotty_dir)
#put them into a grid
dicts = [{'Name': x, 'File': os.path.join(jotty_dir, x)} for x in filenames]
self.grid = DictionaryGrid(dictionaries=dicts, keys=['Name'])
#add grid to dialog
self.grid.show()
self.ui.box1.pack_end(self.grid, True, True, 0)
def on_btn_ok_clicked(self, widget, data=None):
"""The user has elected to save the changes.
Called before the dialog returns Gtk.ResponseType.OK from run().
"""
pass
def on_btn_cancel_clicked(self, widget, data=None):
"""The user has elected cancel changes.
Called before the dialog returns Gtk.ResponseType.CANCEL for run()
"""
pass
@property
def selected_file(self):
rows = self.grid.selected_rows
if len(rows) < 1:
return None
else:
return rows[0]['Name']
if __name__ == "__main__":
dialog = OpenDialog()
dialog.show()
Gtk.main()
Citaruna cosa d que temp ambiente estamos hablando aqui????
Citarno esta overcloqueado ni nada por el estilo?? no????
Citarsustituye la pasta termina por una de calidad, ajusta bien los tornillos de sujecion del disipador o como venga e intenta
Citaraltamente recomendable una placa de refrigeracion para portatiles
CitarCambiar el disipador no t lo recomiendo ya q suelen venir diseñados para cada modelo especifico y encontrarte con uno q quepa en el lugar es bastante dificil modificarlo menos ya q suelen venir diseñador para canalizar el flujo de aire de la mejor manera posible, y al eliminar superficie sea o no de contacto estas reduciendo la capacidad de disipacion de energia q provee el mismo, si el disipador no es de nucleo de cobre pues mira ahi tienes algo q puedes mejorar salu2