[GB.GTK]
* BUG: Remove the Screens.Primary property, it is useless (it is always 0). [GB.GTK3] * BUG: Remove the Screens.Primary property, it is useless (it is always 0). [GB.QT4] * BUG: Continue fixing modal dialog initial screen. * BUG: Remove the Screens.Primary property, it is useless (it is always 0). [GB.QT5] * BUG: Continue fixing modal dialog initial screen. * BUG: Remove the Screens.Primary property, it is useless (it is always 0). git-svn-id: svn://localhost/gambas/trunk@7282 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
0704ce8f70
commit
e2dd8969a3
5 changed files with 12 additions and 26 deletions
|
@ -290,13 +290,6 @@ BEGIN_PROPERTY(Screens_Count)
|
|||
END_PROPERTY
|
||||
|
||||
|
||||
BEGIN_PROPERTY(Screens_Primary)
|
||||
|
||||
GB.ReturnInteger(gDesktop::primary());
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
|
||||
BEGIN_METHOD(Screens_get, GB_INTEGER screen)
|
||||
|
||||
GB.ReturnObject(get_screen(VARG(screen)));
|
||||
|
@ -396,8 +389,6 @@ GB_DESC ScreensDesc[] =
|
|||
GB_STATIC_METHOD("_get", "Screen", Screens_get, "(Screen)i"),
|
||||
GB_STATIC_METHOD("_next", "Screen", Screens_next, NULL),
|
||||
|
||||
GB_STATIC_PROPERTY_READ("Primary", "i", Screens_Primary),
|
||||
|
||||
GB_END_DECLARE
|
||||
};
|
||||
|
||||
|
|
|
@ -349,11 +349,6 @@ int gDesktop::count()
|
|||
#endif
|
||||
}
|
||||
|
||||
int gDesktop::primary()
|
||||
{
|
||||
return gdk_screen_get_number(gdk_screen_get_default());
|
||||
}
|
||||
|
||||
void gDesktop::geometry(int screen, GdkRectangle *rect)
|
||||
{
|
||||
rect->x = rect->y = rect->width = rect->height = 0;
|
||||
|
|
|
@ -63,7 +63,6 @@ public:
|
|||
static bool rightToLeft();
|
||||
|
||||
static int count();
|
||||
static int primary();
|
||||
static void geometry(int screen, GdkRectangle *rect);
|
||||
static void availableGeometry(int screen, GdkRectangle *rect);
|
||||
|
||||
|
|
|
@ -305,11 +305,11 @@ BEGIN_PROPERTY(Screens_Count)
|
|||
END_PROPERTY
|
||||
|
||||
|
||||
BEGIN_PROPERTY(Screens_Primary)
|
||||
/*BEGIN_PROPERTY(Screens_Primary)
|
||||
|
||||
GB.ReturnInteger(QApplication::desktop()->primaryScreen());
|
||||
|
||||
END_PROPERTY
|
||||
END_PROPERTY*/
|
||||
|
||||
|
||||
BEGIN_METHOD(Screens_get, GB_INTEGER screen)
|
||||
|
@ -412,8 +412,6 @@ GB_DESC ScreensDesc[] =
|
|||
GB_STATIC_METHOD("_get", "Screen", Screens_get, "(Screen)i"),
|
||||
GB_STATIC_METHOD("_next", "Screen", Screens_next, NULL),
|
||||
|
||||
GB_STATIC_PROPERTY_READ("Primary", "i", Screens_Primary),
|
||||
|
||||
GB_END_DECLARE
|
||||
};
|
||||
|
||||
|
|
|
@ -1512,12 +1512,10 @@ MyMainWindow::~MyMainWindow()
|
|||
|
||||
if (CWINDOW_Active == THIS)
|
||||
CWINDOW_Active = 0;
|
||||
|
||||
if (CWINDOW_LastActive == THIS)
|
||||
{
|
||||
CWINDOW_LastActive = 0;
|
||||
//qDebug("CWINDOW_LastActive = 0");
|
||||
}
|
||||
|
||||
|
||||
if (sg)
|
||||
delete sg;
|
||||
|
||||
|
@ -1646,7 +1644,13 @@ void MyMainWindow::present(QWidget *parent)
|
|||
{
|
||||
if (parent)
|
||||
_screen = QApplication::desktop()->screenNumber(parent);
|
||||
|
||||
else if (CWINDOW_Active)
|
||||
_screen = QApplication::desktop()->screenNumber(CWINDOW_Active->widget.widget);
|
||||
else if (CWINDOW_Main)
|
||||
_screen = QApplication::desktop()->screenNumber(CWINDOW_Main->widget.widget);
|
||||
else
|
||||
_screen = 0;
|
||||
|
||||
if (!isVisible())
|
||||
{
|
||||
//X11_window_startup(WINDOW->effectiveWinId(), THIS->x, THIS->y, THIS->w, THIS->h);
|
||||
|
@ -1742,7 +1746,6 @@ void MyMainWindow::showActivate(QWidget *transient)
|
|||
|
||||
present(newParentWidget);
|
||||
setEventLoop();
|
||||
|
||||
}
|
||||
|
||||
void on_error_show_modal(MODAL_INFO *info)
|
||||
|
@ -1801,7 +1804,7 @@ void MyMainWindow::showModal(void)
|
|||
|
||||
_enterLoop = false; // Do not call exitLoop() if we do not entered the loop yet!
|
||||
|
||||
present(CWINDOW_Active ? CWidget::getTopLevel((CWIDGET *)CWINDOW_Active)->widget.widget : 0);
|
||||
present(CWINDOW_Current ? CWidget::getTopLevel((CWIDGET *)CWINDOW_Current)->widget.widget : 0);
|
||||
setEventLoop();
|
||||
|
||||
THIS->loopLevel++;
|
||||
|
|
Loading…
Reference in a new issue