replace GTK_WIDGET_VISIBLE -> gtk_widget_get_visible()
This commit is contained in:
parent
112f66fb06
commit
ff33df7d45
|
|
@ -314,7 +314,7 @@ static gint ci_pathlist_changed( GtkWidget *widget, gpointer data ){
|
||||||
}
|
}
|
||||||
|
|
||||||
// start edit mode
|
// start edit mode
|
||||||
if ( g_pCameraInspectorWnd && GTK_WIDGET_VISIBLE( g_pCameraInspectorWnd ) ) {
|
if ( g_pCameraInspectorWnd && gtk_widget_get_visible( g_pCameraInspectorWnd ) ) {
|
||||||
DoStartEdit( GetCurrentCam() );
|
DoStartEdit( GetCurrentCam() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -759,7 +759,7 @@ static gint ci_camlist_changed( GtkWidget *widget, gpointer data ){
|
||||||
|
|
||||||
// start edit mode
|
// start edit mode
|
||||||
g_iActiveTarget = -1;
|
g_iActiveTarget = -1;
|
||||||
if ( g_pCameraInspectorWnd && GTK_WIDGET_VISIBLE( g_pCameraInspectorWnd ) ) {
|
if ( g_pCameraInspectorWnd && gtk_widget_get_visible( g_pCameraInspectorWnd ) ) {
|
||||||
DoStartEdit( GetCurrentCam() );
|
DoStartEdit( GetCurrentCam() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ void WriteIniFile( const char *file ){
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdatePreview( bool DataChange ){
|
void UpdatePreview( bool DataChange ){
|
||||||
if ( g_pWndPreview && GTK_WIDGET_VISIBLE( g_pWndPreview ) ) {
|
if ( g_pWndPreview && gtk_widget_get_visible( g_pWndPreview ) ) {
|
||||||
if ( DataChange ) {
|
if ( DataChange ) {
|
||||||
GenerateXYZ();
|
GenerateXYZ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ void
|
||||||
GenericDialog::Raise()
|
GenericDialog::Raise()
|
||||||
{
|
{
|
||||||
// Don't bother if not visible.
|
// Don't bother if not visible.
|
||||||
if (GTK_WIDGET_VISIBLE(_dialog))
|
if (gtk_widget_get_visible(_dialog))
|
||||||
{
|
{
|
||||||
gdk_window_raise(_dialog->window);
|
gdk_window_raise(_dialog->window);
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ GenericDialog::Show(const std::string& triggerCommand)
|
||||||
// use of this information.
|
// use of this information.
|
||||||
_triggerCommand = triggerCommand;
|
_triggerCommand = triggerCommand;
|
||||||
// Show the window if it is currently hidden.
|
// Show the window if it is currently hidden.
|
||||||
if (!GTK_WIDGET_VISIBLE(_dialog))
|
if (!gtk_widget_get_visible(_dialog))
|
||||||
{
|
{
|
||||||
gtk_widget_show(_dialog);
|
gtk_widget_show(_dialog);
|
||||||
}
|
}
|
||||||
|
|
@ -131,7 +131,7 @@ void
|
||||||
GenericDialog::Hide()
|
GenericDialog::Hide()
|
||||||
{
|
{
|
||||||
// Bail out if the window is already invisible.
|
// Bail out if the window is already invisible.
|
||||||
if (!GTK_WIDGET_VISIBLE(_dialog))
|
if (!gtk_widget_get_visible(_dialog))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ static gboolean focus_in( GtkEntry* entry, GdkEventFocus *event, NonModalEntry*
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean focus_out( GtkEntry* entry, GdkEventFocus *event, NonModalEntry* self ){
|
static gboolean focus_out( GtkEntry* entry, GdkEventFocus *event, NonModalEntry* self ){
|
||||||
if ( self->m_editing && GTK_WIDGET_VISIBLE( entry ) ) {
|
if ( self->m_editing && gtk_widget_get_visible( GTK_WIDGET( entry ) ) ) {
|
||||||
self->m_apply();
|
self->m_apply();
|
||||||
}
|
}
|
||||||
self->m_editing = false;
|
self->m_editing = false;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ inline void CHECK_RESTORE( GtkWidget* w ){
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void CHECK_MINIMIZE( GtkWidget* w ){
|
inline void CHECK_MINIMIZE( GtkWidget* w ){
|
||||||
g_object_set_data( G_OBJECT( w ), "was_mapped", gint_to_pointer( GTK_WIDGET_VISIBLE( w ) ) );
|
g_object_set_data( G_OBJECT( w ), "was_mapped", gint_to_pointer( gtk_widget_get_visible( w ) ) );
|
||||||
//gtk_widget_hide( w ); //fix for gtk 2.24 + the whole scheme isn't needed with gtk 2.16, 2.24; they do it all alone
|
//gtk_widget_hide( w ); //fix for gtk 2.24 + the whole scheme isn't needed with gtk 2.16, 2.24; they do it all alone
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1223,7 +1223,7 @@ gboolean mousecontrol_button_press( GtkWidget* widget, GdkEventButton* event, Ca
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void camwnd_update_xor_rectangle( CamWnd& self, rect_t area ){
|
void camwnd_update_xor_rectangle( CamWnd& self, rect_t area ){
|
||||||
if ( GTK_WIDGET_VISIBLE( self.m_gl_widget ) ) {
|
if ( gtk_widget_get_visible( self.m_gl_widget ) ) {
|
||||||
if ( glwidget_make_current( self.m_gl_widget ) != FALSE ) {
|
if ( glwidget_make_current( self.m_gl_widget ) != FALSE ) {
|
||||||
if ( Map_Valid( g_map ) && ScreenUpdates_Enabled() ) {
|
if ( Map_Valid( g_map ) && ScreenUpdates_Enabled() ) {
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
|
|
||||||
|
|
@ -1487,7 +1487,7 @@ void EntityInspector_destroyWindow( GtkWidget* widget, gpointer data ){
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint EntityInspector_hideWindowKB( GtkWidget* widget, GdkEventKey* event, gpointer data ){
|
static gint EntityInspector_hideWindowKB( GtkWidget* widget, GdkEventKey* event, gpointer data ){
|
||||||
//if ( event->keyval == GDK_KEY_Escape && GTK_WIDGET_VISIBLE( GTK_WIDGET( widget ) ) ) {
|
//if ( event->keyval == GDK_KEY_Escape && gtk_widget_get_visible( widget ) ) {
|
||||||
if ( event->keyval == GDK_KEY_Escape ) {
|
if ( event->keyval == GDK_KEY_Escape ) {
|
||||||
//GroupDialog_showPage( g_page_entity );
|
//GroupDialog_showPage( g_page_entity );
|
||||||
gtk_widget_hide( GTK_WIDGET( GroupDialog_getWindow() ) );
|
gtk_widget_hide( GTK_WIDGET( GroupDialog_getWindow() ) );
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ EntityList() :
|
||||||
}
|
}
|
||||||
|
|
||||||
bool visible() const {
|
bool visible() const {
|
||||||
return GTK_WIDGET_VISIBLE( GTK_WIDGET( m_window ) );
|
return gtk_widget_get_visible( GTK_WIDGET( m_window ) );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ void FindTextureDialog::updateTextures( const char* name ){
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FindTextureDialog::isOpen(){
|
bool FindTextureDialog::isOpen(){
|
||||||
return GTK_WIDGET_VISIBLE( g_FindTextureDialog.GetWidget() ) == TRUE;
|
return gtk_widget_get_visible( GTK_WIDGET( g_FindTextureDialog.GetWidget() ) ) == TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindTextureDialog::setFindStr( const char* name ){
|
void FindTextureDialog::setFindStr( const char* name ){
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ GtkWidget* lookup_widget( GtkWidget* widget, const gchar* widget_name ) {
|
||||||
if( GTK_IS_MENU( widget ) )
|
if( GTK_IS_MENU( widget ) )
|
||||||
parent = gtk_menu_get_attach_widget( GTK_MENU( widget ) );
|
parent = gtk_menu_get_attach_widget( GTK_MENU( widget ) );
|
||||||
else
|
else
|
||||||
parent = widget->parent;
|
parent = gtk_widget_get_parent( widget );
|
||||||
if( !parent )
|
if( !parent )
|
||||||
parent = (GtkWidget*)g_object_get_data( G_OBJECT( widget ), "GladeParentKey" );
|
parent = (GtkWidget*)g_object_get_data( G_OBJECT( widget ), "GladeParentKey" );
|
||||||
if( parent == NULL )
|
if( parent == NULL )
|
||||||
|
|
|
||||||
|
|
@ -1911,7 +1911,7 @@ bool ScreenUpdates_Enabled(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenUpdates_process(){
|
void ScreenUpdates_process(){
|
||||||
if ( redrawRequired() && GTK_WIDGET_VISIBLE( g_wait.m_window ) ) {
|
if ( redrawRequired() && gtk_widget_get_visible( GTK_WIDGET( g_wait.m_window ) ) ) {
|
||||||
process_gui();
|
process_gui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1936,7 +1936,7 @@ void ScreenUpdates_Disable( const char* message, const char* title ){
|
||||||
ScreenUpdates_process();
|
ScreenUpdates_process();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( GTK_WIDGET_VISIBLE( g_wait.m_window ) ) {
|
else if ( gtk_widget_get_visible( GTK_WIDGET( g_wait.m_window ) ) ) {
|
||||||
gtk_label_set_text( g_wait.m_label, message );
|
gtk_label_set_text( g_wait.m_label, message );
|
||||||
ScreenUpdates_process();
|
ScreenUpdates_process();
|
||||||
}
|
}
|
||||||
|
|
@ -1956,7 +1956,7 @@ void ScreenUpdates_Enable(){
|
||||||
|
|
||||||
//gtk_window_present(MainFrame_getWindow());
|
//gtk_window_present(MainFrame_getWindow());
|
||||||
}
|
}
|
||||||
else if ( GTK_WIDGET_VISIBLE( g_wait.m_window ) ) {
|
else if ( gtk_widget_get_visible( GTK_WIDGET( g_wait.m_window ) ) ) {
|
||||||
gtk_label_set_text( g_wait.m_label, g_wait_stack.back().c_str() );
|
gtk_label_set_text( g_wait.m_label, g_wait_stack.back().c_str() );
|
||||||
ScreenUpdates_process();
|
ScreenUpdates_process();
|
||||||
}
|
}
|
||||||
|
|
@ -2743,7 +2743,7 @@ WindowFocusPrinter g_mainframeFocusPrinter( "mainframe" );
|
||||||
class MainWindowActive
|
class MainWindowActive
|
||||||
{
|
{
|
||||||
static gboolean notify( GtkWindow* window, gpointer dummy, MainWindowActive* self ){
|
static gboolean notify( GtkWindow* window, gpointer dummy, MainWindowActive* self ){
|
||||||
if ( g_wait.m_window != 0 && gtk_window_is_active( window ) && !GTK_WIDGET_VISIBLE( g_wait.m_window ) ) {
|
if ( g_wait.m_window != 0 && gtk_window_is_active( window ) && !gtk_widget_get_visible( GTK_WIDGET( g_wait.m_window ) ) ) {
|
||||||
gtk_widget_show( GTK_WIDGET( g_wait.m_window ) );
|
gtk_widget_show( GTK_WIDGET( g_wait.m_window ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ PatchInspector() :
|
||||||
}
|
}
|
||||||
|
|
||||||
bool visible(){
|
bool visible(){
|
||||||
return GTK_WIDGET_VISIBLE( GetWidget() );
|
return gtk_widget_get_visible( GTK_WIDGET( GetWidget() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// void UpdateInfo();
|
// void UpdateInfo();
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ void destroyWindow(){
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
bool visible() const {
|
bool visible() const {
|
||||||
return GTK_WIDGET_VISIBLE( const_cast<GtkWindow*>( GetWidget() ) );
|
return gtk_widget_get_visible( GTK_WIDGET( GetWidget() ) );
|
||||||
}
|
}
|
||||||
void queueDraw(){
|
void queueDraw(){
|
||||||
if ( visible() ) {
|
if ( visible() ) {
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,7 @@ Shader* XYWnd::m_state_selected = 0;
|
||||||
#define OVERLAY_GL_FRONT_DRAW_HACK
|
#define OVERLAY_GL_FRONT_DRAW_HACK
|
||||||
#endif
|
#endif
|
||||||
bool XYWnd::overlayStart(){
|
bool XYWnd::overlayStart(){
|
||||||
if ( GTK_WIDGET_VISIBLE( m_gl_widget ) ) {
|
if ( gtk_widget_get_visible( m_gl_widget ) ) {
|
||||||
if ( glwidget_make_current( m_gl_widget ) != FALSE ) {
|
if ( glwidget_make_current( m_gl_widget ) != FALSE ) {
|
||||||
if ( Map_Valid( g_map ) && ScreenUpdates_Enabled() ) {
|
if ( Map_Valid( g_map ) && ScreenUpdates_Enabled() ) {
|
||||||
GlobalOpenGL_debugAssertNoErrors();
|
GlobalOpenGL_debugAssertNoErrors();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user