mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-08 02:54:56 -06:00
*CtrlCore: Fixed GetActiveWindow issue, usvn: Fixed modality issue
git-svn-id: svn://ultimatepp.org/upp/trunk@5895 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c407d3f92e
commit
e6a70dd285
5 changed files with 21 additions and 3 deletions
|
|
@ -78,6 +78,8 @@ void Ctrl::Create0(Ctrl *owner, bool popup)
|
|||
DndInit();
|
||||
|
||||
StateH(OPEN);
|
||||
|
||||
activeCtrl = this;
|
||||
}
|
||||
|
||||
void Ctrl::WndDestroy0()
|
||||
|
|
@ -85,6 +87,16 @@ void Ctrl::WndDestroy0()
|
|||
GuiLock __;
|
||||
LLOG("WndDestroy " << Name());
|
||||
DndExit();
|
||||
Ctrl *owner = GetOwner();
|
||||
if(owner && owner->top) {
|
||||
for(int i = 0; i < wins.GetCount(); i++)
|
||||
if(wins[i].ctrl && wins[i].ctrl->GetOwner() == this && wins[i].gtk) {
|
||||
LLOG("Changing owner");
|
||||
gtk_window_set_transient_for((GtkWindow *)wins[i].gtk, owner->gtk());
|
||||
}
|
||||
if(HasFocusDeep())
|
||||
activeCtrl = owner;
|
||||
}
|
||||
gtk_widget_destroy(top->window);
|
||||
g_object_unref(top->im_context);
|
||||
isopen = false;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
static Ptr<Ctrl> grabwindow;
|
||||
static Ptr<Ctrl> grabpopup;
|
||||
static Ptr<Ctrl> sel_ctrl;
|
||||
static Ptr<Ctrl> activeCtrl;
|
||||
|
||||
static int FindId(int id);
|
||||
static int FindCtrl(Ctrl *ctrl);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void TopWindow::Open(Ctrl *owner)
|
|||
|
||||
void TopWindow::Open()
|
||||
{
|
||||
Open(GetActiveWindow()); //TODO!
|
||||
Open(GetActiveWindow());
|
||||
}
|
||||
|
||||
void TopWindow::OpenMain()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Vector<dword> Ctrl::modhot;
|
|||
|
||||
Vector<Ctrl::Win> Ctrl::wins;
|
||||
|
||||
Ptr<Ctrl> Ctrl::activeCtrl;
|
||||
|
||||
int Ctrl::WndCaretTime;
|
||||
bool Ctrl::WndCaretVisible;
|
||||
|
||||
|
|
@ -109,7 +111,9 @@ Ctrl *Ctrl::GetOwner()
|
|||
Ctrl *Ctrl::GetActiveCtrl()
|
||||
{
|
||||
GuiLock __;
|
||||
return focusCtrl ? focusCtrl->GetTopCtrl() : NULL;
|
||||
if(focusCtrl)
|
||||
return focusCtrl->GetTopCtrl();
|
||||
return activeCtrl;
|
||||
}
|
||||
|
||||
// Vector<Callback> Ctrl::hotkey;
|
||||
|
|
|
|||
|
|
@ -251,13 +251,14 @@ void SvnSync::DoSync()
|
|||
SyncList();
|
||||
msgmap.Sweep();
|
||||
again:
|
||||
if(Execute() != IDOK || list.GetCount() == 0) {
|
||||
if(Run() != IDOK || list.GetCount() == 0) {
|
||||
int repoi = 0;
|
||||
for(int i = 0; i < list.GetCount(); i++)
|
||||
if(list.Get(i, 0) == MESSAGE)
|
||||
msgmap.GetAdd(works[repoi++].working) = list.Get(i, 3);
|
||||
return;
|
||||
}
|
||||
Disable();
|
||||
bool changes = false;
|
||||
for(int i = 0; i < list.GetCount(); i++) {
|
||||
int action = list.Get(i, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue