Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Copyright (C) 2009 Matthew McGowan
- #
- # Authors:
- # Matthew McGowan
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- import gtk
- # my modules
- import pathbar
- class Concept:
- def __init__(self):
- window = gtk.Window(type=gtk.WINDOW_TOPLEVEL)
- window.set_title("Path Bar Concept")
- window.set_default_size(600, -1)
- window.set_border_width(10)
- window.connect("destroy", gtk.main_quit, "WM destroy")
- vbox = gtk.VBox(spacing=10)
- window.add(vbox)
- pbar = pathbar.PathBar()
- pbar.append_part('Find Free Software')
- hbox = gtk.HBox(spacing=4)
- extender = gtk.Button('Extend PathBar')
- entry = gtk.Entry()
- #shortener = gtk.Button('Shorten PathBar')
- hbox.pack_start(extender, False)
- hbox.pack_start(entry)
- vbox.pack_start(pbar, False, False)
- vbox.pack_end(hbox, False, False)
- extender.connect("clicked", self.extend_path, pbar, entry)
- window.show_all()
- return
- def extend_path(self, widget, pbar, entry):
- pbar.append_part(entry.get_text() or 'no label')
- return
- Concept()
- gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement