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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-04-10 19:13:28 +0400
committerTon Roosendaal <ton@blender.org>2004-04-10 19:13:28 +0400
commitc8cadcd557839435162634d96b4380d0e65c8e40 (patch)
tree9e72fdc25c52d49568ca77ea3ddd0cf1993d3742
parent2a0bc1ee26b05e9d71c6080ab8674921e58eab89 (diff)
Bug 729
When more than 30 scenes are in a scene, the sequencer "Add" option didnt show a databrowse window. This was a nasty one, because databrowse facilities are more-of tied to having a header. The fix is that I added option to IDnames_to_pupstring() to not limit the menu (by passing NULL for menu short pointer). Also noticed a bug with pupmenu_col(), which did return on a val==0 event (mouse release) which shouldn't be, this makes sequences of menus not possible.
-rw-r--r--source/blender/blenkernel/intern/library.c8
-rw-r--r--source/blender/src/editseq.c6
-rw-r--r--source/blender/src/interface.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 3d9c6560cb4..3b325a06627 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -562,9 +562,9 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
{
int i, nids= BLI_countlist(lb);
- *nr= -1;
+ if (nr) *nr= -1;
- if (nids>MAX_IDPUP) {
+ if (nr && nids>MAX_IDPUP) {
BLI_dynstr_append(pupds, "DataBrowse %x-2");
} else {
ID *id;
@@ -572,8 +572,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
for (i=0, id= lb->first; id; id= id->next, i++) {
char buf[32];
- if (id==link)
- *nr= i+1;
+ if (nr && id==link) *nr= i+1;
get_flags_for_id(id, buf);
@@ -633,6 +632,7 @@ static void IPOnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, sho
}
// used by headerbuttons.c buttons.c editobject.c editseq.c
+// if nr==NULL no MAX_IDPUP, this for non-header browsing
void IDnames_to_pupstring(char **str, char *title, char *extraops, ListBase *lb, ID *link, short *nr)
{
DynStr *pupds= BLI_dynstr_new();
diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c
index 9efc120f065..0256217a1ef 100644
--- a/source/blender/src/editseq.c
+++ b/source/blender/src/editseq.c
@@ -1022,9 +1022,9 @@ void add_sequence(int type)
break;
case 101:
/* new menu: */
- IDnames_to_pupstring(&str, NULL, NULL, &G.main->scene, (ID *)G.scene, &nr);
-
- event= pupmenu(str);
+ IDnames_to_pupstring(&str, NULL, NULL, &G.main->scene, (ID *)G.scene, NULL);
+
+ event= pupmenu_col(str, 20);
if(event> -1) {
nr= 1;
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index eb60aede2ab..a5610c730cb 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -4299,7 +4299,7 @@ short pupmenu_col(char *instr, int maxrow)
MenuData *md;
block= uiNewBlock(&listb, "menu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
- uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT);
block->themecol= TH_MENU_ITEM;
md= decompose_menu_string(instr);