*ret = (EMessageBoxReturn)gpointer_to_int( data );
}
-static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
- int *loop;
-
- gtk_widget_hide( widget );
- loop = (int*)g_object_get_data( G_OBJECT( widget ), "loop" );
+static gint dialog_delete_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
+ widget.hide();
+ int *loop = (int *) g_object_get_data(G_OBJECT(widget), "loop");
*loop = 0;
-
return TRUE;
}
gtk_main_iteration();
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
rs->bDuplicateOnly = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false;
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
// -djbob
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
//-djbob
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
gtk_main_iteration();
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
void DestroyWindow( void ){
ASSERT_NOTNULL( g_brushexp_window );
- gtk_widget_destroy( g_brushexp_window );
+ ui::Widget(g_brushexp_window).destroy();
g_brushexp_window = 0;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return TRUE;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return TRUE;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return TRUE;
}
}
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return TRUE;
}
gtk_main_iteration();
gtk_grab_remove( window );
- gtk_widget_destroy( window );
+ window.destroy();
return ret;
}
*ret = gpointer_to_int( data );
}
-static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
- int *loop;
-
- gtk_widget_hide( widget );
- loop = (int*)g_object_get_data( G_OBJECT( widget ), "loop" );
+static gint dialog_delete_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
+ widget.hide();
+ int *loop = (int *) g_object_get_data(G_OBJECT(widget), "loop");
*loop = 0;
-
return TRUE;
}
gtk_main_iteration();
gtk_grab_remove(dlg);
- gtk_widget_destroy(dlg);
+ dlg.destroy();
}
*ret = gpointer_to_int( data );
}
-static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
- int *loop;
-
- gtk_widget_hide( widget );
- loop = (int*)g_object_get_data( G_OBJECT( widget ), "loop" );
+static gint dialog_delete_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
+ widget.hide();
+ int *loop = (int *) g_object_get_data(G_OBJECT(widget), "loop");
*loop = 0;
-
return TRUE;
}
gtk_color_selection_get_current_color( GTK_COLOR_SELECTION( gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dlg)) ), &clr );
gtk_grab_remove( dlg );
- gtk_widget_destroy( dlg );
+ dlg.destroy();
if ( ret == IDOK ) {
*c = RGB( clr.red / (65535 / 255), clr.green / (65535 / 255), clr.blue / (65535 / 255));
gtk_main_iteration();
gtk_grab_remove( dlg );
- gtk_widget_destroy( dlg );
+ dlg.destroy();
}
*ret = gpointer_to_int( data );
}
-static gint dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer data ){
- int *loop;
-
- gtk_widget_hide( widget );
- loop = (int*)g_object_get_data( G_OBJECT( widget ), "loop" );
+static gint dialog_delete_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
+ widget.hide();
+ int *loop = (int *) g_object_get_data(G_OBJECT(widget), "loop");
*loop = 0;
-
return TRUE;
}
{
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_sel));
}
- gtk_widget_destroy (file_sel);
+ ui::Widget(file_sel).destroy();
if ( filename != NULL ) {
strcpy( portals.fn, filename );
}
gtk_grab_remove( dlg );
- gtk_widget_destroy( dlg );
+ dlg.destroy();
return ret;
}
}
// destroy widget if destroy signal is passed to widget
-static void destroy( GtkWidget *widget, gpointer data ){
- gtk_widget_destroy( widget );
+static void destroy( ui::Widget widget, gpointer data ){
+ widget.destroy();
}
// function for close button to destroy the toplevel widget
static void close_window( GtkWidget *widget, gpointer data ){
- gtk_widget_destroy( gtk_widget_get_toplevel( widget ) );
+ ui::Widget(gtk_widget_get_toplevel( widget ) ).destroy();
}
// callback function to assign the optimal mapcoords to the spinboxes
/**
* @brief destroy widget if destroy signal is passed to widget
*/
-static void destroy( GtkWidget *widget, gpointer data ){
- gtk_widget_destroy( widget );
+static void destroy( ui::Widget widget, gpointer data ){
+ widget.destroy();
}
/**
* @brief function for close button to destroy the toplevel widget
*/
static void close_window( GtkWidget *widget, gpointer data ){
- gtk_widget_destroy( gtk_widget_get_toplevel( widget ) );
+ ui::Widget(gtk_widget_get_toplevel( widget ) ).destroy();
}
/* =============================== */
gtk_main_iteration();
}
- gtk_widget_hide( GTK_WIDGET( window ) );
+ window.hide();
gtk_grab_remove( GTK_WIDGET( window ) );
return dialog.ret;
}
gboolean dialog_delete_callback( ui::Widget widget, GdkEventAny* event, ModalDialog* data ){
- gtk_widget_hide( widget );
+ widget.hide();
data->loop = false;
return TRUE;
}
g_file_dialog_file[0] = '\0';
}
- gtk_widget_destroy( dialog );
+ ui::Widget(dialog).destroy();
// don't return an empty filename
if ( g_file_dialog_file[0] == '\0' ) {
filename = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER( dialog ) );
}
- gtk_widget_destroy( dialog );
+ ui::Widget(dialog).destroy();
return filename;
}
modal_dialog_show( window, dialog );
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return dialog.ret;
}
#include "widget.h"
#include <gtk/gtk.h>
-void widget_set_visible(ui::Widget widget, bool shown)
-{
- if (shown) {
- widget.show();
- } else {
- gtk_widget_hide(widget);
- }
-}
-
-bool widget_is_visible(ui::Widget widget)
-{
- return gtk_widget_get_visible(widget) != FALSE;
-}
-
void widget_queue_draw(ui::Widget &widget)
{
gtk_widget_queue_draw(widget);
if (!m_widget) {
m_shownDeferred = shown;
} else {
- widget_set_visible(m_widget, shown);
+ m_widget.visible(shown);
}
}
void ToggleShown::toggle()
{
- widget_toggle_visible(m_widget);
+ m_widget.visible(!m_widget.visible());
}
void ToggleShown::connect(ui::Widget widget)
{
m_widget = widget;
- widget_set_visible(m_widget, m_shownDeferred);
+ m_widget.visible(m_shownDeferred);
m_widget.connect("notify::visible", G_CALLBACK(notify_visible), this);
m_widget.connect("destroy", G_CALLBACK(destroy), this);
update();
#include "warnings.h"
#include "debugging/debugging.h"
-void widget_set_visible(ui::Widget widget, bool shown);
-
-bool widget_is_visible(ui::Widget widget);
-
-inline void widget_toggle_visible(ui::Widget widget)
-{
- widget_set_visible(widget, !widget_is_visible(widget));
-}
-
class ToggleItem {
BoolExportCallback m_exportCallback;
typedef std::list<BoolImportCallback> ImportCallbacks;
inline void CHECK_MINIMIZE( ui::Widget w ){
g_object_set_data( G_OBJECT( w ), "was_mapped", gint_to_pointer( gtk_widget_get_visible( w ) ) );
- gtk_widget_hide( w );
+ w.hide();
}
static gboolean main_window_iconified( ui::Widget widget, GdkEventWindowState* event, gpointer data ){
}
void destroy_floating_window( ui::Window window ){
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
gint window_realize_remove_sysmenu( ui::Widget widget, gpointer data ){
}
gboolean persistent_floating_window_delete( ui::Window floating, GdkEvent *event, ui::Window main_window ){
- gtk_widget_hide( GTK_WIDGET( floating ) );
+ floating.hide();
return TRUE;
}
return gtk_widget_get_visible(this) != 0;
}
+ void IWidget::visible(bool shown)
+ {
+ if (shown) {
+ this.show();
+ } else {
+ this.hide();
+ }
+ }
+
void IWidget::show()
{
gtk_widget_show(this);
}
+ void IWidget::hide()
+ {
+ gtk_widget_hide(this);
+ }
+
Dimensions IWidget::dimensions()
{
GtkAllocation allocation;
gtk_widget_set_size_request(this, width, height);
}
+ void IWidget::destroy()
+ {
+ gtk_widget_destroy(this);
+ }
+
IMPL(Container, GTK_CONTAINER);
void IContainer::add(Widget widget)
bool want_save = false
);
bool visible();
+ void visible(bool shown);
void show();
+ void hide();
Dimensions dimensions();
void dimensions(int width, int height);
+ void destroy();
);
WRAP(Container, Widget, _GtkContainer, (),
gboolean project_selection_changed( GtkTreeSelection* selection, ui::ListStore store ){
Project& project = g_build_project;
- gtk_list_store_clear( store );
+ store.clear();
GtkTreeIter iter;
GtkTreeModel* model;
g_build_changed = true;
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
void Build_refreshMenu( ui::Menu menu ){
for ( BuildMenuItems::iterator i = g_BuildMenuItems.begin(); i != g_BuildMenuItems.end(); ++i )
{
- gtk_container_remove( menu, GTK_WIDGET( ( *i ).m_item ) );
+ menu.remove(ui::Widget(GTK_WIDGET((*i).m_item)));
}
g_BuildMenuItems.clear();
}
modal_dialog_show( window, dialog );
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
#include "profile/profile.h"
void Dialog::HideDlg(){
ASSERT_MESSAGE( m_window, "dialog was not constructed" );
exportData();
- gtk_widget_hide( GTK_WIDGET( m_window ) );
+ m_window.hide();
}
static gint delete_event_callback( ui::Widget widget, GdkEvent* event, gpointer data ){
void Dialog::Destroy(){
ASSERT_MESSAGE( m_window, "dialog cannot be destroyed" );
- gtk_widget_destroy( GTK_WIDGET( m_window ) );
+ m_window.destroy();
m_window = ui::Window{ui::null};
}
exportData();
}
- gtk_widget_hide( GTK_WIDGET( m_window ) );
+ m_window.hide();
PostModal( m_modal.ret );
}
void EntityClassList_clear(){
- gtk_list_store_clear( g_entlist_store );
+ g_entlist_store.clear();
}
void SetComment( EntityClass* eclass ){
auto widget = ui::Widget(GTK_WIDGET(g_entitySpawnflagsCheck[i]));
auto label = ui::Label(GTK_LABEL(gtk_bin_get_child(GTK_BIN(widget))));
label.text(" ");
- gtk_widget_hide( widget );
+ widget.hide();
g_object_ref( widget );
- gtk_container_remove( GTK_CONTAINER( g_spawnflagsTable ), widget );
+ ui::Container(GTK_CONTAINER(g_spawnflagsTable)).remove(widget);
}
}
CopiedString strKey( g_entityKeyEntry.text() );
CopiedString strVal( g_entityValueEntry.text() );
- gtk_list_store_clear( store );
+ store.clear();
// Walk through list and add pairs
for ( KeyValues::iterator i = g_selectedKeyValues.begin(); i != g_selectedKeyValues.end(); ++i )
{
void EntityList_SetShown( bool shown ){
- widget_set_visible( getEntityList().m_window, shown );
+ getEntityList().m_window.visible(shown);
}
void EntityList_toggleShown(){
}
if ( m_clist ) {
- gtk_list_store_clear( m_clist );
+ m_clist.clear();
}
}
}
// put stuff in the list
- gtk_list_store_clear( m_clist );
+ m_clist.clear();
for ( std::size_t i = 0; i < static_cast<std::size_t>( m_pFeedbackElements->len ); ++i )
{
m_clist.append(0, GetElement(i)->getName());
m_window.show();
}
void Hide(){
- gtk_widget_hide( GTK_WIDGET( m_window ) );
+ m_window.hide();
}
WindowPositionTracker m_position_tracker;
bool GroupDialog_isShown(){
- return widget_is_visible( g_GroupDlg.m_window );
+ return g_GroupDlg.m_window.visible();
}
void GroupDialog_setShown( bool shown ){
shown ? g_GroupDlg.Show() : g_GroupDlg.Hide();
ProjectSettingsDialog_ok( dialog );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
}
Scene_BrushConstructPrefab( GlobalSceneGraph(), (EBrushPrefab)type, atoi( str ), TextureBrowser_GetSelectedShader( GlobalTextureBrowser() ) );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
// =============================================================================
modal_dialog_show( window, dialog );
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
// =============================================================================
last_used_texture_layout_scale_y = *fy;
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return ret;
}
return TRUE;
}
- gtk_widget_hide( text_editor );
+ text_editor.hide();
return TRUE;
}
return;
}
- gtk_widget_hide( text_editor );
+ text_editor.hide();
}
static void CreateGtkTextEditor(){
if ( f == 0 ) {
globalOutputStream() << "Unable to load file " << filename << " in shader editor.\n";
- gtk_widget_hide( text_editor );
+ text_editor.hide();
}
else
{
*intensity = atoi( gtk_entry_get_text( intensity_entry ) );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return ret;
}
*tag = gtk_entry_get_text( textentry );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return ret;
}
EMessageBoxReturn ret = modal_dialog_show( window, dialog );
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return ret;
}
color[2] = clr.blue / 65535.0f;
}
- gtk_widget_destroy( dlg );
+ dlg.destroy();
return ok;
}
MainFrame::~MainFrame(){
SaveWindowInfo();
- gtk_widget_hide( GTK_WIDGET( m_window ) );
+ m_window.hide();
Shutdown();
for ( std::vector<ui::Widget>::iterator i = g_floating_windows.begin(); i != g_floating_windows.end(); ++i )
{
- gtk_widget_destroy( *i );
+ i->destroy();
}
- gtk_widget_destroy( GTK_WIDGET( m_window ) );
+ m_window.destroy();
}
void MainFrame::SetActiveXY( XYWnd* p ){
}
void hide_splash(){
- gtk_widget_destroy( GTK_WIDGET( splash_screen ) );
+ splash_screen.destroy();
}
WindowPositionTracker g_posCamWnd;
GtkToolbar* main_toolbar = create_main_toolbar( CurrentStyle() );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( main_toolbar ), FALSE, FALSE, 0 );
- GtkToolbar* plugin_toolbar = create_plugin_toolbar();
+ auto plugin_toolbar = create_plugin_toolbar();
if ( !g_Layout_enablePluginToolbar.m_value ) {
- gtk_widget_hide( GTK_WIDGET( plugin_toolbar ) );
+ plugin_toolbar.hide();
}
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( plugin_toolbar ), FALSE, FALSE, 0 );
// save before exit
window_get_position( window, g_posMapInfoWnd );
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
SelectBrush( atoi( entstr ), atoi( brushstr ) );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
void Map_constructPreferences( PreferencesPage& page ){
}
else
{
- gtk_widget_hide( GTK_WIDGET( MRU_items[MRU_used] ) );
+ ui::MenuItem(MRU_items[MRU_used]).hide();
}
}
}
void MRU_constructMenu( ui::Menu menu ){
{
- GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_1", LoadMRUCaller( g_load_mru1 ) );
+ auto item = create_menu_item_with_mnemonic( menu, "_1", LoadMRUCaller( g_load_mru1 ) );
gtk_widget_set_sensitive( GTK_WIDGET( item ), FALSE );
MRU_AddWidget( item, 0 );
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_2", LoadMRUCaller( g_load_mru2 ) );
- gtk_widget_hide( GTK_WIDGET( item ) );
+ auto item = create_menu_item_with_mnemonic( menu, "_2", LoadMRUCaller( g_load_mru2 ) );
+ item.hide();
MRU_AddWidget( item, 1 );
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_3", LoadMRUCaller( g_load_mru3 ) );
- gtk_widget_hide( GTK_WIDGET( item ) );
+ auto item = create_menu_item_with_mnemonic( menu, "_3", LoadMRUCaller( g_load_mru3 ) );
+ item.hide();
MRU_AddWidget( item, 2 );
}
{
- GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_4", LoadMRUCaller( g_load_mru4 ) );
- gtk_widget_hide( GTK_WIDGET( item ) );
+ auto item = create_menu_item_with_mnemonic( menu, "_4", LoadMRUCaller( g_load_mru4 ) );
+ item.hide();
MRU_AddWidget( item, 3 );
}
}
Scene_PatchConstructPrefab( GlobalSceneGraph(), PatchCreator_getBounds(), TextureBrowser_GetSelectedShader( GlobalTextureBrowser() ), prefab, GlobalXYWnd_getCurrentViewType(), w, h );
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
}
}
}
- gtk_widget_destroy( GTK_WIDGET( window ) );
+ window.destroy();
return ret;
}
GList* lst = g_list_find( gtk_container_get_children( GTK_CONTAINER( g_plugins_menu ) ), GTK_WIDGET( g_plugins_menu_separator ) );
while ( lst->next )
{
- gtk_container_remove( GTK_CONTAINER( g_plugins_menu ), GTK_WIDGET( lst->next->data ) );
+ g_plugins_menu.remove(ui::Widget(GTK_WIDGET(lst->next->data)));
lst = g_list_find( gtk_container_get_children( GTK_CONTAINER( g_plugins_menu ) ), GTK_WIDGET( g_plugins_menu_separator ) );
}
}
}
static gboolean rotatedlg_cancel( ui::Widget widget, RotateDialog* rotateDialog ){
- gtk_widget_hide( GTK_WIDGET( rotateDialog->window ) );
+ rotateDialog->window.hide();
gtk_spin_button_set_value( rotateDialog->x, 0.0f ); // reset to 0 on close
gtk_spin_button_set_value( rotateDialog->y, 0.0f );
static gboolean rotatedlg_ok( ui::Widget widget, RotateDialog* rotateDialog ){
rotatedlg_apply( widget, rotateDialog );
- gtk_widget_hide( GTK_WIDGET( rotateDialog->window ) );
+ rotateDialog->window.hide();
return TRUE;
}
}
static gboolean scaledlg_cancel( ui::Widget widget, ScaleDialog* scaleDialog ){
- gtk_widget_hide( GTK_WIDGET( scaleDialog->window ) );
+ scaleDialog->window.hide();
scaleDialog->x.text("1.0");
scaleDialog->y.text("1.0");
static gboolean scaledlg_ok( ui::Widget widget, ScaleDialog* scaleDialog ){
scaledlg_apply( widget, scaleDialog );
- gtk_widget_hide( GTK_WIDGET( scaleDialog->window ) );
+ scaleDialog->window.hide();
return TRUE;
}
template<class StringList>
void EntryCompletion<StringList>::clear()
{
- gtk_list_store_clear(m_store);
+ m_store.clear();
}
template<class StringList>
void TextureBrowser_importShowScrollbar( TextureBrowser& textureBrowser, bool value ){
textureBrowser.m_showTextureScrollbar = value;
if ( textureBrowser.m_texture_scroll != 0 ) {
- widget_set_visible( textureBrowser.m_texture_scroll, textureBrowser.m_showTextureScrollbar );
+ textureBrowser.m_texture_scroll.visible(textureBrowser.m_showTextureScrollbar);
TextureBrowser_updateScroll( textureBrowser );
}
}
void BuildStoreAssignedTags( ui::ListStore store, const char* shader, TextureBrowser* textureBrowser ){
GtkTreeIter iter;
- gtk_list_store_clear( store );
+ store.clear();
std::vector<CopiedString> assigned_tags;
TagBuilder.GetShaderTags( shader, assigned_tags );
std::set<CopiedString>::const_iterator iterAll;
gchar* tag_assigned;
- gtk_list_store_clear( storeAvailable );
+ storeAvailable.clear();
bool row = gtk_tree_model_get_iter_first( GTK_TREE_MODEL( storeAssigned ), &iterAssigned ) != 0;
if ( GlobalTextureBrowser().m_tags ) {
textureBrowser->m_rmbSelected = false;
- gtk_widget_hide( textureBrowser->m_tag_frame );
+ textureBrowser->m_tag_frame.hide();
}
}
}
}
void TextureBrowser_buildTagList(){
- gtk_list_store_clear( g_TextureBrowser.m_all_tags_list );
+ g_TextureBrowser.m_all_tags_list.clear();
std::set<CopiedString>::iterator iter;
gtk_widget_show_all( g_TextureBrowser.m_search_button );
}
else {
- gtk_widget_hide( g_TextureBrowser.m_search_button );
+ g_TextureBrowser.m_search_button.hide();
}
}
auto vadjustment = ui::Adjustment(gtk_range_get_adjustment( GTK_RANGE( g_TextureBrowser.m_texture_scroll ) ));
vadjustment.connect( "value_changed", G_CALLBACK( TextureBrowser_verticalScroll ), &g_TextureBrowser );
- widget_set_visible( g_TextureBrowser.m_texture_scroll, g_TextureBrowser.m_showTextureScrollbar );
+ g_TextureBrowser.m_texture_scroll.visible(g_TextureBrowser.m_showTextureScrollbar);
}
{ // gl_widget
g_TextureBrowser.m_gl_widget = glwidget_new( FALSE );
onDestroyed();
if ( m_mnuDrop ) {
- gtk_widget_destroy( GTK_WIDGET( m_mnuDrop ) );
+ m_mnuDrop.destroy();
m_mnuDrop = ui::Menu(ui::null);
}
void unrealise(){
if ( ++m_unrealised == 1 ) {
if ( XYWnd::m_mnuDrop ) {
- gtk_widget_destroy( GTK_WIDGET( XYWnd::m_mnuDrop ) );
+ XYWnd::m_mnuDrop.destroy();
XYWnd::m_mnuDrop = ui::Menu(ui::null);
}
}