Fixing a bug and cutting down the noise
[ejpi] / src / ejpi_glade.py
index b131347..3a94566 100755 (executable)
@@ -135,7 +135,7 @@ class ErrorDisplay(history.ErrorReporting):
 
 class Calculator(object):
 
-       __pretty_app_name__ = "e^(j pi) + 1 = 0"
+       __pretty_app_name__ = "e**(j pi) + 1 = 0"
        __app_name__ = "ejpi"
        __version__ = "0.9.0"
        __app_magic__ = 0xdeadbeef
@@ -197,10 +197,7 @@ class Calculator(object):
                global hildon
                self._app = None
                self._isFullScreen = False
-               if hildon is not None and self.__window is gtk.Window:
-                       warnings.warn("Hildon installed but glade file not updated to work with hildon", UserWarning, 2)
-                       hildon = None
-               elif hildon is not None:
+               if hildon is not None:
                        self._app = hildon.Program()
                        self.__window = hildon.Window()
                        self._widgetTree.get_widget("mainLayout").reparent(self.__window)
@@ -217,7 +214,7 @@ class Calculator(object):
                        self.__window.connect("key-press-event", self._on_key_press)
                        self.__window.connect("window-state-event", self._on_window_state_change)
                else:
-                       warnings.warn("No Hildon", UserWarning, 2)
+                       pass # warnings.warn("No Hildon", UserWarning, 2)
 
                self.__errorDisplay = ErrorDisplay(self._widgetTree)
                self.__userEntry = ValueEntry(self._widgetTree.get_widget("entryView"))
@@ -231,7 +228,7 @@ class Calculator(object):
                )
                self.__load_history()
 
-               self.__sliceStyle = gtkpie.generate_pie_style(self.__window)
+               self.__sliceStyle = gtkpie.generate_pie_style(gtk.Button())
                self.__handler = gtkpieboard.KeyboardHandler(self._on_entry_direct)
                self.__handler.register_command_handler("push", self._on_push)
                self.__handler.register_command_handler("unpush", self._on_unpush)
@@ -273,7 +270,7 @@ class Calculator(object):
                        device = osso.DeviceState(self._osso)
                        device.set_device_state_callback(self._on_device_state_change, 0)
                else:
-                       warnings.warn("No OSSO", UserWarning, 2)
+                       pass # warnings.warn("No OSSO", UserWarning, 2)
 
        def display_error_message(self, msg):
                error_dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, msg)