- wxMenuBar* bar = GetMenuBar();
- if (!bar) return;
-
- wxNode *node = bar->m_menus.First();
- while (node)
- {
- wxMenu* menu = (wxMenu*)node->Data();
- DoMenuUpdates(menu);
-
- node = node->Next();
- };
-}
-
-void wxFrame::DoMenuUpdates(wxMenu* menu)
-{
- wxNode* node = menu->m_items.First();
- while (node)
- {
- wxMenuItem* item = (wxMenuItem*) node->Data();
- if ( !item->IsSeparator() )
- {
- wxWindowID id = item->GetId();
- wxUpdateUIEvent event(id);
- event.SetEventObject( this );
-
- if (GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetText())
- menu->SetLabel(id, event.GetText());
- if (event.GetSetChecked())
- menu->Check(id, event.GetChecked());
- if (event.GetSetEnabled())
- menu->Enable(id, event.GetEnabled());
- }
-
- if (item->GetSubMenu())
- DoMenuUpdates(item->GetSubMenu());
- }
- node = node->Next();
- }
+ m_icon = icon;
+ if (!icon.Ok()) return;
+
+ wxMask *mask = icon.GetMask();
+ GdkBitmap *bm = NULL;
+ if (mask) bm = mask->GetBitmap();
+
+ gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );