* fluent: removed old, non-working code.
This commit is contained in:
parent
6a4ae8ecf1
commit
f394610724
9
fluent
9
fluent
|
@ -99,7 +99,6 @@ class FluentApp:
|
|||
# Connect signals
|
||||
signals = {'on_quit1_activate' : (gtk.main_quit),
|
||||
'on_appwindow_delete_event' : (gtk.main_quit),
|
||||
'on_view_log_activate' : (self.toggle_view_log),
|
||||
'on_zoom_in_button_clicked' : (self.on_single_view),
|
||||
'on_zoom_out_button_clicked' : (self.on_multiple_view)}
|
||||
self.widget_tree.signal_autoconnect(signals)
|
||||
|
@ -111,14 +110,6 @@ class FluentApp:
|
|||
pt = self.widget_tree.get_widget('main_view')
|
||||
pt.insert_view(plot)
|
||||
|
||||
def toggle_view_log(self, menu_item):
|
||||
lw = self.widget_tree.get_widget('logview')
|
||||
if menu_item.get_active():
|
||||
lw.show()
|
||||
else:
|
||||
lw.unparent()
|
||||
logger.log('debug', 'Toggling log window visibility')
|
||||
|
||||
def on_single_view(self, button):
|
||||
nb = self.widget_tree.get_widget('main_view')
|
||||
nb.goto_large()
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="enable_layout_config">True</property>
|
||||
<signal name="delete_event" handler="on_appwindow_delete_event" last_modification_time="Thu, 13 Apr 2006 18:54:58 GMT"/>
|
||||
|
||||
|
@ -36,6 +38,8 @@
|
|||
<child>
|
||||
<widget class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="file1">
|
||||
|
@ -173,21 +177,6 @@
|
|||
<widget class="GtkMenuItem" id="view1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_item">GNOMEUIINFO_MENU_VIEW_TREE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="view1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="view_log">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Log</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_view_log_activate" last_modification_time="Sat, 15 Apr 2006 10:37:30 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
|
@ -404,6 +393,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -472,6 +465,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -497,7 +494,7 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook1">
|
||||
<widget class="GtkNotebook" id="bottom_notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
|
@ -544,6 +541,10 @@
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
|
|
@ -29,10 +29,6 @@ class MainView (gtk.Notebook):
|
|||
self.append_page(self.large_view)
|
||||
self.set_current_page(0)
|
||||
|
||||
# Set current view to the upper left view.
|
||||
self.current_view = self.small_view.get_view(0, 0)
|
||||
self.current_view.mark_active(True)
|
||||
|
||||
def goto_small(self):
|
||||
if self.get_current_page() == 0:
|
||||
return None
|
||||
|
@ -77,10 +73,14 @@ class SmallView (gtk.Table):
|
|||
def set_child(self, child, col, row):
|
||||
cur_widget = self.child_views[col][row]
|
||||
cur_widget.disconnect(cur_widget.parent_signalling)
|
||||
print cur_widget
|
||||
self.remove(cur_widget)
|
||||
self.attach(child, col, col+1, row, row+1)
|
||||
child.parent_signalling = child.connect('button_press_event', self.__view_button_event__)
|
||||
self.child_views[col][row] = child
|
||||
if cur_widget.active:
|
||||
child.mark_active(True)
|
||||
cur_widget.mark_active(False)
|
||||
child.show()
|
||||
|
||||
def borrow_current(self):
|
||||
|
@ -169,6 +169,7 @@ class Plot (gtk.Frame):
|
|||
self.mark_active(False)
|
||||
self.connect('button_press_event', self.on_button_press)
|
||||
self.sel_obj = None
|
||||
self.active = False
|
||||
if project!=None: #its not an Emptyview
|
||||
project.attach(self,'selection_update')
|
||||
|
||||
|
@ -184,6 +185,7 @@ class Plot (gtk.Frame):
|
|||
self.set_shadow_type(gtk.SHADOW_IN)
|
||||
else:
|
||||
self.set_shadow_type(gtk.SHADOW_OUT)
|
||||
self.active = active
|
||||
|
||||
def update(self,project,key):
|
||||
pass
|
||||
|
|
Reference in New Issue