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:
authorCampbell Barton <ideasman42@gmail.com>2013-03-24 23:08:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-24 23:08:24 +0400
commit8bf206ce4b5fb3d8bb0e143d9b5e8422f71aefc7 (patch)
treea9b333a7bdfd20100a6e0299ca5ca04a4ecc86c6 /source/blender/editors/interface/interface_handlers.c
parentd74cf435755ebf4b69efc015e49ccdc2f77ad6e5 (diff)
edit to 55549, replace fake click event with call to uiButActiveOnly().
also make it more clear args are for rna buttons.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7afc00f5a07..8b8e8ceaa9c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7456,18 +7456,20 @@ void UI_remove_popup_handlers(ListBase *handlers, uiPopupBlockHandle *popup)
WM_event_remove_ui_handler(handlers, ui_handler_popup, ui_handler_remove_popup, popup, FALSE);
}
-void UI_textbutton_activate_event(const bContext *C, ARegion *ar, void *basepoin, const char *identifier)
+void UI_textbutton_activate_event(const bContext *C, ARegion *ar,
+ const void *rna_poin_data, const char *rna_prop_id)
{
uiBlock *block;
- uiBut *but;
+ uiBut *but = NULL;
for (block = ar->uiblocks.first; block; block = block->next) {
for (but = block->buttons.first; but; but = but->next) {
if (but->type == TEX) {
- if (but->rnaprop && but->rnapoin.data == basepoin)
- if (strcmp(RNA_property_identifier(but->rnaprop), identifier)==0)
+ if (but->rnaprop && but->rnapoin.data == rna_poin_data) {
+ if (STREQ(RNA_property_identifier(but->rnaprop), rna_prop_id)) {
break;
-
+ }
+ }
}
}
if (but)
@@ -7475,16 +7477,7 @@ void UI_textbutton_activate_event(const bContext *C, ARegion *ar, void *basepoin
}
if (but) {
- wmWindow *win = CTX_wm_window(C);
- wmEvent event;
-
- event = *(win->eventstate); /* XXX huh huh? make api call */
- event.type = EVT_BUT_OPEN;
- event.val = KM_PRESS;
- event.customdata = but;
- event.customdatafree = FALSE;
- wm_event_add(win, &event);
-
+ uiButActiveOnly(C, block, but);
}
}