Skip to content

Commit

Permalink
Change how the local server is shutdown on Linux/OSX.
Browse files Browse the repository at this point in the history
Some more style tweaks.
  • Loading branch information
grossmj committed Nov 20, 2014
1 parent 30cd030 commit 0370d30
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
3 changes: 2 additions & 1 deletion gns3/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,8 @@ def _setCharcoalStyle(self):
QMenu::item:selected {color: white; background-color: #5f5f5f}
QToolButton:hover {background-color: #5f5f5f}
QGroupBox {color: #dedede; font: bold 12px; padding: 15px; border-style: none}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {background: none;}
QAbstractScrollArea::corner { background: #535353}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {background: none}
QComboBox {selection-color: black; selection-background-color: #dedede}
"""

Expand Down
2 changes: 1 addition & 1 deletion gns3/modules/dynamips/ui/ios_router_preferences_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
Expand Down
6 changes: 3 additions & 3 deletions gns3/modules/dynamips/ui/ios_router_preferences_page_ui.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '/Users/jseutter/projects/gns3-gui/gns3/modules/dynamips/ui/ios_router_preferences_page.ui'
# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/modules/dynamips/ui/ios_router_preferences_page.ui'
#
# Created: Tue Oct 14 11:35:46 2014
# Created: Wed Nov 19 18:57:20 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -37,7 +37,7 @@ def setupUi(self, IOSRouterPreferencesPageWidget):
self.uiIOSRoutersTreeWidget.setSizePolicy(sizePolicy)
self.uiIOSRoutersTreeWidget.setMaximumSize(QtCore.QSize(160, 16777215))
font = QtGui.QFont()
font.setPointSize(12)
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.uiIOSRoutersTreeWidget.setFont(font)
Expand Down
2 changes: 1 addition & 1 deletion gns3/modules/iou/ui/iou_device_preferences_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
Expand Down
4 changes: 2 additions & 2 deletions gns3/modules/iou/ui/iou_device_preferences_page_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/modules/iou/ui/iou_device_preferences_page.ui'
#
# Created: Tue Oct 7 15:39:24 2014
# Created: Wed Nov 19 18:57:19 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -37,7 +37,7 @@ def setupUi(self, IOUDevicePreferencesPageWidget):
self.uiIOUDevicesTreeWidget.setSizePolicy(sizePolicy)
self.uiIOUDevicesTreeWidget.setMaximumSize(QtCore.QSize(160, 16777215))
font = QtGui.QFont()
font.setPointSize(12)
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.uiIOUDevicesTreeWidget.setFont(font)
Expand Down
2 changes: 1 addition & 1 deletion gns3/modules/qemu/ui/qemu_vm_preferences_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
Expand Down
4 changes: 2 additions & 2 deletions gns3/modules/qemu/ui/qemu_vm_preferences_page_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/modules/qemu/ui/qemu_vm_preferences_page.ui'
#
# Created: Fri Oct 3 14:05:58 2014
# Created: Wed Nov 19 18:57:19 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -37,7 +37,7 @@ def setupUi(self, QemuVMPreferencesPageWidget):
self.uiQemuVMsTreeWidget.setSizePolicy(sizePolicy)
self.uiQemuVMsTreeWidget.setMaximumSize(QtCore.QSize(160, 16777215))
font = QtGui.QFont()
font.setPointSize(12)
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.uiQemuVMsTreeWidget.setFont(font)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/modules/virtualbox/ui/virtualbox_vm_preferences_page.ui'
#
# Created: Tue Oct 7 12:02:22 2014
# Created: Wed Nov 19 18:57:20 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -57,7 +57,7 @@ def setupUi(self, VirtualBoxVMPreferencesPageWidget):
self.uiVirtualBoxVMsTreeWidget.setSizePolicy(sizePolicy)
self.uiVirtualBoxVMsTreeWidget.setMaximumSize(QtCore.QSize(160, 16777215))
font = QtGui.QFont()
font.setPointSize(12)
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.uiVirtualBoxVMsTreeWidget.setFont(font)
Expand Down
8 changes: 4 additions & 4 deletions gns3/servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ def startLocalServer(self, path, host, port):

def stopLocalServer(self, wait=False):

if self._local_server and self._local_server.connected() and not sys.platform.startswith('win'):
# only gracefully disconnect if we are not on Windows
self._local_server.close_connection()
#if self._local_server and self._local_server.connected() and not sys.platform.startswith('win'):
# # only gracefully disconnect if we are not on Windows
# self._local_server.close_connection()
if self._local_server_proccess and self._local_server_proccess.poll() is None:
if sys.platform.startswith("win"):
self._local_server_proccess.send_signal(signal.CTRL_BREAK_EVENT)
else:
self._local_server_proccess.send_signal(signal.SIGINT)
if wait:
self._local_server_proccess.wait()
self._local_server_proccess.wait(timeout=3000)

def setLocalServer(self, path, host, port, auto_start, allow_console_from_anywhere, heartbeat_freq=DEFAULT_HEARTBEAT_FREQ):
"""
Expand Down

0 comments on commit 0370d30

Please sign in to comment.