static void memorywin_zone_changed(GtkComboBox *zone_w, memorywin_i *mem) { int sel = gtk_combo_box_get_active(mem->zone_w); char title[256]; const memory_subview_item *subview; // update the subview memory_view_set_subview(mem->memory, sel); // change the checkmarks in the menu memorywin_update_checks(mem); // update the window title subview = memory_view_get_current_subview(mem->memory); sprintf(title, "Memory: %s", subview->name); gtk_window_set_title(GTK_WINDOW(mem->win), title); }
static void memorywin_zone_changed(GtkComboBox *zone_w, win_i *mem) { int sel = gtk_combo_box_get_active(zone_w); astring title; DView *memory = get_view(mem, DVT_MEMORY); assert(mem->type == WIN_TYPE_MEMORY); // update the source memory->view->set_source(*memory->view->source_list().by_index(sel)); // change the checkmarks in the menu memorywin_update_checks(mem); // update the window title const debug_view_source *source = memory->view->source(); title.printf("Memory: %s", source->name()); gtk_window_set_title(GTK_WINDOW(mem->win), title); }