forked from bartvdbraak/blender
use sys.platform for checking the OS.
This commit is contained in:
parent
560c022af9
commit
08326778c5
@ -19,7 +19,6 @@
|
|||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
import bpy
|
import bpy
|
||||||
from bpy.types import Header, Menu, Panel
|
from bpy.types import Header, Menu, Panel
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def ui_style_items(col, context):
|
def ui_style_items(col, context):
|
||||||
@ -183,6 +182,7 @@ class USERPREF_PT_interface(Panel):
|
|||||||
return (userpref.active_section == 'INTERFACE')
|
return (userpref.active_section == 'INTERFACE')
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
import sys
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
userpref = context.user_preferences
|
userpref = context.user_preferences
|
||||||
@ -268,7 +268,7 @@ class USERPREF_PT_interface(Panel):
|
|||||||
|
|
||||||
col.prop(view, "show_splash")
|
col.prop(view, "show_splash")
|
||||||
|
|
||||||
if os.name == "nt":
|
if sys.platform[:3] == "win":
|
||||||
col.prop(view, "use_quit_dialog")
|
col.prop(view, "use_quit_dialog")
|
||||||
|
|
||||||
|
|
||||||
@ -1077,6 +1077,8 @@ class USERPREF_PT_addons(Panel):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_user_addon(mod, user_addon_paths):
|
def is_user_addon(mod, user_addon_paths):
|
||||||
|
import os
|
||||||
|
|
||||||
if not user_addon_paths:
|
if not user_addon_paths:
|
||||||
for path in (bpy.utils.script_path_user(),
|
for path in (bpy.utils.script_path_user(),
|
||||||
bpy.utils.script_path_pref()):
|
bpy.utils.script_path_pref()):
|
||||||
@ -1099,6 +1101,7 @@ class USERPREF_PT_addons(Panel):
|
|||||||
box.label(l)
|
box.label(l)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
import os
|
||||||
import addon_utils
|
import addon_utils
|
||||||
|
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
Loading…
Reference in New Issue
Block a user