Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/GnomeMoonActivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'GnomeMoonActivity.py')
-rwxr-xr-xGnomeMoonActivity.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/GnomeMoonActivity.py b/GnomeMoonActivity.py
index 33931c5..e284b8f 100755
--- a/GnomeMoonActivity.py
+++ b/GnomeMoonActivity.py
@@ -25,7 +25,7 @@
# Febrero 2012
# Correcciones, Simplificación y Reestructuración Modular:
# Desarrollo de CalendarButton + MoonCalendar:
-# Instalador y Portado a gnome:
+# Instalador y Portado a gnome y Gtk 3:
# Flavio Danesse <fdanesse@gmail.com> CeibalJAM! - Uruguay - Activity Central
import os
@@ -101,7 +101,8 @@ class MoonActivity(Gtk.Window):
boton = Gtk.ToggleToolButton()
boton.connect('clicked', self.toggle_grid_clicked)
- pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(os.path.join(MG.ICONOS,'grid-ico.svg'), 32, 32)
+ pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(
+ os.path.join(MG.ICONOS,'grid-ico.svg'), 32, 32)
imagen = Gtk.Image()
imagen.set_from_pixbuf(pixbuf)
boton.set_icon_widget(imagen)
@@ -112,7 +113,8 @@ class MoonActivity(Gtk.Window):
boton = Gtk.ToggleToolButton()
boton.connect('clicked', self.toggle_hemisphere_clicked)
- pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(os.path.join(MG.ICONOS,'hemi-ico.svg'), 32, 32)
+ pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(
+ os.path.join(MG.ICONOS,'hemi-ico.svg'), 32, 32)
imagen = Gtk.Image()
imagen.set_from_pixbuf(pixbuf)
boton.set_icon_widget(imagen)
@@ -123,7 +125,8 @@ class MoonActivity(Gtk.Window):
boton = Gtk.ToggleToolButton()
boton.connect('clicked', self.switch_calendar_luna)
- pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(os.path.join(MG.ICONOS,'calendario-ico.svg'), 32, 32)
+ pixbuf= GdkPixbuf.Pixbuf.new_from_file_at_size(
+ os.path.join(MG.ICONOS,'calendario-ico.svg'), 32, 32)
imagen = Gtk.Image()
imagen.set_from_pixbuf(pixbuf)
boton.set_icon_widget(imagen)
@@ -167,12 +170,17 @@ class MoonActivity(Gtk.Window):
def toggle_grid_clicked(self, widget= None):
self.luna_hoy.toggle_grid_clicked()
- self.mooncalendar.toggle_grid_clicked(widget= None, actualizar = self.mooncalendar in self.aspectframe.get_children())
+
+ self.mooncalendar.toggle_grid_clicked(
+ widget = None,
+ actualizar = self.mooncalendar in self.aspectframe.get_children())
def toggle_hemisphere_clicked(self, widget= None):
self.luna_hoy.toggle_hemisphere_clicked()
- self.mooncalendar.toggle_hemisphere_clicked(widget= None, actualizar = self.mooncalendar in self.aspectframe.get_children())
+ self.mooncalendar.toggle_hemisphere_clicked(
+ widget = None,
+ actualizar = self.mooncalendar in self.aspectframe.get_children())
def switch_calendar_luna(self, widget):
@@ -192,6 +200,7 @@ class MoonActivity(Gtk.Window):
def handle(self):
self.update_text_information_view()
+
if self.luna_hoy in self.aspectframe.get_children():
self.luna_hoy.actualizar()
@@ -200,11 +209,10 @@ class MoonActivity(Gtk.Window):
def repaint(self, widget= None, event= None):
rect = self.luna_hoy.get_allocation()
- anchoboton, altoboton = (rect.width, rect.height)
- tamanioboton = min( [anchoboton,altoboton] )
- self.luna_hoy.repaint(tamanioboton)
+ self.luna_hoy.repaint(min( [rect.width, rect.height] ))
def delete_event(self, widget, event, data=None):
+
sys.exit(0)
return False