Commit 93d9dd39 authored by sumpfralle's avatar sumpfralle

replaced set_visible/get_visible calls (require GTK 2.18) with show/hide

added a multi-resolution icon for the windows standalone package


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@787 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 669fffcb
...@@ -757,7 +757,7 @@ class ProjectGui: ...@@ -757,7 +757,7 @@ class ProjectGui:
recent_files_menu.connect("item-activated", recent_files_menu.connect("item-activated",
self.load_recent_model_file) self.load_recent_model_file)
else: else:
self.gui.get_object("OpenRecentModel").set_visible(False) self.gui.get_object("OpenRecentModel").hide()
# load the menubar and connect functions to its items # load the menubar and connect functions to its items
self.menubar = uimanager.get_widget("/MenuBar") self.menubar = uimanager.get_widget("/MenuBar")
window_box = self.gui.get_object("WindowBox") window_box = self.gui.get_object("WindowBox")
...@@ -1469,16 +1469,19 @@ class ProjectGui: ...@@ -1469,16 +1469,19 @@ class ProjectGui:
new_state = action new_state = action
if new_state: if new_state:
is_available = pycam.Utils.threading.is_pool_available() is_available = pycam.Utils.threading.is_pool_available()
self.gui.get_object("ProcessPoolDisabledBox").set_visible( disabled_box = self.gui.get_object("ProcessPoolDisabledBox")
not is_available) statistics_box = self.gui.get_object("ProcessPoolStatisticsBox")
self.gui.get_object("ProcessPoolStatisticsBox").set_visible(
is_available)
if is_available: if is_available:
disabled_box.hide()
statistics_box.show()
# start the refresh function # start the refresh function
interval = int(max(1, self.gui.get_object( interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value())) "ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval, gobject.timeout_add_seconds(interval,
self.update_process_pool_statistics, interval) self.update_process_pool_statistics, interval)
else:
disabled_box.show()
statistics_box.hide()
self.process_pool_window.show() self.process_pool_window.show()
else: else:
self.process_pool_window.hide() self.process_pool_window.hide()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment