I am trying to make an app in Ubuntu, and tried using Glade and Gedit. There are few tutorials out there, so I started trying to write my own. I have a menu and a start page right now, and I want it to go from the start page to the menu page (TestWindow.ui to menu.ui) and I keep getting errors! I can't fin anything on navigating from one window to another in python, and I have no idea how to make it work! Here is my code so far:
# -*- 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('test')
import gtk
import logging
logger = logging.getLogger('test')
from test_lib import Window
from test.AboutTestDialog import AboutTestDialog
from test.PreferencesTestDialog import PreferencesTestDialog
import os
# See test_lib.Window.py for more details about how this class works
class TestWindow(Window):
__gtype_name__ = "TestWindow"
def finish_initializing(self, builder): # pylint: disable=E1002
"""Set up the main window"""
super(TestWindow, self).finish_initializing(builder)self.AboutDialog = AboutTestDialog
self.PreferencesDialog = PreferencesTestDialog# Code for other initialization actions should be added here.
def on_button1_clicked(self, widget, data=None):
os.show("menu.ui)
| « [Solved] if %var% == 1 goto blah i... | Batch File to remove stri... » |