Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-16 08:55:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-16 08:55:31 +0400
commit80c2582f0eee9f9ad9c262df0826298c0d7137c7 (patch)
tree60a931965c8217fd9cb71f01098fe63ae9a152b7 /source
parent0460a68ae7d2ef7f771c407dd5b9f9c86d2c8d49 (diff)
enable game panel even if the BGE is disabled since its settings effect the viewport.
also remove unused function in creator.c and minor edit to search menu poll function.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c18
-rw-r--r--source/creator/creator.c14
2 files changed, 15 insertions, 17 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index e624768c86e..745ae0ae47e 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1328,10 +1328,20 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
/* op->poll */
static int wm_search_menu_poll(bContext *C)
{
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console
- if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor
- if(CTX_data_edit_object(C) && CTX_data_edit_object(C)->type==OB_FONT) return 0; // XXX - so we can use the spacebar for entering text
+ if(CTX_wm_window(C)==NULL) {
+ return 0;
+ }
+ else {
+ ScrArea *sa= CTX_wm_area(C);
+ if(sa) {
+ if(sa->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console
+ if(sa->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor
+ }
+ else {
+ Object *editob= CTX_data_edit_object(C);
+ if(editob && editob->type==OB_FONT) return 0; // XXX - so we can use the spacebar for entering text
+ }
+ }
return 1;
}
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 2b146822194..29ddd2ab1b0 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -151,7 +151,7 @@ char btempdir[FILE_MAX];
#define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION
-/* Initialise callbacks for the modules that need them */
+/* Initialize callbacks for the modules that need them */
static void setCallbacks(void);
/* set breakpoints here when running in debug mode, useful to catch floating point errors */
@@ -338,18 +338,6 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
double PIL_check_seconds_timer(void);
-/* XXX This was here to fix a crash when running python scripts
- * with -P that used the screen.
- *
- * static void main_init_screen( void )
-{
- setscreen(G.curscreen);
-
- if(G.main->scene.first==0) {
- set_scene( add_scene("1") );
- }
-}*/
-
static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
return -1;