~stefan-schwarzburg/qreator/qreator

« back to all changes in this revision

Viewing changes to qreator/QreatorWindow.py

  • Committer: Stefan Schwarzburg
  • Date: 2012-06-01 11:42:44 UTC
  • Revision ID: stefan.schwarzburg@googlemail.com-20120601114244-uu142uo1e91kwnl8
replaced qr_input_notebook with qr_input_box, because boxes are much easier to automatically resize.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        self.curr_width = 0
106
106
 
107
107
        for qr_type in self.qr_types:
108
 
            self.ui.qr_input_notebook.append_page(qr_type.widget.grid, None)
109
 
 
110
 
        self.ui.qr_input_notebook.connect("switch-page",
111
 
            self.on_qr_input_notebook_switch_page)
112
 
 
113
 
    def on_qr_input_notebook_switch_page(self, widget, label, page):
114
 
        for p in range(widget.get_n_pages()):
115
 
            container = widget.get_nth_page(p)
116
 
            if not p == page:
117
 
                for c in container.get_children():
118
 
                    try:
119
 
                        c.hide_all()
120
 
                    except AttributeError:
121
 
                        c.hide()
122
 
            else:
123
 
                for c in container.get_children():
124
 
                    try:
125
 
                        c.show_all()
126
 
                    except AttributeError:
127
 
                        c.show()
 
108
            self.ui.qr_input_box.add(qr_type.widget.grid)
128
109
 
129
110
    def fill_qr_types_store(self):
130
111
        self.qr_types_store.clear()
204
185
        self.qr_types[qr_id].widget.on_activated()
205
186
 
206
187
        self.ui.notebook1.set_current_page(PAGE_QR)
207
 
        self.ui.qr_input_notebook.set_current_page(qr_id)
 
188
 
 
189
        for child in self.ui.qr_input_box.get_children():
 
190
            child.hide()
 
191
        self.ui.qr_input_box.get_children()[qr_id].show()
 
192
 
208
193
 
209
194
##########################################
210
195